1.
What is the value of B after executing the following code?
DCL A CHAR(10) INIT(123abCDEFG);
DCL B BIN FIXED(31) INIT(5);
B = INDEX(A,AB);
2.
Which of the following is NOT mandatory for an external function procedure and its usage?
3.
Given the following code, which SIGNAL statement would cause a new page starting with the line 'header text' to be written to file X?
DCL X FILE STREAM PRINT OUTPUT;
ON ENDPAGE(X) PUT SKIP FILE(X) LIST(header text);
4.
Which of the following builtins is the only one that returns a value?
5.
When different data types are used in an expression, which of the following conversions is NOT done by subroutine call?
6.
Given the following declarations, which code would assign 1234561.23 to A?
DCL A DEC FIXED (15,3) INIT (123456.123);
DCL B BIN FIXED (15) INIT (10);
7.
What is the result of executing the following code?
DCL B PIC 99999;
B = 4500;
8.
Which of the following should be the first statement in an ON ERROR block?
9.
What is the result, if any, of executing the following code?
DCL A BIT(1) INIT(0B);
DCL B BIT(1) INIT(0B);
DCL C BIT(1) INIT(1B);
A = B = C;
10.
Given the following code, what will be the output of the preprocessor?
%DCL FLAG CHAR;
%Flag = TEST,OPT';
%DCL FUN ENTRY; FUN(Flag)
%FUN: PROC (S);
DCL S CHAR;
IF INDEX(S, TEST) > 0 THEN
ANSWER (put (Test modus entered);) SKIP;
IF INDEX(S, OPT) > 0 THEN ANSWER (put (Optimize modus entered);) SKIP;
%END FUN;