FAQs(91 to 105)

91) What are some examples of command terminators?

A) END-IF, END-EVALUATE

92) What care has to be taken to force program to execute above 16 Meg line?

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.

93) How do you submit JCL via a Cobol program?

A) Use a file //dd1 DD sysout=(*, intrdr)write your JCL to this file. Pl some on try this out.

94) How to execute a set of JCL statements from a COBOL program

A) Using EXEC CICS SPOOL WRITE(var-name) END-EXEC command. var-name is a COBOL host structure containing JCL statements.

95) Give some advantages of REDEFINES clause.

A)

1. You can REDEFINE a Variable from one PICTURE class to another PICTURE class by using the same memory location.

2. 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.)

96) What is the difference between static call & Dynamic call

A) In the case of Static call, the called program is a stand-alone program, it is an executable program. During run time we can call it in our called program. As about Dynamic call, the called program is not an executable program it can executed through the called program

97) What do you feel makes a good program?

A) A program that follows a top down approach. It is also one that other programmers or users can follow logically and is easy to read and understand.

98) How do you code Cobol to access a parameter that has been defined in JCL? And do you code the PARM

parameter on the EXEC line in JCL?

A)

1) using JCL with sysin. //sysin dd *here u code the parameters(value) to pass in to cobol program /* and in program

you use accept variable name(one accept will read one row)/.another way.

2) in jcl using parm statement ex: in exec statement parm='john','david' in cobol pgm u have to code linkage section in that for first value you code length variable and variable name say, abc pic x(4).it will take john inside to read next value u have to code another variable in the same way above mentioned.

99) Why do we code S9(4) comp. Inspite of knowing comp-3 will occupy less space.

A) Here s9(4)comp is small integer ,so two words equal to 1 byte so 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 byte so totally it will occupy 3 bytes.

100) The maximum number of dimensions that an array can have in COBOL-85 is ----------- ?

A) SEVEN in COBOL - 85 and THREE in COBOL - 84

101) How do you declare a host variable (in COBOL) for an attribute named Emp-Name of type VARCHAR(25) ?

A)

01 EMP-GRP.

49 E-LEN PIC S9(4) COMP.

49 E-NAME PIC X(25).

102) What is Comm?

A) COMM - HALF WORD BINARY

103) Differentiate COBOL and COBOL-II. (Most of our programs are written in COBOLII, so, it is good to know,

how, this is different from COBOL)

A) The following features are available with VS COBOL II:

1. MVS/XA and MVS/ESA support The compiler and the object programs it produces can be run in either

24- or 31-bit addressing mode.

2. VM/XA and VM/ESA support The compiler and the object programs it produces can be run in either

24- or 31-bit addressing mode.

3. VSE/ESA support The compiler and the object programs it produces can be run under VSE/ESA.

104) What is PERFORM ? What is VARYING ? (More details about these clauses)

A) The PERFORM statement is a PROCEDURE DIVISION statement which transfers control to one or more specified procedures and controls as specified the number of times the procedures are executed. After execution of the specified procedures is completed (i.e., for the appropriate number of times or until some specified condition is met), control is transferred to the next executable statement following the PERFORM statement. There are 5 types of PERFORM statements:

a) Basic PERFORM

b) PERFORM TIMES

c) PERFORM UNTIL

d) PERFORM VARYING

e) IN-LINE PERFORM

105) How many sections are there in data division?.

A) SIX SECTIONS 1.FILE SECTION 2.WORKING-STORAGE SECTION 3. LOCAL-STORAGE SECTION 4.SCREEN SECTION 5.REPORT SECTION 6. LINKAGE SECTION