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.
What happens to AUTOMATIC variables when a procedure is called recursively?
A. The values from the previous invocation are lost.
B. The values from the previous invocation are saved and are available to the new invocation.
C. The values from previous invocations are preserved but can be overwritten in the new invocation.
D. The values from the previous invocation are saved and are available when the current invocation ends.
Given the following code, which condition would be raised first (if ENABLED)?
DCL A(50000) CHAR (8);
DCL I BIN FIXED (31);
DCL J BIN FIXED (15);
DCI = 1 TO 100_000;
J = I;
A(J) = I;
END;
A. SIZE
B. FIXEDOVERFLOW
C. SUBSCRIPTRANGE
D. CONVERSION
An online, non-conversational main program (for CICS or IMS) contains all of the logic for a one- screen (MAP or FORMAT) application. Which of the following will NOT be required?
A. Code that opens all needed databases
B. Code which does all necessary initializations
C. Code which determines the situation to be applied for the current program execution
D. Code for each situation
The Senior Vice President of the organization is onsite for a one day visit. She has asked for a meeting with the team lead to understand the status of the project. Which of the following is the most appropriate action for the team lead to take?
A. Walk her through the functional specification for the application
B. Show her the most important APIs that have been defined
C. Show the requirements specification as a way for her to understand the project
D. Take her through the project plan
Given the following declaration, which code does NOT initialize C completely?
DCL 1 A,
2 B DIM (0:9),
3 C DIM (5) FIXED BIN (31),
3 D CHAR (100) VAR;
A. 3 C DIM (5) FIXED BIN (31) INIT ((50)1),
B. 3 C DIM (5) FIXED BIN (31) INIT ((5)1,(*)2),
C. 3 C DIM (5) FIXED BIN (31) INIT ((HSOUND(C,1))( 0)),
D. 3 C DIM (5) FIXED BIN (31) INIT ((*)1),
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 = QP->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;
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
Given the following pseudocode inside a loop, where should the COMMIT action be placed assuming that there is always a one-to-many relationship between header and detail tables? 1 Find header row 2 IF found 3 Update header row 4 Find detail row 5 IF found THEN 6 Update detail rows 7 ELSE 8 ENDIF 9 ENDIF
A. Afterline 3
B. Afterline 6
C. Afterline 8
D. After lines 3, 8, and 9
Given the lollowing declarations, what statement will raise STRINGSIZE condition if enabled? DCLA_STR
CHAR (100) VARYING;
DCLB_STR CHAR(10) STATIC;
DCL C_STR CHAR (100);
A. A_STR = B_STR;
B. C_STR = B_STR;
C. SUBSTR(C_STR, 92) = B_STR;
D. C_STR = A_STR;