최신IBM Developing with IBM Enterprise PL/I - C9050-042무료샘플문제
문제1
Given the following code, what measure will NOT improve stability?
S1: PROC (X,Y,Z);
DCL X DEC FIXED (5);
DCL Y PlC '99999';
DCL Z DEC FIXED (5);
Z = X + Y;
END;
Given the following code, what measure will NOT improve stability?
S1: PROC (X,Y,Z);
DCL X DEC FIXED (5);
DCL Y PlC '99999';
DCL Z DEC FIXED (5);
Z = X + Y;
END;
정답: A
문제2
Prerequisite:
A sorted input dataset with record length 100 contains at least one record for each of the values '1', '2', '3'
in the first byte. The applied sort criteria is 1,100,ch,a.
Requirements:
1 .) All records with '1' in the first byte must be ignored.
2 .) All records with '2' in the first byte must be written to the output dataset.
3 .) If there is a '3' in the first byte, the read iteration must be left.
4 .) The program must not abend or loop infinitely.
If the code below does not fulfill the specifications provided above, which of the following is the most likely
reason?
DCL DDIN FILE RECORD INPUT;
DCL DDOUT FILE RECORD OUTPUT;
DCL 1 INSTRUC,
3 A CHAR(1),
3 * CHAR(99);
DCL EOF_IN BIT(1) INIT('0'B);
DCL (Z1,Z2,Z3,ZO) BIN FIXED(31) INIT(0);
ON ENDFILE(DDIN) EOF_IN = '1'B;
READ FILE(DDIN) INTO (INSTRUC);
LOOP: DO WHILE (^EOF_IN);
SELECT(INSTRUC.A);
WHEN('1') DO;
Z1 +-= Z1;
ITERATE LOOP;
END;
WHEN('3') DO;
Z3 = Z3+1;
LEAVE LOOP;
END;
WHEN('2') DO;
Z2 = Z2+1;
WRITE FILE(DDOUT) FROM(INSTRUC);
END;
OTHER DO;
ZO = ZO+1;
PUT SKIP LIST(INSTRUC.A);
END;
END;/*select*/
READ FILE(DDIN) INTO(INSTRUC);
END ;/*loop*/
Prerequisite:
A sorted input dataset with record length 100 contains at least one record for each of the values '1', '2', '3'
in the first byte. The applied sort criteria is 1,100,ch,a.
Requirements:
1 .) All records with '1' in the first byte must be ignored.
2 .) All records with '2' in the first byte must be written to the output dataset.
3 .) If there is a '3' in the first byte, the read iteration must be left.
4 .) The program must not abend or loop infinitely.
If the code below does not fulfill the specifications provided above, which of the following is the most likely
reason?
DCL DDIN FILE RECORD INPUT;
DCL DDOUT FILE RECORD OUTPUT;
DCL 1 INSTRUC,
3 A CHAR(1),
3 * CHAR(99);
DCL EOF_IN BIT(1) INIT('0'B);
DCL (Z1,Z2,Z3,ZO) BIN FIXED(31) INIT(0);
ON ENDFILE(DDIN) EOF_IN = '1'B;
READ FILE(DDIN) INTO (INSTRUC);
LOOP: DO WHILE (^EOF_IN);
SELECT(INSTRUC.A);
WHEN('1') DO;
Z1 +-= Z1;
ITERATE LOOP;
END;
WHEN('3') DO;
Z3 = Z3+1;
LEAVE LOOP;
END;
WHEN('2') DO;
Z2 = Z2+1;
WRITE FILE(DDOUT) FROM(INSTRUC);
END;
OTHER DO;
ZO = ZO+1;
PUT SKIP LIST(INSTRUC.A);
END;
END;/*select*/
READ FILE(DDIN) INTO(INSTRUC);
END ;/*loop*/
정답: B
문제3
What would the attribute table in a compile list be used for when looking at the variable in a dump?
What would the attribute table in a compile list be used for when looking at the variable in a dump?
정답: D
문제4
An external subroutine procedure requires 10 variables belonging to an input file and 10 variables
belonging to an output file. What is best practice in passing these variables to the procedure?
An external subroutine procedure requires 10 variables belonging to an input file and 10 variables
belonging to an output file. What is best practice in passing these variables to the procedure?
정답: D
문제5
What is a program specification document?
What is a program specification document?
정답: B
문제6
Given the following (incomplete) code, how is Q to be declared in order to allocate X in A?
DCL A AREA;
DCL Q ...
DCL X FIXED BIN (31) BASED (Q);
ALLOCATE X;
Given the following (incomplete) code, how is Q to be declared in order to allocate X in A?
DCL A AREA;
DCL Q ...
DCL X FIXED BIN (31) BASED (Q);
ALLOCATE X;
정답: B