Given the following declarations, a list of 100 elements must be created so that the element created last
can be accessed as the first element of the list. A new element is always inserted in front of the element
created before. The variable NEXT in the last element should contain the value NULL. Which of the
following pieces of code implements this?
DCL 1 NODE BASED (ANCHOR).
2 NEXT POINTER,
2 DATA FIXED BIN(31);
DCL ANCHOR POINTER;
DCL P POINTER INIT (NULL());
DCL I FIXED BIN(31);
A. DO I = 1 TO 100; ALLOCATE NODE; NODE.DATA = I; NODE.NEXT = P; P = ANCHOR; END;
B. I = 1 TO 100; ALLOCATE NODE; NODE.DATA = I; NODE.NEXT = P; ANCHOR = P; END;
C. DO I = 1 TO 100; NODE.DATA = I; NODE.NEXT = P; ALLOCATE NODE; P = ANCHOR; END;
D. DO I = 1 TO 100; P = ANCHOR; ALLOCATE NODE; NOTE.DATA = I; NODE.NEXT = P; END;
正解:A
質問 2:
Which of the following techniques, if any, can be used to parallelize a PL/I program?
A. Attach threads to pieces or work that are independent from othersB.Attach a thread to every subroutine
in the program.
B. Parallelization is not possible in PL/I program.
C. Attach a thread to every external entry in the program.
正解:A
質問 3:
Given the following declarations, which code is likely to perform best and correctly initialize structure 3?
DCL 1 S UNALIGNED, 2 A CHAR(3), 2 B BIN FIXED(31), 2 C DEC FIXED(5); DCL 1 T UNALIGNED
LIKE S; T = ";
A. CALL PLIFILL(ADDR(S),'',STG(S));
B. CALL PLIMOVE(ADDR(S),ADDR(T),STG(S));
C. S = ";
D. S = T,BY NAME;
正解:B
質問 4:
The following coding standards are enforced at a programming shop:
* All procedures must include a comment describing its function
* All automatic variables must be explicitly initialized when declared * No nested IF statements (implement
as SELECT)
Considering the following code, how many coding standard violations exist?
CALL P1(1);
/* ------- proc p1------- */
P1: PROC(l);
DCL I BIN FIXED(31);
DCL (J,K) BIN FIXED(31) INIT(0);
IF I = 1
THEN IF J = 2
THEN K = 3;
ELSE K = 4;
ELSE K = 5;
END;
A. 4
B. 1
C. 3
D. 2
正解:D
質問 5:
Given the following declaration, what declaration of B would cause the structure Ato be invalid?
DCL K FIXED BIN (31) VALUE (10);
DCL P POINTER;
DCL 1 A BASED (P),
2 B FIXED BIN(31),
2 C DIM (K REFER (B)),
3 D FIXED BIN(31),
3 E CHAR (4);
ALLOCATE A;
A. 2B FIXED BIN (31),
B. 2B FIXED BIN (31) INIT (K),
C. 2B FIXED BIN(31) INIT (10),
D. 2B FIXED BIN(31) INIT (20),
正解:D
質問 6:
Which of the following compiler options should be checked first when addressing performance issues in a
PL/I program?
A. OPT and DEFAULT
B. RENT and MAXMEM
C. ARCH and MAXSTMT
D. ATTRIBUTES and LIST
正解:A
質問 7:
Which of the following is the most appropriate reason to explicitly use COMMIT or ROLLBACK?
A. A batch program performs mass deletions where all deleted rows are independent from each other.
B. The program abends.
C. An online program updates DB2 and IMS objects.
D. The program calls unknown subroutines.
正解:A
778 お客様のコメント





Yoshikawa -
購入して約一週間の準備期間で合格しました。模擬テストは本番とレベルと形式とも直結しているので安心して学習できます。助かりました。ありがとうございました。