CORRECT TEXT
Given the following external subroutine, what ENTRY declaration must NOT be used in a program that calls the subroutine?
SR1: PROC (STR);
DCL SUBSTR BUILTIN;
DCL
1 STR,
3 V1 DEC FIXED (3),
3 V2 BIN FIXED (31),
3 VS CHARACTER (3);
STR.V1 =STR.V1 +1;
STRV2 = STR.V2 + 1;
STR.V3 = SUBSTR(STR.V3,1.1)!!' ';
END SR1;
CORRECT TEXT
Given the following piece of code, which loop construct using WHILE or UNTIL will give identical output?
DCLI FIXED BIN (31);
DO I = 10 TO 1 BY - 1;
PUT (I);
END;
CORRECT TEXT
Which is the most appropriate data type declaration for the variable A in the following expression, if A is used as a counter?
A = A + 1;
CORRECT TEXT
What would be printed to SYSPRINT after executing the following code?
DCL A DEC FIXED(15,3) INIT(1000.123);
DCL B PlC 'ZZZZ9V.999' INIT(0);
B = A + 2000.123;
UT SKIP LIST('THE VALUE OF B IS:'!! B);
CORRECT TEXT
If the physical dataset referred to by DDOUT has a maximum record length of 200 and RECFM=V,
what happens alter executing the following code?
DCL DDOUT FILE RECORD OUTPUT;
DCLI BIN FIXED(15) INIT(0);
DCL 1 OUTSTR,
2 A CF-IAR(150),
2 B CI-IAR(46);
OPEN FILE(DDOUT);
DO It 1 TO 10;
WRITE FILE(DDOUT) FROM(OUTSTR);
END;
CORRECT TEXT
If the following syntax is incorrect, how should the syntax be changed?
READ FILE(DDIN) IN STRUC1;
CORRECT TEXT
What has to be done, if anything, when the compiler warns that a variable may be uninitialized when used?