CORRECT TEXT
What is the result, if any, of executing the following code?
DCL B DEC FIXED(15,3) INIT(12345.12);
DCL C PlC '9999999999' INIT (0);
C = B;
A. The result in C is 1234512 with 3 leading zeroes.
B. There is no result, because DEC FIXED cannot be assigned to PlC.
C. The result in C is
12345 with 5 leading zeroes.
D. There is no result, because B contains a decimal point.
正解:C
質問 2:
CORRECT TEXT
Which of the following describes when a program is NOT FETCHABLE?
A. When the main program need not be recompiled to reflect the changes made in the called program
B. When two main programs referring to the called program at the same time cannot have
different versions of the called program
C. When the called program will be loaded from the library at execution time
D. When the called program is part of the main program in the load module
正解:D
質問 3:
CORRECT TEXT
If the physical dataset referred to by DDIN has a record length of 200 and a RECFM of F, what happens after executing the following code?
DCL DDIN FILE RECORD INPUT;
DCL P PTR;
DCL 1 INSTR BASED(P),
2 A CHAR(100),
2 B CHAR(100);
ALLOCATE INSTR;
OPEN FILE(DDIN);
READ FILE(DDIN) INTO(INSTR);
A. One record
will be read into the structure INSTR.
B. Program will abend because P has not been properly initialized.
C. READ INTO cannot be used on a BASED structure.
D. One record will be read into the buffer and the pointer will be set accordingly.
正解:A
質問 4:
CORRECT TEXT
Given the following code, how many elements of A will contain a value of 0 after execution of the
loops?
DOL A DIM (8, 10) FIXED BIN (31);
DCL(I, K) FIXED BIN (31) INIT (0);
A = 0;
DO I = 2 TO 8;
DO K = 1 TO 10;
A(I, K) = l*K;
END;
END;
A. 0
B. 1
C. 10
D. 6
正解:C
質問 5:
CORRECT TEXT
Which of the following pieces of code will result in a compiler error message?
A. ON ENDFILE (SYSIN)
BEGIN;
PUT LIST('End of file reached.');
EOF = '15;
END;
B. IF EOF THEN
BEGIN;
K = 0;
L = 1;
END;
C. IF EOF THEN
DO;
K = 0;
L = 1;
END;
D. ON ENDFILE (SYSIN)
DO;
PUT LIST('End of file reached.');
EOF = '1'B;
END;
正解:D
質問 6:
CORRECT TEXT
Given the following declarations, which code is always a valid way to test if the value of B is 7?
DCL P POINTER NIT (NULL());
DCL B FIXED BIN (31) BASED (P);
A. IF P ^= NULL() ! B = 7
THEN PUT ('OK');
B. IF ^ = NULL() THEN IF B = 7 THEN
PUT ('OK');
C. IF B = 7
THEN PUT ('OK');
D. IF B ^ = 7 THEN; ELSE
PUT ('OK');
正解:B
質問 7:
CORRECT TEXT
Given the following code, what value will be output?
TEST: PROC OPTIONS(MAIN);
DCL
P POINTER,
N1 FIXED BIN(31),
1 A BASED(P),
2 A1 FIXED BIN(3i),
2 A2 FIXED BIN(3i),
2 A3 FIXED BIN(3i),
2 A4( N1 REFER(A3)) CHAR(10) VAR;
N1 = 5;
ALLOC A;
PUT SKIP LIST( STG(A)); END;
A. 72
B. 62
C. 22
D. 24
正解:A
質問 8:
CORRECT TEXT
What is the value of B after executing the following code?
DCL A CHAR(10) INIT('12A4BABCAB'); DCL B BIN FIXED(31) INIT(0); B = INDEX(A,'AB');
A. 3
B. 9
C. 6
D. 2
正解:C