CORRECT TEXT
What happens after the following code is executed?
DCL A CHAR(5) lNlT('ABCDE'); DCL B CHAR(4) DEF A POS(2);
A. The value of B is 'ABCD'
B. The value of B is 'BCDE'
C. The value of B is NULL.
D. There is a syntax error.
正解:B
質問 2:
CORRECT TEXT
What is the result of executing the following code?
DCL A CHARACTER (4) INIT('10.5');
DCL B DEC FIXED(71) INIT(10.5);
B = A + B;
A. CONVERSION is raised.
B. No condition is raised and the value of B is 20.5
C. ERROR is raised.
D. No condition is raised and the value of B is 21.
正解:B
質問 3:
CORRECT TEXT
Which of the following is a BIT string constant?
A. 1000
B. '1000'B
C. 1000B
D. '1000'
正解:B
質問 4:
CORRECT TEXT
If the physical dataset referred to by DDOUT has a maximum record length of 196 and a
RECFM=V, what happens after executing the following code?
DCL DDOUT FILE RECORD OUTPUT;
DCL OUT_CHAR CHAR(500) VARYING INIT((220)' ');
OPEN FILE(DDOUT);
WRITE FILE(DDOUT) FROM(OUT_CHAR);
A. An error will occur because of mismatch of record length.
B. One record with a length of 220 will be written to the output file.
C. One record with a length of 196 will be written to the output file.
D. One record with a length of 500 will be written to the output file.
正解:A
質問 5:
CORRECT TEXT
What code will print the value of A to SYSPRINT? DCLA DEC FIXED(5,3) INIT(12.0);
A. PUT SKIP LIST('Value of A is:'), (A);
B. PUT SKIP LIST('Value of A is:')(A);
C. PUT SKIP LIST('Value of A is:' !! A);
D. PUT SKIP LISTA;
正解:C
質問 6:
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
質問 7:
CORRECT TEXT
Given the following code, what will be output?
PGM1: PROC OPTIONS(MAIN);
DCL (K,L) BIN FIXED (15);
I,J,K,L= 1;
CALL SRI;
CALL SRJ;
CALL SRK;
CALL SRL;
PUT SKIP LIST(I*J*K*L);
SRI: PROC;I = 2; END;
SRJ: PROC; DCL J BIN FIXED(15); J = 3; END;
SRK: PROC;K = 5; END;
SRL: PROC; DCL L BIN FIXED(15); L = 7; END;
END;
A. 210
B. 21
C. 1
D. 10
正解:D
質問 8:
CORRECT TEXT
What value will be output when the following code is executed?
TEST: PROC OPTIONS(MAIN);
DCLA(*) CONTROLLED FIXED BIN(31);
ALLOC A(10);
CALL SUB(A); PUT SKIP LIST( HBOUND(A,1));
SUB: PROC( B);
DCL B(*) CONTROLLED FIXED BIN(31);
ALLOC B(2*HBOUND (B,1));
ALLOC B( 2*HBOUND(B,1)); END;
END;
A. 40
B. 20
C. 10
D. 30
正解:A