The following code is supposed to find the earlier date between today's date and the given input date
which is input to the program in YYYYMMDD format. What happens when the program is executed?
DCL DATE JN CHAR (8);
DCL DAT E_MIN CHAR (8);
GET (DATE IN);
DATE_MIN = MIN(SUBSTR(DATETIME(), 1, 8), DATE IN);
A. The resulting value consists of 8 blanks.
B. The program ends abnormally at runtime.
C. The statement works as intended.
D. The resulting value consists or a mixing or numbers and blanks.
正解:A
質問 2:
In the following example what value will be printed to SYSPRINT, if any, from the PUT LIST in PGM_A?
PGM_A PROC;
DCL INPARM CHAR (10) INIT('FIRST CALL);
DCL P_OUT PTR;
DCL OUTPARM CHAR(10) BASED (P_OUT);
DCL PGM_B ENTRY(CHAR(10),PTR) EXTERNAL:
CALL P0MB (INPARM,P OUT);
IF OUTPARM = 'RESULT 'THEN
DO;
INPARM = ";
CALL PGM_B (INPARM,P_OUT);
END;
PUT LIST(OUTPARM);
END;
PGM_B: PROC(INPARMP_OUT);
DCL INPARM CHAR (10);
DCL P_OUT PTR;
DCL OUTPARM CHAR (10) INIT(");
P_OUT = ADDR(OUTPARM);
IF INPARM ='FIRST CALL THEN
OUTPARM = 'RESULT ';
ELSE
OUTPARM = 'NO RESULT';
END;
A. Blanks
B. 'NO RESULT'
C. Unpredictable
D. 'RESULT'
正解:C
質問 3:
Assuming there is no information about the duration or each table update and the programs are running in
a multitasking environment, which of the following options will best minimize the chance for deadlocks?
A. Programs update table A, Table B and Table C in random order.
B. Program A updates Table A, Table B and Table C in the specified order, and Program B updates Table
C, Table B and Table A in the specified order.
C. All programs update Table A, Table B and Table C in the same order.
D. Program A updates Table A, Table B and Table C in the specified order, and Program B updates Table
B, Table C and Table A in the specified order.
正解:C
質問 4:
Given the following code, which set of statements will insert the new element into the doublylinked list
after the element pointed to by P?
DCL1X BASED,
2 FORWARD POINTER,
2 BACKWARD POINTER,
2 DATA FIXED BIN (31);
ALLOC X SET(Q);
A. Q->FORWARD = P;
Q->BACKWARD = P->BACKWARD;
P->FORWARD = Q
P->BACKWARD = Q;
B. Q->FORWARD = P-> FORWARD;
Q->BACKWARD = P;
P->FORWARD->BACKWARD = P;
P->FORWARD = Q;
C. Q->FORWARD = P->FORWARD;
Q->BACKWARD = P;
P->FORWARD = Q;
P->FORWARD->BACKWARD = Q;
D. P->FORWARD->BACKWARD = Q;
P->FORWARD = Q;
Q->FORWARD = P->FORWARD;
Q->BACKWARD = P;
正解:B
質問 5:
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 and B are in STACK, C in HEAP
B. A in STACK, B in STATIC, C in HEAP
C. A in STACK, B and C are in HEAP
D. A in HEAP, Band C are in STACK
正解:A
質問 6:
Program A calls program B with PC as a parameter defined BIN FIXED (31 .0). Program B sets PC as
follows:
0 OK
4 WARNING
8 ERROR
Which of the following is the most appropriate statement for testing the PC variable?
A. IF (RC ^= 0) & (RC ^= 4) THEN PUT SKIP LIST('ERROR IN B');
ELSE IF RC> 8 THEN PUT SKIP LIST('UNKNOWN VALUE FROM B);
B. SELECT (RC);
WHEN (0, 4);
OTHERWISE
PUT SKIP LIST('UNKNOWN VALUE FROM B');
END;
C. SELECT (RC); WHEN (0,4); WHEN (8) PUT SKIP LIST ('ERROR IN B');
OTHERWISE PUT SKIP LIST('UNKNOWN VALUE FROM B');
END;
D. IF (RC >4) THEN PUT SKIP LIST('ERROR IN B');
ELSE PUT SKIP LIST('UNKNOWN VALUE FROM B');
正解:C
質問 7:
If the PROC name is less than 8 characters, what ENTRY point should be specified for a PL/I routine
which will be FETCHed?
A. The PROC name followed by a '1'
B. The PROC name
C. CEESTART L
D. PLISTART
正解:B
質問 8:
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(NOLAXLEVEL1)
B. RULES(NDLAXQUAL)
C. RULES(NOLAXSTRUCT)
D. PULES(NOLAXDOT)
正解:B
Yoshioka -
C9050-042の問題集は明確でわかりやすかったです。そしてきのう試験に受かりました。前にもPass4TestにC2040-986とかC2040-985を買って全部合格したもん。