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),
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?
A. Pass the 20 variables individually in the parameter list.
B. Integrate the 20 variables in one structure and pass the address of the structure in the parameter list.
C. Declare the 20 variables EXTERNAL in both the calling program and in the procedure called and pass no variable in the parameter list.
D. Integrate the 10 variables belonging to the input file in one structure and the 10 variables belonging to the output file in another one and pass the addresses of them as parameters to the procedure.
What does it mean that an interface is synchronous?
A. Requesting program must wait for a reply
B. Requesting program always receives immediate response
C. Requests are processed randomly
D. Requests are processed in parallel
Given the following code, which statement will produce an E level preprocessor message?
%DCL ABC ENTRY;
%ABC: PROC (X,Y) STATEMENT RETURNS(CHAR); DCL(XY) CHAR; IF ^PARMSET(X) THEN NOTE
('NO X `,0);
IF ^PARMSET(Y) THEN NOTE('NO Y `8');
RETURN('/* `!!X!!YI!'C */');
%END ABC;
A. ABC Y(B)X(A);
B. ABC (A,);
C. ABC (A,B);
D. ABC(,B);
Given the following code example, what is the value of A after the last CALL to ADD_RUT? PGM2: PROC
OPTIONS(MAIN,REENTRANT) REORDER;
DCL A BIN FIXED (15);
A =1
CALL ADD_RUT (A);
CALL ADD_RUT (A);
CALL ADD_RUT (A);
ADD_RUT: PROC (VAL);
DCL VAL DEC FIXED (15);
VAL = VAL + 1;
END ADD_RUT;
END PGM2;
A. 4
B. 3
C. 2
D. 1
Which of the following compiler options should be checked first when addressing performance issues in a PL/I program?
A. RENT and MAXMEM
B. ARCH and MAXSTMT
C. OPT and DEFAULT
D. ATTRIBUTES and LIST
A programmer has submitted the following declaration for review. What feedback should be provided to
the programmer?
DCL 1 A,
2 B DIM (1000) FIXED BIN (31) INIT (0),
2 C DIM (1000) FIXED BIN (15) INIT (0);
A. The code is good as written.
B. A is incorrectly initialized and the code must be changed.
C. Discuss with the programmer how many elements of the arrays need to be initialized.
D. The declaration of A should be changed because the current declaration contains padding bytes.
Which of the following statements is best for avoiding synchronously updating a resource?
A. Have only program A update the resource without using ENQ.
B. Have all programs use ENQ and WAIT for a specific resource.
C. Lock the entire resource at start of program and release at end of program.
D. Have several programs update the resource without using ENQ.
A module which is serially reusable has which of the following characteristics?
A. Is intended for single use only and must be refreshed from disk before it can be invoked again
B. Must contain the necessary logic to reset control variables and data areas at entry or exit and a second task may not enter the module until the first task has finished
C. Is designed for concurrent execution by multiple tasks
D. All or part of it may be replaced at any time by the operating system
Given the following statements, where will the variables A, B and C be allocated?
DCL A FIXED;
DCL B CHAR(80) BASED(P);
DCL C CHAR(1000) CONTROLLED;
DCL D AREA(1000);
DCL P PTR STATIC;
ALLOC C;
ALLOC B IN(D);
A. A in STACK, B and C are in HEAP
B. A in HEAP, Band C are in STACK
C. A and B are in STACK, C in HEAP
D. A in STACK, B in STATIC, C in HEAP