CORRECT TEXT
Given the following code, what will happen if the variable MAX has a value larger than 32767?
DCLI FIXED BIN (15);
DCL MAX FIXED BIN (31);
DO I = 1 TO MAX;
A. The loop will stop executing with an ABEND or run infinitely.
B. The loop will stop executing when I reaches a value equivalent to MAX + 1.
C. The loop will stop executing when I reaches a value of 32767.
D. The loop will stop executing when I reaches the value in MAX.
正解:A
質問 2:
CORRECT TEXT
In which of the following situations can a subroutine be replaced by a function without any major changes to the code?
A. When the subroutine changes more than one parameter
B. When the subroutine changes a structure parameter
C. When the subroutine changes an array parameter
D. When the subroutine changes only one scalar parameter
正解:D
質問 3:
CORRECT TEXT
What should be done, if anything, when the following compiler message appears?
Multiple closure of blocks, one extra END statement assumed.
A. Nothing needs to be done.
B. Take out the extra END statement.
C. PUT an extra END statement at the end of the program.
D. Find the missing END statement and add it at the right place.
正解:D
質問 4:
CORRECT TEXT
Under default condition enablement, what is the result of executing the following code?
DCLX CHAR(5) INIT('A1234');
DCL Y PlC '9999' INIT(0);
Y = X;
A. The value of Y is 1234.
B. STRINGSIZE would be raised.
C. CONVERSION would be raised.
D. The value of Y is A 123.
正解:C
質問 5:
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
質問 6:
CORRECT TEXT
Which of the following will be achieved when making a program FETCHABLE?
A. Easier maintenance
B. Larger load size of the main program
C. Improved performance
D. Reduced memory requirements for the FETCHed program
正解:A
質問 7:
CORRECT TEXT
Given the following code, what can be said about the scope of the variables in procedure P?
P: PROCEDURE;
B: BEGIN;
DCL K FIXED BIN (15);
END B;
D: DO;
DCL S CHAR (10);
END D;
END P;
A. Variable S is not known in block B.
B. Variable K is known in group
C. Variable K is known in the entire procedure.
D. Variable S is known in the entire procedure.
正解:D
質問 8:
CORRECT TEXT
Which is the most appropriate code to turn all of the bits in A ON?
DCL A BIT(8);
A. A = 255;
B. A = 11111111B;
C. A = '11111111'B;
D. A = -1;
正解:C