Given the following pseudocode example, at which label should an unconditional COMMIT be placed assuming there is a one-to-many relationship between FIL01 and FIL02 and FlL01 contains several thousand records? Read record from file FIL01
A. DO while there are records in FIL01IF record in FIL01 specifies update THENDO for all records matching in FIL02Update record in FIL02 with information from FIL01 end DO
B. end IF
C. Read next record in FIL01
D. end DO
E. A
F. B
G. C
H. D
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);
Which of the following actions will NOT help increase the maintainability of a program?
A. Proper commenting for each piece of functionality
B. Consolidating redundant code
C. Deleting dead code
D. Replacing subroutines with functions
Which compiler option causes the compiler to flag any reference to structure members that are not level 1 and are not dot qualified?
A. RULES(NDLAXQUAL)
B. RULES(NOLAXSTRUCT)
C. PULES(NOLAXDOT)
D. RULES(NOLAXLEVEL1)
A program reads an input file into a structure with 20 fields. Fifteen of these are required as parameters in an external procedure. Which of the following is the most efficient way of passing these parameters?
A. Pass 15 variables in a parameter list.
B. Pass the address of the input structure as one argument.
C. Create a structure, assign the 15 variables to it and pass it as one argument.
D. Create a structure, assign the 15 variables to it and pass the address of it in one argument.
In the following example how many lines, if any, will be printed?
GRAPH: PROC OPTIONS(MAIN);
DCL I FIXED BIN (31);
DCL POINTS FIXED BIN (31);
CALL INIT_POINTS;
DO I = 1 TO 100;
GET LIST(POINTS);
CALL PLOT_NEXT(POINTS);
END;
INIT_POINTS: PROC;
DCL I FIXED BIN (31);
DCL POINTS(1000) FIXED BIN (31);
DCL BAR CHAR (100) INIT((100)'*') STATIC;
DO I 1 TO 10;
POINTS(I) = I;
PUT SKIP LIST (POINTS(I),SUBSTR(BAR,1,I));
END;
RETURN;
PLOT_NEXT: ENTRY(I);
POINTS(I) = I;
PUT SKIP LIST(POINTS(I),SUBSTR(BAR,1 I));
END;
END GRAPH;
A. 10
B. 100
C. 110
D. It is unpredictable as the program will fail.
Which of the following structures will NOT contain padding bytes if the PL/I default for alignment is applied?
A. DCL 1 A,2 B FLOAT DEC (16),2 C FLOAT DEC (5,2),2 D CHAR (3),2 E FIXED BIN (31),2 F FLOAT DEC (16);
B. DCL 1 A,2 B FLOAT DEC (16),2 F FLOAT DEC (16),2 E FIXED BIN (31),2 C FIXED DEC (5,2),2 D CHAR (3);
C. DCL 1 A,2 E FIXED BIN (31),2 C FIXED DEC (5,2),2 B FLOAT DEC (16),2 F FLOAT DEC (16),2 D CHAR (3);
D. DCL 1 A,2 B FLOAT DEC (16),2 F FLOAT DEC (16),2 C FIXED DEC (5,2),2 E FIXED BIN (31),2 D CHAR (3);
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.
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 others
B. Attach a thread to every subroutine in the program.
C. Attach a thread to every external entry in the program.
D. Parallelization is not possible in PL/I program.
In the following example, what value will be written to SYSPRINT, if anything, by the PUT statement in
PGM_A?
PGM_A: PROC;
DCL INPARM CHAR (12) INIT('FIRST CALL? `);
DCL P_OUT PTR;
DCL OUTPARM CHAR (10) BASED (P_OUT);
DCL PGM_B ENTRY (CHAR(12),PTR) EXTEPNAL;
CALL PGM_B (INPARM,P_OUT);
IF OUTPARM = `YES' THEN
DO;
INPARM = `FOLLOW ON';
CALL PGM_B (INPARM,P_OUT);
END;
ELSE
DO;
INPARM = `NORMAL CALL';
CALL PGM_B (INPARM,P_OUT);
END;
PUT SKIP LIST(OUTPARM);
END;
PGM_B: PROC(INPARM,P_OUT);
DCL INPARM CHAR (12);
DCL P_OUT PTR;
DCL OUTPARM CHAR (12) STATIC INIT(");
P_OUT = ADDR(OUTPARM);
IF INPARM = `FIRST CALL? ` THEN
OUTPARM = `YES'; ELSE
IF OUTPARM = " THEN
OUTPARM = `FIRST CALL';
END;
A. `FIRST CALL'
B. `YES'
C. blanks
D. The results are unpredictable.