Topic 1, A
What is the value of B after executing the following code?
DCL A CHAR(10) INIT('12A4BABCAB');
DCL B BIN FIXED(31) INIT(0);
B = INDEX(A, 'AB');
If the physical dataset referred to by DDIN has a record length of 200 and a RECFM of F, what
happens after executing the following code?
DCL DDIN FILE RECORD INPUT;
DCL 1 INSTR,
2 A CHAR(150),
2 B CHAR(150);
READ FILE(DDIN) INTO(INSTR);
A. When executed, one record wil be read into buffer.
B. At runtime, an error wil occur because of mismatch of record length.
C. At compile time, an error wil occur because of mismatch of record length.
D. When executed, nothing will be read into the buffer.
What is the result, if any, of executing the following code?
DCL B DEC FIXED(15, 3) INIT(12345.12);
DCL C PIC '9999999999' INIT (0);
C = B;
A. There is no result, because B contains a decimal point.
B. There is no result, because DEC FIXED cannot be assigned to PIC.
C. The result in C is 12345 with 5 leading zeroes.
D. The result in C is 1234512 with 3 leading zeroes.