What is the value of A in PROC1 after calling PROC2?
PROC1: PROC;
DCL A BIN FIXED(15) INIT(0);
CALL PROC2(A);
END;
PROC2: PROC(A);
DCL A BIN FIXED(15);
A = A + 1;
END;
What is the value of A after executing the following code?
DCL A CHAR(7) INIT (ABCDEFG);
DCL B CHAR(10) INIT (0123456789);
SUBSTR(A,4) = SUBSTR(B,5,3);
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 V3 CHARACTER (3);
STR.V1 = STR.V1 + 1;
STR.V2 = STR.V2 + 1;
STR.V3 = SUBSTR(STR.V3,1,1) !! ;
END SR1;
What is the difference between the following two DECLARE statements, if any?
XX: PROC;
DCL A BIN FIXED(31) STATIC INIT(0);
DCL B BIN FIXED(31) AUTOMATIC INIT(0);
END;
Given the following code, which code is NOT equivalent?
DCL A CHAR (1);
...
SELECT (A);
WHEN (A) PUT (1);
WHEN (B) PUT (2);
WHEN (C) PUT (3);
OTHER;
END;