Professional Documents
Culture Documents
COBOL
Course Handbook
Visual COBOL
01 Procedural COBOL
Choice
Answer
a. var-var1
b. data1
c. two
d. all
1
PARA-1
2
PARA-2
VAR1
a. +
b. $
c. S
d.
X Close
Back | Next
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
4. What will happen to the code below when the end of file is reached:
PERFORM 210-READ-EMPLOYEE-RECORD.
IF NOT EMP-EOF
EVALUATE TRUE
WHEN EL-GROSS-PAY < 1 OR
EL-PAY-RATE > 45
DISPLAY INVALID PAY CLASS
WHEN OTHER
MOVE EL-PAY-RATE TO RATE-SUB
COMPUTE GROSS-PAY ROUNDED = EM-HOURS-WORKED *
PAY-RATE (RATE-SUB)
END-EVALUATE.
PERFORM 220-PRINT-EMPLOYEE-LINE
END-IF.
a. Nothing, because the code has a
syntax error
b. It will display INVALID PAY CLASS
and then print the employee-line
c. It will calculate the gross-pay and
then print the employee-line
a. A-1
b. 999X
c. A+1
d. ZZ9
X Close
Back | Next
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
a. 8-16
b. 8-11
c. 12-72
d. 8-10
PIC
PIC
PIC
PIC
PIC
PIC
99.
99.
99.
X(5).
XX.
X.
a. 3
b. 4
c. 5
d. 6
PIC X(4).
PIC 99.
X Close
Back | Next
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
a. 8-11
b. 8-16
c. 12-72
a. Input-Output Section in
Environment Division
b. File Section in Data Division
c. Procedure Division, it can only be a
user-defined paragraph
d. Configuration Section in
Environment Division
a. TRUE
a. OPEN INPUT
a. TRUE
X Close
b. FALSE
b. OPEN I-O
c. OPEN EXTEND
d. OPEN OUTPUT
b. FALSE
Back | Next
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
a. 10
b. 160
c. 18
d. 32
e. Almost unlimited
a. 10
b. 160
c. 18
d. 32
e. Almost unlimited
a. YES
b. NO
a. OPEN INPUT
b. OPEN OUTPUT
c. OPEN I-O
d. OPEN INDEXED
X Close
Back | Next
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
a. START
b. SEEK
c. RERUN
d. DELETE
e. REWRITE
f. INSERT
a. READ
b. REWRITE
c. WRITE
d. DELETE
X Close
a. TRUE
b. FALSE
Back | Next
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
a. TRUE
b. FALSE
X Close
a. TRUE
b. FALSE
Back | Next
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
a. Data Division
b. Procedure Division
c. Identification Division
d. Environment Division
a. TRUE
a. TRUE
a. TRUE
a. TRUE
X Close
b. FALSE
b. FALSE
b. FALSE
b. FALSE
Back | Next
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
a. TRUE
b. FALSE
a. Evaluate statements
b. if statements
c. perform statement
d. copy statement
X Close
Back | Next
10
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
a. 11
b. 12
c. 13
d. 14
a. SEQUENTIAL
b. RANDOM
c. DYNAMIC
d. ACCESS MODE has nothing to
do with it
X Close
Back | Next
11
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
a. 15
b. 10
c. Runtime Error
d. Syntax Error
a. C=A/B
b. The remainder of B/A is stored in C
c. C=B/A
d. The remainder of A/B is stored in C
X Close
Back | Next
12
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
a. SUBTRACT A B C FROM D E F
b. SUBTRACT A B C FROM D E
GIVING F G
c. SUBTRACT A FROM D,
B FROM E, C FROM F
d. SUBTRACT A FROM B
GIVING D E F
a. All 3 files
b. Just TBLFILE
c. TBLFILE and EMPFILE
d. None will close since there is a
syntax error
b. 444
c. ABC
d. DEF
X Close
Back | Next
13
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
48. With the following data division definitions, what will num-data2 contain after
the 2 procedure statements?
working-storage section.
01 num-data1
pic s9(5)v99.
01 num-data2
pic 9(4).
procedure division.
move -21.6 to num-data1
move num-data1 to num data2
a. Undefined, since num-data2 is not
signed
b. -21.6
c. 21.6
d. 216.00
X Close
Back | Next
14
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
49. With the following data division definitions, what will num-data2 contain after
the 2 procedure statements?
working-storage section.
01 num-data1
pic s9(5)c99.
01 num-data2
pic 9(4)
procedure division.
move -12345.67 to num-data1
move num-data1 to num data2
a. Undefined, since num-data2 is
not signed
b. -1234
c. -2345
d. 1234
e. 2345
X Close
a. True
b. False
Back | Next
15
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
51. In the following code, what is the sequence of paragraphs at execution time?
PROG.
PERFORM PARA-1 THRU PARA-3
STOP RUN.
PARA-1.
DISPLAY IN PARA 1
GO TO PARA-4.
PARA-2.
DISPLAY IN PARA-2.
PARA-3.
DISPLAY IN PARA-3.
PARA-4.
DISPLAY IN PARA-4.
PARA-5.
DISPLAY IN PARA-5.
GO TO PARA-3.
a. PROG, PARA-1, PARA-2, PARA-3
b. PROG, PARA-1. PARA-4, PARA-5,
PARA-3
c. PROG, PARA-2, PARA-3
X Close
Back | Next
16
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
a. WORKING-STORAGE SECTION.
b. FILE-STATUS IS FILE-STATUS
c. FILE STATUS IS FILE-STATUS
d. FILE-STATUS IS FILE STATUS
e. None of the above
b. FILE SECTION.
c. LINKAGE SECTION.
X Close
Back | Next
17
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
a. TRUE
a. TRUE
X Close
b. FALSE
b. FALSE
Back | Next
18
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
a. TRUE
a. TRUE
a. TRUE
b. FALSE
b. FALSE
b. FALSE
b.
perform valid-record.
c. else
d.
perform invalid-record
e. end-if
X Close
Back | Next
19
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
64. When reading from an indexed file, is the following syntax valid:
move 1111 to record-key
read infile key is record-key
at end
perform end-of-file-routine
end-read
a. TRUE
b. FALSE
65. When reading sequentially from an indexed file, is the following syntax valid:
move 1111 to record-key
start infile key > record-key
invalid key
perform not-found
not invalid key
read infile next
end-start
a. TRUE
b. FALSE
X Close
Back | Next
20
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
a. TRUE
a. TRUE
a. TRUE
a. TRUE
b. FALSE
b. FALSE
b. FALSE
b. FALSE
X Close
Back | Next
21
Visual COBOL
01 Procedural COBOL
Question
Choice
a. 1,2,3,4,5
a. TRUE
X Close
Answer
b. 1,2,3,1,4,5
c. 1,4,5,2,3
d. 1,4,5,1,2,3
b. FALSE
Back | Next
22
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
a. TRUE
b. FALSE
X Close
Back | Next
23
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
X Close
Back | Next
24
Visual COBOL
01 Procedural COBOL
Question
Choice
a. TRUE
a. Valid
a. Valid
X Close
Answer
b. FALSE
b. Invalid
b. Invalid
Back | Next
25
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
a. HELLO
FRED
b. GOODBYE
JIM
c. HELLO
FRED
JIM
d. The code does not compile
82. On an indexed file MY-FILE, with the prime key CUST-NO is the following
syntax valid?
START MY-FILE KEY IS CUST-NO > 67
INVALID KEY
DISPLAY KEY NOT FOUND
NOT INVALID KEY
DISPLAY KEY OK
END-START
a. VALID
b. INVALID
83. On an indexed file MY-FILE with the prime key CUST-NO is the following
syntax valid?
READ MY-FILE NEXT KEY IS CUST-NO
INVALID KEY
DISPLAY KEY NOT FOUND
END-READ
a. VALID
b. INVALID
X Close
Back | Next
26
Visual COBOL
01 Procedural COBOL
Question
Choice
Answer
a. VALID
b. INVALID
85. On an indexed file MY-FILE with the prime key CUST-NO and alternate keys
CUST-FNAME and CUST-SNAME is the following syntax valid?
MOVE FRED TO CUST-FNAME
READ MY-FILE KEY IS CUST-FNAME
INVALID KEY
DISPLAY KEY NOT FOUND
NOT INVALID KEY
DISPLAY CUST-FNAME FOUND
END-READ
a. VALID
b. INVALID
X Close
Back | Next
27
Visual COBOL
01 Procedural COBOL
Question
Choice
a. VALID
a. $2,345.67
a. .NET IL
Answer
b. INVALID
b. $2,345.67
c. $ 2,345.67
d. -2,345.67$
b. MSIL
c. RTS
d. CLR
e. JCM
X Close
Back | Next
28
Visual COBOL
02 Object COBOL
Question
Choice
Answer
X Close
a. TRUE
b. FALSE
Back | Next
29
Visual COBOL
02 Object COBOL
Question
Choice
Answer
a. Valid
a. 01 circleObject is
CircleCalculations.
b. Invalid
b. 01 circleObject type
CircleCalculations.
c. 01 circleObject pic 999
type CircleCalculations.
d. 01 circleObject pic X(20)
type CircleCalculations.
a. Set circleObject to
CircleCalculations::New()
b. Set circleObject to type
CircleCalculations::New()
c. Invoke type
CircleCalculations::New()
Returning circleObject
d. Move
CircleCalculations::New()to
circleObject
X Close
Back | Next
30
Visual COBOL
02 Object COBOL
Question
Choice
Answer
a. A Web Form
b. A Win Form
c. A Console Application
d. Any of these
e. None of these
a. 01 data-name pic 99
property.
a. 01 data-name pic 99
property.
X Close
b. 01 data-name pic 99
property no set.
c. 01 data-name pic 99
property no get.
b. 01 data-name pic 99
property no set.
c. 01 data-name pic 99
property no get.
Back | Next
31
Visual COBOL
02 Object COBOL
Question
Choice
Answer
a. Method-ID
CalculateCircumference
static.
Linkage Section.
01 Is-radius
pic 99.
01 Is-circumfernce
pic 99999v9.
Procedure Division Using by
value Is-radius
Returning Is-circumference.
Compute Is-circumference
= 2 * 3.14 * Is-radius
Exit Method
b. Method-ID
CalculateCircumference.
Linkage Section.
01 Is-radius
pic 99.
01 Is-circumfernce
pic 99999v9.
Procedure Division Using by
value Is-radius
Returning Is-circumference.
Compute Is-circumference
= 2 * 3.14 * Is-radius
Exit Method
X Close
Back | Next
32
Visual COBOL
02 Object COBOL
Question
Choice
Answer
a. Invoke type
CircleCalculations.
CalculateArea(radius)
returning circle-area
b. Invoke type CircleCalculati
ons::CalculateArea(radius)
returning circle-area
c. Invoke CircleCalculations::
CalculateArea(radius)
returning circle-area
a. 01 Circumference
pic
999v9
property set.
b. 01 Circumference
pic
999v9
property no set.
c. 01 Circumference
999v9
property.
X Close
pic
Back | Next
33