Professional Documents
Culture Documents
What - [DOC D…
COBOL/COBOL II Questionnaire
COBOL/COBOL II QUESTIONNAIRE
Q.2 What are the structured development aids introduced in COBOL II?
A COBOL II offers the following options :
a. EVALUATE : permits CASE construction.
b. The in-line PERFORM : permits 'do’ construction.
c. TEST BEFORE and TEST AFTER in the PERFORM statements : p
while' and 'do until' constructions.
The scope terminator ',' (as well as the period '.') is still available.
Q.4 What are the three categories of data defined in the DATA division?
A The three categories of data defined in DATA division are :
The file section (FD) information
Working storage information
Linkage-section data definitions
https://fdocuments.in/reader/full/cobolcobol-ii-questionnaire-web-view-cobolcobol-ii-questionnaire-q1-cobol 1/11
7/5/2021 COBOL/COBOL II QUESTIONNAIRE - Web view COBOL/COBOL II QUESTIONNAIRE. Q.1 COBOL is an acronym. What - [DOC D…
COBOL/COBOL II Questionnaire
Q.10 How can you use INITIALIZE for specifying specific values?
A INITIALIZE GROUP-ITEM REPLACING ALPHANUMERIC DATA By HIGH-VALU
REPLACING option is used, only specific type will be initialized.
Q.12 Give two examples of how you would use reference modification?
A 1. In a list of ZIP codes, the first three digits define a geographic area
:
IF ZIP ( I : 3 ) = '100'
AREA = MANHATTAN
END - IF
2. MOVE 'MEXICO' TO STATE ( 5 : 6 ) could change NEW JERS
MEXICO.
https://fdocuments.in/reader/full/cobolcobol-ii-questionnaire-web-view-cobolcobol-ii-questionnaire-q1-cobol 2/11
7/5/2021 COBOL/COBOL II QUESTIONNAIRE - Web view COBOL/COBOL II QUESTIONNAIRE. Q.1 COBOL is an acronym. What - [DOC D…
COBOL/COBOL II Questionnaire
Q.22 How has the return code for VSAM files been changed in COBOL II?
A The return code has been enlarged to 6 bytes and returns the VSAM return code
when the FILE STATUS is not 00. The format of the expanded return code is as
follows :
REGISTER 15 Return Code PIC 9(2) COMP.
FUNCTION CODE PIC 9(1) COMP.
FEEDBACK CODE PIC 9(3) COMP.
Q.23 What type of documentation would you recommend for a COBOL program?
A Document code changes at the beginning of the Program. The documentation
should include chronological references following the date compiled statement
and should include date in a fixed position and a brief description of the
change in a fixed position.
Q.25 Can the logical structure of a file be changed once it has been created?
A No.
COBOL/COBOL II Questionnaire
https://fdocuments.in/reader/full/cobolcobol-ii-questionnaire-web-view-cobolcobol-ii-questionnaire-q1-cobol 3/11
7/5/2021 COBOL/COBOL II QUESTIONNAIRE - Web view COBOL/COBOL II QUESTIONNAIRE. Q.1 COBOL is an acronym. What - [DOC D…
The binary is a dichotomizing search and must have a key that is in ascending
or descending order. At each step of search, half of the records in the table
are eliminated. For example, in SEARCH for the number 8, the first division
COBOL/COBOL II Questionnaire
https://fdocuments.in/reader/full/cobolcobol-ii-questionnaire-web-view-cobolcobol-ii-questionnaire-q1-cobol 4/11
7/5/2021 COBOL/COBOL II QUESTIONNAIRE - Web view COBOL/COBOL II QUESTIONNAIRE. Q.1 COBOL is an acronym. What - [DOC D…
Q.40 What is the most efficient method for locating data in a table?
A If you know the location of the data in the table, use it. For example, in a
table of names of months, use numeric value of the month to locate the name.
To convert 04/01/93 to April 01 1993, the 04 would be used as the subscript
to locate the word April.
Q.41 How could one subscript sequentially through a table of 50 states, looking
for NY?
A Given the subscript SUB-1 PIC 99, the following COBOL II code could be used :
Q.43 Give answer to the previous question using a binary search, given the 0
level table name as 01 TABLE-NAME, the occurs clause indexed by table-index,
ascending key is table-item.
Q.44 Describe a paragraph - naming convention that would assist navigation through
https://fdocuments.in/reader/full/cobolcobol-ii-questionnaire-web-view-cobolcobol-ii-questionnaire-q1-cobol 5/11
7/5/2021 COBOL/COBOL II QUESTIONNAIRE - Web view COBOL/COBOL II QUESTIONNAIRE. Q.1 COBOL is an acronym. What - [DOC D…
COBOL/COBOL II Questionnaire
Q.46 What is the format of a COBOL internal sort using an input procedure and an
output procedure?
A. SELECT SORT-FILE
SD SORT - FILE
SORT RECORD IS SORT - WORk - RFC.
PROCEDURE DIVISION.
SORT SORT - FILE
ASCENDING KEY FIRST - SORT - KEY
INPUT PROCEDURE SORT - INPUT - PROCEDURE
OUTPUT PROCEDURE SORT - OUTPUT - PROCED
COBOL/COBOL II Questionnaire
lowest key to the first item’s position. The process is continued, starting
with the second item, comparing it to the third item, swapping pairs of items
until the entire table is in order.
Q.52 How could 88 levels be used for validation of data for valid values and valid
ranges?
A. The 88 level is used to specify the valid values and/or rings of values and
then the 88 data name is used in an if statement to test the data.
Q.54 How could 88 levels be used to determine the next step in navigating through
a program?
A The 88-level data name can be used to specify a condition in both if and
evaluate statements.
IF VALID - LOCATIONs
PERFORM PARA - A
END - IF
EVALUATE TRUE
https://fdocuments.in/reader/full/cobolcobol-ii-questionnaire-web-view-cobolcobol-ii-questionnaire-q1-cobol 7/11
7/5/2021 COBOL/COBOL II QUESTIONNAIRE - Web view COBOL/COBOL II QUESTIONNAIRE. Q.1 COBOL is an acronym. What - [DOC D…
WHEN VALID -LOCATIONS
PERFORM PARA - A
WHEN OTHER
PERFORM PARA - B
END-EVALUATE
COBOL/COBOL II Questionnaire
Q.60 When can the USING phrase be included in the CALL statement?
A The USING phrase can be included in the CALL statement only if there is a
USING phrase in the Procedure Division header or the ENTER statement through
which the called program is invoked.
Q.61 Can the number of operands in the USING phrase in called program be different
than the number of operands in the USING statement of calling programs?
A The number of operands in the calling program USING phrase and the cal
program USING phrase must be identical.
Q.62 How do file operands of the calling program USING phrase align with
operands of the called program USING phrase?
A The correspondence is by position - not by name.
Q.66 What type of text can be copied using the COPY statement?
A. The type of text that can be copied into a COBOL program includes all types
of components of a COBOL program, including file definitions, working storage
and procedure division code.
the COPY, replacing all occurrences of the first operand within the copied
library member text by the second operand.
Q.68 Can the text of a copy library member contain nested COPY statements?
A In COBOL II a copy library member may contain nested COPY statements. This is
COBOL/COBOL II Questionnaire
Q.80 How would the number +1234 be stored if a PIC clause of PICTURE S9(4) COMP-3
were used?
A The answer will use 3 bytes (4 + 1 = 5 / 2 = 2.5 or 3), so a leading 0 will
pad the answer : 01234F.
https://fdocuments.in/reader/full/cobolcobol-ii-questionnaire-web-view-cobolcobol-ii-questionnaire-q1-cobol 9/11
7/5/2021 COBOL/COBOL II QUESTIONNAIRE - Web view COBOL/COBOL II QUESTIONNAIRE. Q.1 COBOL is an acronym. What - [DOC D…
COBOL/COBOL II Questionnaire
Q.84 What will be the result of executing a VS-COBOL II program that was compiled
with the SSRANGE option, when a subscript exceeds the table limits?
A The program will terminate.
Q.86 What problem could occur when a file is read with an incorrect file
definition?
A A data exception could occur causing the program to terminate.
https://fdocuments.in/reader/full/cobolcobol-ii-questionnaire-web-view-cobolcobol-ii-questionnaire-q1-cobol 10/11
7/5/2021 COBOL/COBOL II QUESTIONNAIRE - Web view COBOL/COBOL II QUESTIONNAIRE. Q.1 COBOL is an acronym. What - [DOC D…
https://fdocuments.in/reader/full/cobolcobol-ii-questionnaire-web-view-cobolcobol-ii-questionnaire-q1-cobol 11/11