Issuu on Google+

http://www.TwPass.com

000-041 IBM Programming with IBM Enterprise PL/I

http://www.twpass.com/twpass.com/exam.aspx?eCode= 000-041

The 000-041 practice exam is written and formatted by Certified Senior IT Professionals working in today's prospering companies and data centers all over the world! The 000-041 Practice Test covers all the exam topics and objectives and will prepare you for success quickly and efficiently. The 000-041 exam is very challenging, but with our 000-041 questions and answers practice exam, you can feel confident in obtaining your success on the 000-041 exam on your FIRST TRY! IBM 000-041 Exam Features - Detailed questions and answers for 000-041 exam - Try a demo before buying any IBM exam - 000-041 questions and answers, updated regularly - Verified 000-041 answers by Experts and bear almost 100% accuracy - 000-041 tested and verified before publishing - 000-041 exam questions with exhibits - 000-041 same questions as real exam with multiple choice options Acquiring IBM certifications are becoming a huge task in the field of I.T. More over these exams like 000-041 exam are now continuously updating and accepting this challenge is itself a task. This 000-041 test is an important part of IBM certifications. We have the resources to prepare you for this. The 000-041 exam is essential and core part of IBM certifications and once you clear the exam you will be able to solve the real life problems yourself.Want to take advantage of the Real 000-041 Test and save time and money while developing your skills to pass your IBM 000-041 Exam? Let us help you climb that ladder of success and pass your 000-041 now!


000-041

QUESTION: 1 What is the result, if any, of executing the following code? DCL A BIT(1) INIT(‘0’B); DCL B BIT(1) INIT(‘0’B); DCL C BIT(1) lNlT(’1’B); A = B ! C; A. The value of A is ‘0’B B. The value of A is’1’ B. C. The value of A is unpredictable. D. There is no result, because the syntax is wrong. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=1 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 2 What does BX.WOK.LOAD refer to in the following job control statement? I/ACCOUNT DD DSN=BX.WOK.LOAD,DISP=SHR

A. It is the connection between program and dataset. B. It is the physical dataset name. C. It is the logical dataset name. D. It is the name which must be referred to in the program. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=2 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 3 What will be printed when the following subroutine is called for the third time? A: PROC; DCLX PlC ‘9’ INIT(O); X = X+ 1; PUT SKIP LIST (‘THE VALUE OF X IS :‘!!X); X = X+ 1; END A;

A. THE VALUE OF X IS : 1 B. THE VALUE OF X IS : 2 C. THE VALUE OF X IS : 3 D. THE VALUE OF X IS : 5 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=3 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 4 Given the following code, with what attribute should the variable EOF be declared? DO WHILE(^EOF);


A. FIXED BIN (7) B. BIT (1) C. CHAR (1) D. FIXED DEC (3) Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=4 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 5 Which is the most appropriate code to turn all of the bits in A ON? DCL A BIT(8);

A. A = 255; B. A = ’11111111’B; C. A = 11111111B; D. A = -1; Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=5 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 6 What changes should be made, if any, to the following code? DCL A CHAR(100) BASED(P); DCL P PTR; READ FILE(DDIN) INTO(A);

A. READ FILE(DDIN) SET(A); B. READ FILE(DDIN) INTO(P); C. READ FILE(DDIN) SET(P); D. No changes necessary because the code is correct. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=6 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 7 What is the value of B after executing the following code? DCL A CHAR(10) VAR; DCL B BIN FIXED(31) INIT(0); DCL C CHAR(5) INIT(’ABCD’); A = C; B = LENGTH(A);

A. 10 B. 7 C. 5 D. 4 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=7 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 8 Which of the following is a BIN FIXED constant?


A. ‘1000’ B. 1E+03 C. 1000 D. 1000B Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=8 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 9 Which of the following is NOT a valid method to activate a BEGIN block?

A. A condition is signaled and the BEGIN block is a component of the corresponding ON unit. B. Sequential program flow approaches the BEGIN block. C. The BEGIN block is labeled and a GOTO addresses this label. D. The BEGIN block is labeled and a CALL addresses this label. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=9 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 10 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;

A. CHAR B. BIN FIXED C. FLOAT D. PlC Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=10 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 11 Given the following code, what SELECT code is NOT equivalent? DCL(C,W,V) CHAR (1); SELECT (C); WHEN (‘A’‘B’) PUT (‘1’) WHEN (‘C’) PUT (‘2’) WHEN (W) PUT (‘3’) WHEN (V) PUT (‘4’); OTHER PUT (‘Other’); END; A. SELECT (C); WHEN (‘C’) PUT (‘2’) WHEN (‘A’‘B’) PUT (‘1’) WHEN (W) PUT (‘3’) WHEN (V) PUT (‘4’); OTHER PUT (‘Other’); END; B. SELECT (C); WHEN (‘A’‘B’) PUT (‘1’) WHEN (‘C’) PUT (‘2’) WHEN (V) PUT (‘4’) WHEN (W) PUT (‘3’); OTHER PUT (‘Other’); END; C. SELECT (C); WHEN (‘B’‘A’) PUT (‘1’) WHEN (‘C’) PUT (‘2’) WHEN (W) PUT (‘3’) WHEN (V) PUT (‘4’); OTHER PUT (‘Other’); END; D. SELECT (C); WHEN (‘A’) PUT (‘1’) WHEN (‘B’) PUT (‘1’) WHEN (‘C’) PUT (‘2’) WHEN (W) PUT (‘3’) WHEN (V) PUT (‘4’); OTHER PUT (‘Other’); END; Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=11


-------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 12 Which of the following describes when a program is NOT FETCHABLE?

A. When the main program need not be recompiled to reflect the changes made in the called program B. When the called program will be loaded from the library at execution time C. When the called program is part of the main program in the load module D. When two main programs referring to the called program at the same time cannot have different versions of the called program Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=12 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 13 Which is the impact, if any, of LIKE in the following code? DCL 1 XY 2 A CHAR(4), 2 B BIN FIXED(31); DCL 1 YZ LIKE XY;

A. XY.A is always the same as YZ.A. B. YZ is exactly the same structure as XY but with its own storage. C. YZ is based on the structure XY. D. There is no impact, because LIKE is a syntax error. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=13 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 14 What is the most appropriate data type for a variable that is being used to represent numeric data in a printable form and at the same time can be used to perform arithmetic?

A. BIN FIXED B. DEC FIXED C. CHAR D. PICTURE Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=14 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 15 What is the most appropriate declaration for the variable A? A = ‘ABCDEF’;

A. DCL A BIN FIXED(15); B. DCL A CHAR(6); C. DCL A DEC FIXED (153); D. DCL A PlC ‘999999’;


Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=15 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 16 Which of the following would NOT access the third element of A? DCL 1XY(5), 2 A(4) CHAR(4);

A. XY(1,3).A B. XY.A(1,3) C. XY(1).A(3) D. XY(3).A(1) Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=16 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 17 Given the following code, what can be said about the scope of the variables in procedure P? P: PROCEDURE; B: BEGIN; DCL K FIXED BIN (15); END B; D: DO; DCL S CHAR (10); END D; END P;

A. Variable S is known in the entire procedure. B. Variable K is known in the entire procedure. C. Variable S is not known in block B. D. Variable K is known in group D. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=17 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 18 What will be output by the following program? TEST: PROC OPTIONS(MAIN); DCL A CONTROLLED FIXED BIN(31); ALLOC A; ALLOC A; CALL SUB(A); PUT SKIP LIST( ALLOCN(A)); SUB: PROC( B); DCL B CONTROLLED FIXED BIN(31); FREE B; ALLOC B; ALLOC B; FREE B; ALLOC B; END; END;

A. 2 B. 3 C. 4 D. 5 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=18 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 19 What is the value of A after executing the following code? DCL A CHAR(6) INIT


(‘ABCDEF); DCL B CHAR(10) NIT (‘0123456789’); A = SUBSTR(B,5,3); A. ‘456 ‘ B. ‘ 456’ C. ‘456DEF’ D. ‘ABC456’ Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=19 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 20 What does the following code do, if anything? RELEASE U;

A. Release the memory used by the program U B. Reloads the program U into the memory C. Closes the file U D. Nothing because there is a syntax error. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=20 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 21 Which of the following is a BIT string constant?

A. 1000 B. ‘1000’ C. ‘1000’B D. 1000B Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=21 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 22 What is the most appropriate way to assign a value to variable A? DCLA BIN FIXED(15); A. A = ’17; B. A = 17.29; C. A =’1729’X; D. A = 17; Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=22 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 23 Given the following declaration, the compiler will issue the message “The variable RX is declared without any data attributes.” What possible problem is this message reporting? DCL


RX, RY FIXED BIN;

A. That the code is in error because a variable declared without attributes is not allocated storage B. That the code is in error because only one variable may be declared in any one statement C. That the code is in error because the FIXED BIN attribute would not apply to both RX and RY D. That the code is in error because the FIXED BIN precision was not specified Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=23 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 24 Given the following code, what will be output? MP: PROC OPTIONS(MAIN); DCL A CHAR(1) INIT(’A’); DCL B CHAR(1) INIT(’B’); DCL C CHAR(1) STATIC INIT(’C’); CALL SR1(A); PUT SKIP LIST(A!!B!!C); SR1: PROC(A); DCL A CHAR(1); DCL B CHAR(1); DCL C CHAR(1); A = ‘1’ B = ‘2’ C = ‘3’; END SR1; END;

A. 1B3 B. 1BC C. 123 D. 12C Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=24 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 25 What should be done, if anything, when the following compiler message appears? Multiple closure of blocks, one extra END statement assumed.

A. Take out the extra END statement. B. Find the missing END statement and add it at the right place. C. PUT an extra END statement at the end of the program. D. Nothing needs to be done. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=25 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 26 The following code calls an external function procedure. Which program matches the entry declaration? DCL F FLOAT; DCLX CHAR(1); DCL FUN ENTRY (FIXED BIN (15), FLOAT) RETURNS (CHAR(1)); X=FUN(1, F);

A. FUN: PROCEDURE (K, F) RETURNS (CHAR(1)); DCL K FIXED BIN (15);


DCL F FLOAT; END; B. FUN: PROCEDURE (K, F) RETURNS (CHAR(1)); DCL K FIXED BIN (31); DCL F FLOAT; END; C. FUN: PROCEDURE (K, F) RETURNS (CHAR(1)); DCL K FIXED DEC (15); DCL F FLOAT; END; D. FUN: PROCEDURE (K, F) RETURNS (FIXED BIN (15)); DCL K FIXED BIN (15); DCL F FLOAT; END; Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=26 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 27 In which of the following situations can a subroutine be replaced by a function without any major changes to the code?

A. When the subroutine changes an array parameter B. When the subroutine changes a structure parameter C. When the subroutine changes more than one parameter D. When the subroutine changes only one scalar parameter Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=27 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 28 Which of the following is NOT a valid way to set a pointer P to zero? A. UNSPEC(P) = “B; B. P = PTRVALUE(0); C. P = SYSNULL(); D. P = 0; Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=28 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 29 happens after executing the following code? DCL DDOUT FILE RECORD OUTPUT; DCL OUT_CHAR CHAR(200) INIT(’HeIlo World’); WRITE FILE(DDOUT) FROM(OUT_CHAR);

A. One record with a length of 11 will be written to the output file. C. Compiler error because there is no OPEN statement. D. Runtime error because there is no OPEN statement. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=29 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 30


Given the following program, what is shown by the dump? A: PROC; DCL X FIXED BIN(31) INIT(17); DCL F FILE RECORD OUTPUT; ON ERROR BEGIN; CALL PLIDUMP(’TFB’); END; CALL B; B: PROC; DCLY FIXED BIN(31) INIT(29); X = Y; OPEN FILE(F); SIGNAL ERROR; END; END;

A. F is open and the storage for Y is still on the stack B. F is closed and the storage for Y is still on the stack C. F is open and the storage for Y is no longer on the stack D. F is closed and the storage for Y is no longer on the stack Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=30 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 31 What is the result, if any, of executing the following code? DCL A CHAR(2) INIT(’ ‘); DCL B BIT(2) INIT(’11’B); A = ^B; A. The value of A is ‘00’. B. The value of A is’11’. C. The value of A is unpredictable. D. There is no result, because the syntax is wrong. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=31 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 32 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);

A. THE VALUE OF B IS: 3000.246 B. THE VALUE OF B IS :03000.246 C. THE VALUE OF B IS :3000.246 D. THE VALUE OF B IS :3000246 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=32 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 33 Given the following program, which subroutine improperly uses pointers to address memory and could lead to data corruption or an exception? A: PROC OPTIONS(MAIN); DCL 1 X, 2 X1 CHAR(76), 2 X2 PIC’9999’; DCL Y CHAR(20); CALL SUB1( ADDR(X)); CALL SUB2( ADDR(X)); CALL SUB3( ADDR(X)); CALL SUB4( ADDR(X)); SUB 1: PROC( P); DCL P POINTER; DCL 1 XBASED(P), 2 X1 CHAR(76), 2 X2 PIC’9999’ X = “; END; SUB2: PROC( P); DCL P POINTER; DCL 1 X BASED(P), 2X1


PIC’(76)X’ 2 X 2 PIC’9999’ X = “; END; SUB3: PROC( P); DCL P POINTER; DCL X CHAR(60) BASED(P); X = “; END; SUB4: PROC( P ); DCL P POINTER; DCLX CHAR(100) BASED(P); X = “; END; END; A- SUB1 B- SUB2 C- SUB3 D- SUB4

Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=33 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 34 Given the following code, what declaration of I will cause an infinite loop under default condition enablement? DO I = 1 TO 99;

A. DCL I FIXED BIN (7); B. DCL I FIXED BIN (3,0); C. DCL I PIC’99’; D. DCL I FLOAT; Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=34 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 35 Given the following piece of code, what will be the output of the preprocessor? %F: PROC(S) RETURNS(CHAR); DCL S CHAR; RETURN(SUBSTR(S, 1, 1)); %END; PUT (F(ABC)); %ACTIVATE F; PUT (F(ABC));

A. PUT (F(ABC)); PUT (A); B. PUT (A); PUT (F(ABC)); C. PUT (A); PUT (A); D. PUT (F(ABC)); PUT (F(ABC)); Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=35 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 36 Given the following piece of code, what will be output? A: PROCEDURE OPTIONS (MAIN); DCL K CHAR (1) INIT (‘A’); CALL B; B: PROCEDURE; DCL K CHAR (1) NIT (‘B’); CALL C; C: PROCEDURE; DCL K CHAR (1) INIT (‘C’); PUT (K); CALL D; END C; D: PROCEDURE; PUT (K); END D; END B; PUT (K); END A;

A. C A A B. C C A C. C B A D. C A B


Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=36 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 37 Which of the following techniques will NOT cause a referenced external sub procedure to be handled as FETCHABLE when the referencing program is compiled?

A. OPTIONS(FETCHABLE) as an attribute of the ENTRY declare statement in the referencing program B. OPTIONS(FETCHABLE) as an option of the PROC statement in the sub procedure C. Having a FETCH statement for the sub procedure D. Having a RELEASE statement for the sub procedure Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=37 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 38 What is the value of B, if any, after executing the following code? DCL A CHAR(5) INIT(’ABCDE’); DCL B CHAR(5) DEF A;

A. NULL B. Blank C. ‘ABCDE’ D. It cannot be defined. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=38 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 39 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’);

A. 2 B. 3 C. 6 D. 9 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=39 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 40 What code would result in the BIT string B having all ones? DCL A CHAR(8) INIT(HIGH(8)); DCL (HIGH ,ADDR) BUILTIN;

A. DCL B BIT(64) BASED(ADDR(A));


B. DCL B BIT(64) INIT(’1111111‘x); C. DCL B BIT(64) INIT(’1‘B); D. DCL B BIT(64) INIT(HIGH(1)); Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=40 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 41 Given the following code, what procedure will be accepted by the compiler? DCL A DIM (10) CHAR (100) VAR BASED (P); DCL P PTR; ALLOCATE A; CALL SUB(P);

A. SUB: PROCEDURE (P); BASED (P); END SUB; B. SUB: PROCEDURE (P); BASED (P); END SUB; C. SUB: PROCEDURE (P); (P); END SUB; D. SUB: PROCEDURE (P); (P); END SUB;

DCL P PTR; DCL A DIM (10) CHAR (100) VAR DCL P PTR; DCL A DIM (*) CHAR (100) VAR DCL P PTR; DCL A DIM (10) CHAR (*) VAR BASED DCL P PTR; DCL A DIM (*) CHAR (*) VAR BASED

Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=41 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 42 What will be the values of the variables A, B, C and D after executing the following code? DCL 1 XYZ, 2 A CHAR(4), 2 6 BIN FIXED(31), 2 C DEC FIXED(7), 2 D PlC ‘999 XYZ = “;

A. A is blank, B is zero, C is zero D is zero B. syntax error in XYZ = “; C. CONVERSION will be raised in XYZ = “; D. A,B,C and Dare zeros. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=42 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 43 Given the following piece of code, how many times is the loop executed? DCLI FIXED BIN (31); I = 20; DO UNTIL (I = 0); PUT (I); I = I - 3; END;

A. less than 6 times B. 6 C. 7 D. more than 7 times Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=43


-------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 44 RECFM=V, what happens after executing the following code? DCL DDOUT FILE RECORD OUTPUT; DCL OUT_CHAR CHAR(500) VARYING INIT((220)’ ’); OPEN FILE(DDOUT); WRITE FILE(DDOUT) FROM(OUT_CHAR);

A. One record with a length of 220 will be written to the output file. B. One record with a length of 500 will be written to the output file. D. An error will occur because of mismatch of record length. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=44 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 45 What code must be added after EOF = ‘1’B, if any, to print ‘EOF REACHED’? DCL INF FILE RECORD INPUT; DCL INFIELD CHAR(100) BASED(P); DCL P PTR; DCL EOF BIT(l) INIT(’0’B); ON ENDFILE(INF) BEGIN; EOF = ‘l’s; PUT SKIP LIST(INFIELD); END; OPEN FILE(INF); READ FILE(INF) SET(P); DO WHILE(AEOF); READ FILE(INF) SET(P); END; A. ALLOC INFIELD; INFIELD = ‘EOF REACHED’; B. INFIELD ‘EOF REACHED’; C. It cannot be printed, as it is not sure if INFIELD contains the last record D. There is a syntax error. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=45 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 46 What is the result of executing the following code? DCLA BIN FIXED(31) INIT(10000); DCL B BIN FIXED(15) INIT(8000); B = B/A;

A. The value of B is 0.8. B. The value of B is 0. C. The value of B is 1. D. CONVERSION would be raised. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=46 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 47 Given the following code, what value will be output? TEST: PROC OPTIONS(MAIN); DCL P POINTER, N1 FIXED BIN(31), 1 A BASED(P), 2 A1 FIXED BIN(3i), 2 A2 FIXED BIN(3i), 2 A3 FIXED BIN(3i), 2 A4( N1 REFER(A3)) CHAR(10) VAR; N1 = 5; ALLOC A; PUT SKIP LIST( STG(A)); END;


A. 22 B. 24 C. 62 D. 72 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=47 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 48 Which of the following is a restriction using the BYVALUE attribute?

A. It can be specified only for scalar arguments and parameters that can be passed in registers. B. It can be specified only for scalar arguments and parameters with a size of four bytes. C. It can be specified only for aggregate arguments and parameters. D. It can be specified only for scalar arguments and parameters whose lengths and sizes are known at compile time. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=48 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 49 In which of the following cases is it possible to change the value of a variable in a routine when it is passed to the routine as an argument?

A. The argument is declared as FIXED BIN(15), and the corresponding parameter is declared as FIXED BIN(15) BYVALU E. B. The argument is declared as FIXED BIN(15), and the corresponding parameter is declared as FIXED DEC(7) BYADDR. C. The argument is declared as FIXED DEC(7), and the corresponding parameter is declared as FIXED DEC(7) BYADDR. D. The argument is declared as CHAP(10) VAR, and the corresponding parameter is declared as CHAR(10). Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=49 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 50 What code needs to be executed, if any, before the variable A can be successfully accessed? DCL X PTR; DCL B CHAR(100) INIT(’‘); DCL A CHAR(100) BASED(X);

A. A can be accessed without any further action. B. X = ADDR(B); C. A = B;


D. X = NULL(); Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=50 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 51 What is the result, if any, of executing the following code? DCL B DEC FIXED(15,3) INIT(12345.12); DCL C PlC ‘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 Pl C. C. The result in C is 12345 with 5 leading zeroes. D. The result in C is 1234512 with 3 leading zeroes. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=51 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 52 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;

A. I = 10; B. 1= 10; C. 1= 10; D. 1= 10;

DO WHILE (I> 1); PUT (I); I = I - 1; END; DO WHILE (I >= 1); I = I - 1; PUT (I); END; DO UNTIL (I < 1); PUT (I); I = I - 1; END; DO UNTIL (I> 1); PUT (I); I = I - 1; END;

Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=52 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 53 What code will print the value of A to SYSPRINT? DCLA DEC FIXED(5,3) INIT(12.0); A. PUT SKIP LIST(’Value of A is:’ !! A); B PUT SKIP LIST(’Value of A is:’), (A); C. PUT SKIP LIST(’Value of A is:’)(A); D. PUT SKIP LISTA; Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=53 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 54 A programmer has been asked to write a program that tests a variable, X, and writes out A, B, C or D if X is 0, 1, 2 or 3 respectively and writes out E when X has none of those values. Which of the following programs represents the best practice using IF or SELECT statements?


A. SUB1:PROC(X); DCL X FIXED UNSIGNED; IF X = 0 THEN PUT SKIP LIST (‘A’); ELSE IF X = 1 THEN PUT SKIP LIST (‘B’); ELSE IF X = 2 THEN PUT SKIP LIST (‘C’); ELSE IF X = 3 THEN PUT SKIP LIST ( ‘D’); ELSE PUT SKIP LIST ( ‘E’); END; B. SUB2: PROC (X); DCL X FIXED UNSIGNED; IF X < 2 THEN IF X = 0 THEN PUT SKIP LIST (‘A’); ELSE PUT SKIP LIST (‘B’); ELSE IF X = 2 THEN PUT SKIP LIST (‘C’); ELSE IF X = 3 THEN PUT SKIP LIST ( ‘D’); ELSE PUT SKIP LIST ( ‘E’); END; END; C. SUB3: PROC( X); DCL X FIXED UNSIGNED; SELECT; WHEN (X = 0) PUT SKIP LIST ( ‘A’); WHEN(X = 1) PUT SKIP LIST ( ‘B’); WHEN( X = 2) PUT SKIP LIST ( ‘C’); WHEN( X = 3) PUT SKIP LIST ( ‘D’); OTHERWISE PUT SKIP LIST ( ‘E’); END; END; D. SUB4: PROC( X); DCLX FIXED UNSIGNED; SELECT(X); WHEN ( 0 ) PUT SKIP LIST ( ‘A’); WHEN (1) PUT SKIP LIST ( ‘B’); WHEN ( 2) PUT SKIP LIST ( ‘C’); WHEN (3) PUT SKIP LIST ( ‘D’); OTHERWISE PUT SKIP LIST ( ‘E’); END; END; Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=54 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 55 Given the following piece of code, what will happen when the code is executed if STRINGSIZE is not enabled? DCL X CHAR (5) INIT (‘ABCDE’); DCL Y CHAR (3) INIT (“); Y = X; A. Y receives the value ‘ABC’ and the next two bytes following Y’s storage are overridden by ‘DE’. B. Y receives the value ‘ABC’ and ‘DE’ is not assigned to any storage area. C. The assignment is not executed and program execution continues after the assignment. D. The assignment is not executed and program execution abends. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=55 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 56 Given the following code, how many elements of A will contain a value of 0 after execution of the loops? DOL A DIM (8, 10) FIXED BIN (31); DCL(I, K) FIXED BIN (31) INIT (0); A = 0; DO I = 2 TO 8; DO K = 1 TO 10; A(I, K) = l*K; END; END;

A. 0 B. 1 C. 6 D. 10 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=56 -------------------------------------------------------------------------------------------------------------------------------------


QUESTION: 57 What happens after executing the following code? DCLA BIN FIXED(15); A = 1_000

A. The value of A is 1000. B. The value of A is 8. C. The value of A is 1. D. There is a syntax error. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=57 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 58 Given the following code in a program, which code will NOT change the program’s behavior when the ENDFILE(SYSIN) condition is raised? ON ENDFILE (SYSIN) GOTO START;

A. ON ENDFILE (SYSIN); B. ON ENDFILE (SYSIN) EOF = ‘1’B; C. REVERT ENDFILE(SYSIN); D. SIGNAL ENDFILE (SYSIN); Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=58 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 59 happens after executing the following code? DCL DDIN FILE RECORD INPUT; DCL P PTR; DCL 1 INSTR BASED(P), 2 A CHAR(100), 2 B CHAR(100); ALLOCATE INSTR; OPEN FILE(DDIN); READ FILE(DDIN) INTO(INSTR);

A. One record will be read into the buffer and the pointer will be set accordingly. B. One record will be read into the structure INSTR. C. READ INTO cannot be used on a BASED structure. D. Program will abend because P has not been properly initialized. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=59 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 60 Which of the following loops will run infinitely?

A. DCL I FIXED BIN (31); B. DCL I FIXED BIN (31); C. DCL I FIXED BIN (31); D. DCL I FIXED BIN (31);

DO I = 1 BY 2 UNTIL (I = 20); PUT (I); END; DO I = 1 BY 2 UNTIL (I> 20); PUT (I); END; DO I = 1 BY 2 WHILE (I <20); PUT (I); END; DO I = 1 BY 2 WHILE (I = 20); PUT (I); END;

Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=60


-------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 61 What value is output by the following program? TEST: PACKAGE; D CL N EXT FIXED BIN(31) INIT(10); DCLC(N) EXT CONTROLLED FIXED BIN(31); MAIN: PROC OPTIONS(MAIN); ALLOC C; ALLOC C(20); N = 30; CALL UPGM; END; UPGM: PROC; ALLOC C; N = 40; PUT SKIP LIST( DIM(C)); END; END;

A. 10 B. 20 C. 30 D. 40 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=61 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 62 Given the following program, the compiler will produce the warning message “The structure member A2 is declared without any data attributes. A level number may be incorrect”. What is the best way to correct the program? TEST: PROC OPTIONS(MAIN); DCL 1A, 3A1 FIXED BIN(31), 3 A2, 3 A3 FIXED BIN(31), 3 A4 FIXED BIN(31); END;

A. Add the attribute CHAR(8) to the declare for A2 B. Change the level number on the declare for A2 to 2 C. Change the level number on the declare for A3 to 4 D. Change the level numbers on the declares for A3 and A4 to 4 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=62 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 63 Given the following code, what construct is equivalent? SELECT; WHEN(A< 1) B += 1; WHEN (A < 2) B += 2; WHEN (A< 3) B+= 3; OTHERWISE B = 0; END;

A. IFA< 1 THEN B += 1; ELSE IF A < 2 THEN B += 2; ELSE IF A < 3 THEN B += 3; ELSE B = 0; B. IF A <1THEN B += 1; IF A < 2 THEN B += 2; IF A < 3 THEN B += 3; ELSE B = 0; C. SELECT; WHEN (A < 3) B += 3; WHEN (A < 2) B += 2; WHEN(A< 1) B += 1; OTHERWISE B = 0; END; D. SELECT; WHEN(A< 1) B += 1; WHEN (A < 2) B += 2; WHEN(A< 3) B +=3; END; Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=63 -------------------------------------------------------------------------------------------------------------------------------------


QUESTION: 64 What happens to the STATIC variables in the program U, if anything, alter executing the following code? FETCH U; CALL U; RELEASE U; FETCH U;

A. STATIC variables cannot be used in program U. B. STATIC variables will have the values from the last time U was called. C. STATIC variables will have their INITIAL values. D. Nothing because there is a syntax error. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=64 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 65 Which of the following pieces of code will result in a compiler error message? A. ON ENDFILE (SYSIN) DO; PUT LIST(’End of file reached.’); EOF = ‘1’B; END; B. ON ENDFILE (SYSIN) BEGIN; PUT LIST(’End of file reached.’); EOF = ‘15; END; C. IF EOF THEN DO; K = 0; L = 1; END; D. IF EOF THEN BEGIN; K = 0; L = 1; END; Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=65 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 66 What happens after end of file has been reached in the following code, assuming the input file has more than 100 records? DCL INF FILE RECORD INPUT; DCL INFIELD CHAR(100) BASED(P); DCL P PTR; DCL EOF BIT(1) INIT(’0’B); ON ENDFILE(INF) BEGIN; ALLOC INFIELD; INFIELD = ‘EOF REACHED’; END; OPEN FILE(INF); READ FILE(INF) SET(P); DO WHILE(^EOF); READ FILE(INF) SET(P); EOF = ‘1’B; END;

A. End of file will never be reached B. INFIELD will have a value ‘EOF REACHED’ and the program ends C. Infinite loop D. Runtime error because there is no CLOSE statement Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=66 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 67 Given the following DECLARE statement, how many bytes will be allocated to A? DCL 1 A UNION, 2 C8 CHAR(8), 2 XB FIXED BIN(31), 2 BX BIT(16);

A. 2


B. 4 C. 8 D. 14 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=67 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 68 To validate the assignment in the following code, which condition should be enabled? TEST: PROC(A, B); DCL (A, B) CHAR (*); A = B; END;

A. SIZE B. STRINGRANGE C. STRINGSIZE D. SUBSCRIPTRANGE Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=68 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 69 What is the result of executing the following code? DCL A CHARACTER (4) INIT(’10.5’); DCL B DEC FIXED(71) INIT(10.5); B = A + B;

A. CONVERSION is raised. B. ERROR is raised. C. No condition is raised and the value of B is 21. D. No condition is raised and the value of B is 20.5 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=69 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 70 Under default condition enablement, what is the result of executing the following code? DCLX CHAR(5) INIT(‘A1234’); DCL Y PlC ‘9999’ INIT(0); Y = X;

A. The value of Y is A 123. B. The value of Y is 1234. C. CONVERSION would be raised. D. STRINGSIZE would be raised. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=70 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 71 Given the following code, the compiler will issue the message “RULES(NOLAXIF) requires BIT(1) expressions in IF, WHILE, etc.” under the option RULES(NOLAXIF). In order to fix


this problem, the IF statement should be changed to: A: PPOC( RC); DCL RC FIXED BIN(31); IF RC = 0 ! 4 THEN

A. IF RC =(0 ! 4) THEN B. IF RC=(0 ! RC = 4 THEN C. IF BIT(RC = 0 ! 4) THEN D. IF BOOL(RC = 0,4,’0111’B) THEN Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=71 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 72 What is the most appropriate declaration for the variable X? X= 1,123E+4;

A. DCL X CHAR(4); B. DCL X PlC ‘9999’; C. DCL X DEC FLOAT(16); D. DCL X DEC FIXED(15,3); Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=72 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 73 happens after executing the following code? DCL DDIN FILE RECORD lNPUT DCL 1 INSTR, 2 A CHAR(150), 2 B CHAR(150); OPEN FILE(DDIN); READ FILE(DDIN) INTO(INSTR);

A. When executed, one record will be read into buffer. B. At runtime, an error will occur because of mismatch of record length. C. At compile time, an error will occur because of mismatch of record length. D. When executed, nothing will be read into the buffer. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=73 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 74 Given the following code for a main program and an external subroutine, what will be output? *PROCESS INITAUTO; MP: PROC OPTIONS(MAIN); DCL SR1 EXT ENTRY; DCL I BIN FIXED(31) EXTERNAL INIT(0); DCL J BIN FIXED(31) EXTERNAL INIT(0); DCL K BIN FIXED(3i) EXTERNAL INIT(0); CALL SR1(I); CALL SR1(I); CALL SR1(I); PUT SKIP LIST(I+J+K); END; *PROCESS INITAUTO; SR1: PROC(I); DCL I BIN FIXED(31); DCL J BIN FIXED(31) EXTERNAL INIT(0); DCL K BIN FIXED(31); I = I + 1; J =J + 10; K = K+ 100; END SR1;

A. 33


B. 303 C. 330 D. 333 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=74 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 75 What is the value of A in PROC1 after calling PROC2? PROC1: PROC; DCLA BIN FIXED(15) INIT(0); CALL PROC2(A); END; PROC2: PROC(A); DCL A BIN FIXED(15); A = A + 1; END;

A. 0 B. 1 C. The value of A is undefined. D. The compiler will generate an error message because A is defined more than once. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=75 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 76 What is the value of A after executing the following code? DCL A CHAR(7) INIT (‘ABCDEFG’); DCLB CHAR(10) INIT (‘0123456789’); SUBSTR(A,4) = SUBSTR(B,5,3); A. ‘ABC4567’ B. ‘ABC4560’ C. ‘ABCD456’ D. ‘ABC456 ’ Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=76 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 77 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;

A. DCL SR1 EXT ENTRY (DEC FIXED(3), BIN FIXED(31), CHAR(3)); B. DCL SR1 EXT ENTRY; C. DCL SR1 EXT ENTRY(*); D. DCL SR1 EXT ENTRY (1,3 DEC FIXED(3),3 BIN FIXED(31),3 CHAR(3)); Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=77 -------------------------------------------------------------------------------------------------------------------------------------


QUESTION: 78 Which of the following statements, if any, needs to be executed before the variable A can be used? DCL A CHAR(5) CONTROLLED;

A. FETCH A; B. ALLOCATE A; C. FREE A; D. Nothing needs to be done. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=78 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 79 What is the difference between the following two DECLARE statements, if any? XX: PROC; DCLA BIN FIXED(31) STATIC INIT(O); DCL B SIN FIXED(31) AUTOMATIC INIT(0); END;

A. Variable B is initialized every time the subroutine XX is called, while A is initialized only once. B. Variable A is initialized every time the subroutine XX is called, while B is initialized only once. C. When the subroutine XX ends, the space for Variable A is freed, while B remains allocated. D. There is no difference. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=79 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 80 Given the following code, how many times is the loop executed? DCL NEGATIVE BIT (1) INIT (‘0’B); DCLI FIXED BIN (31) INIT (10); DO WHILE (^NEGATIVE) PUT (I); I += 1; IF I >= 0 THEN NEGATIVE = ‘0’B; ELSE NEGATIVE = ‘1’B; END;

A. Less than 10 times B. 10 C. 11 D. More than 11 times Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=80 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 81 What is the value of X after executing the following code? DCLX SIT(1 6) INIT(’l U’S); A. ‘0000000000000010’B


B. ‘1111111100000000’B C. ‘1010101010101010’B D. ‘1000000000000000’B Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=81 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 82 Given the following code, how many times is the loop executed? DCL A(11) FIXED DEC(15,3); DCL I FIXED BIN (31); DO I = 1 TO 11; A(I) = 0; I = 1+1; END;

A. 1 B. 6 C. 11 D. Infinitely Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=82 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 83 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; A. SELECT (A); WHEN (‘B’) PUT (‘2’) WHEN (‘A’) PUT (‘1’) WHEN (‘C’) PUT (‘3’); OTHER; END; B. SELECT (A); WHEN (‘A’) PUT (‘1’) WHEN (‘C’) PUT (‘3’) WHEN (‘B’) PUT (‘2’); END; C. IF A = ’A’ THEN PUT(’1’ IF A = ‘B’ THEN PUT (‘2’) IF A = ‘C’ THEN PUT (‘3’) D. IF A = ‘C’ THEN PUT (‘3’) IF A = ‘B’ THEN PUT (‘2’) IF A = ‘A’ THEN PUT (‘1’); Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=83 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 84 Given the following code, what will be output? PGM1: PROC OPTIONS(MAIN); DCL (K,L) BIN FIXED (15); I,J,K,L= 1; CALL SRI; CALL SRJ; CALL SRK; CALL SRL; PUT SKIP LIST(I*J*K*L); SRI: PROC; I = 2; END; SRJ: PROC; DCL J BIN FIXED(15); J = 3; END; SRK: PROC; K = 5; END; SRL: PROC; DCL L BIN FIXED(15); L = 7; END; END;

A. 1 B. 10 C. 21


D. 210 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=84 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 85 Which of the following is the best way to force end of file of file DDIN before the actual end of file is reached? DCL DDIN FILE RECORD INPUT;

A. SIGNAL ENDFILE(DDIN); B. SIGNAL ENDPAGE(DDIN); C. End of file cannot be forced. D. CLOSE ENDFILE(DDIN); Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=85 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 86 What value will be displayed by the following program? TEST: PROC OPTIONS (MAIN); DCL A FIXED BIN INIT (2); DCL Z FIXED BIN INIT (1729); CALL SUB; SUB: PROC; DCLA FIXED BIN INIT (10); DCL 1 X, 2 Y FIXED BIN INIT (17), 2 Z FIXED BIN INIT (29); PUT SKIP LIST (A*Y); END; END;

A. 34 B. 170 C. 3458 D. 17290 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=86 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 87 Given the following code, what is the best way to code the PROC statement and to declare the parameters for UPRO1? MPROG: PROC OPTIONS(MAIN); DCL F FLOAT BIN(53); CALL UPRO1 (ADDR(F));

A. UPRO1: PROC(P_PARM); DCL P_PARM PTR DCL PARM_F FLOAT BIN(53) BASED(ADDR(P_PARM)); B. UPRO1: PROC(P_PARM); DCL P_PARM PTR; DCL PARM_F FLOAT BIN(53) BASED(P_PARM) C. UPRO1: PROC(PARM_F); DCL PARM_F FLOAT BIN(53); D. UPRO1: PROC(PPARM); DCL P_PARM PTR; DCL PARM_PTR BASED (P_PARM); DCL PARM_F FLOAT BIN(53) BASED(PARM_PTR); Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=87 -------------------------------------------------------------------------------------------------------------------------------------


QUESTION: 88 What is the value of B after executing the following code? DCLA CHAR(1) INIT(’ ‘); DCL B BIT(8) BASE D(ADDR(A)); DCL (HIGH, ADDR) BUILTIN; A = HIGH(1); A. ‘11111111’B B. ‘00000000’B C. ‘F1’X D. ‘40’X Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=88 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 89 Which of the following methods of initializing the variable X is most efficient because it results in the fewest compiler instructions? DCL A PlC ‘999V.99’; DCL A CHAR(6) INIT( ‘000.00’); DCL B DEC FIXED(5,2) INIT( 0); DCL C BIT(8) INIT( ‘00000000’B); DCL D FLOAT(6) INIT( 0E0);

A. X=A; B. X=B; C. X=C; D. X=D; Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=89 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 90 What is the value of B after executing the following code? DCL A CHAR(10) INIT(’123abCDEFG’); DCLB BIN FIXED(31) INIT(5); B = INDLX(A,’AB’);

A. 0 B. 1 C. 4 D. 11 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=90 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 91 Which of the following is NOT mandatory for an external function procedure and its usage?

A. RETURNS option on the PROCEDURE statement. B. ENTRY declaration with the RETURNS attribute. C. Using the RETURN statement to return control and a result value.


D. Using SWALUE parameters exclusively. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=91 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 92 Given the following code, which SIGNAL statement would cause a new page starting with the line ‘header text’ to be written to file X? DCLX FILL STREAM PRINT OUTPUT; ON ENDPAGE(X) PUT SKIP FILE(X) LIST(’header text’);

A. SIGNAL ENDPAGE(X); B. SIGNAL ENDFILE(X); C. SIGNAL NAME(X); D. SIGNAL OVERFLOW; Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=92 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 93 Which of the following builtins is the only one that returns a value?

A. PLICKPT B. PLISRTC C. PURETV D. PLIRETC Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=93 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 94 When different data types are used in an expression, which other following conversions is NOT done by subroutine call?

A. CHAR to DEC FIXED B. CHAR to BIN FIXED C. BIN FIXED to FLOAT D. CHAR to BIT Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=94 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 95 Given the following declarations, which code would assign 1234561.23 to A? DCL A DEC FIXED (15,3) NIT (123456.123); DCL B BIN FIXED (15) INIT (10);


A. A = A*B; B. A = BIN(A)*B; C. A = A*DEC(B); D. A = BIN(A) * DEC(B); Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=95 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 96 What is the result of executing the following code? DCL B PlC ‘999 99’ B = ‘4500’;

A. CONVERSION would be raised. B. B would contain a blank followed by ‘4500’. C. B would contain ‘04500’. D. B would contain ‘4500’ followed by a blank. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=96 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 97 Which of the following should be the first statement in an ON ERROR block? A. CALL PLIDUMP(‘TFBC’); B. STOP; C. ON ERROR SYSTEM; D. REVERT ERROR; Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=97 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 98 What is the result, if any, of executing the following code? DCL A BIT(1) INIT(’0’B); DCL B BIT(1) INIT(’0’B); DCL C BIT(1) INIT(’1’B); A = B = C; A. The value of A is ‘D’S. B. The value of A is’1’S. C. The value of A is unpredictable. D. There is no result because the syntax is wrong. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=98 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 99 Given the following code, what will be the output of the preprocessor? %DCL FLAG CHAR; %FIag = ‘TEST ,OPT’; %DCL FUN ENTRY; FUN(FIag) %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; A. put (“Test modus entered”); put (“Optimize modus entered”); B. put (“Test modus entered”); C. put (“Optimize modus entered”); D. put (“Fun(Flag)”); Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=99 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 100 Under default condition enablement, what is the result of executing the following code? DCL A CHAR(5); A = ‘123ABC’;

A. STRINOSIZE would be raised. B. CONVERSION would be raised. C. A will have a value ‘123AB’. D. A will have a value ‘23ABC’. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=100 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 101 Which of the following will print a line containing “1” and then a line containing “DONE”?

A. DOJX= 1 TO 4; IF JX = 2 THEN LEAVE A; PUT SKIP LIST( JX); END; PUT SKIP LIST( ‘DONE’); B. DOJX= 1 TO 4; IF JX = 2 THEN GOTO B; PUT SKIP LIST( JX); B: END; PUT SKIP LIST( ‘DONE’); C. DOJX= 1 TO 4; IF JX = 2 THEN EXIT; PUT SKIP LIST( JX); END; PUT SKIP LIST( ‘DONE’); D. DO JX= 1 TO 4; IF JX = 2 THEN STOP; PUT SKIP LIST( JX); END; PUT SKIP LIST( ‘DONE’); Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=101 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 102 What statement must be used to move data from SYSIN in STREAM oriented mode?

A. READ B. GET C. FETCH D. LOCATE


Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=102 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 103 Given the following code, what will happen if the variable MAX has a value larger than 32767? DCLI FIXED BIN (15); DCL MAX FIXED BIN (31); DO I = 1 TO MAX; B. The loop will stop executing when I reaches the value in MAX. C. The loop will stop executing when I reaches a value equivalent to MAX + 1. D. The loop will stop executing with an ABEND or run infinitely.

Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=103 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 104 What value will be output when the following code is executed? TEST: PROC OPTIONS(MAIN); DCLA(*) CONTROLLED FIXED BIN(31); ALLOC A(10); CALL SUB(A); PUT SKIP LIST( HBOUND(A,1)); SUB: PROC( B); DCL B(*) CONTROLLED FIXED BIN(31); ALLOC B(2*HBOUND (B,1)); ALLOC B( 2*HBOUND(B,1)); END; END;

A. 10 B. 20 C. 30 D. 40 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=104 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 105 How should the file ACCOUNT be declared if the program first writes records to ACCOUNT and afterwards reads them back from ACCOUNT?

A. DCL ACCOUNT FILE RECORD INPUT; B. DCL ACCOUNT FILE RECORD OUTPUT; C. DCL ACCOUNT FILE RECORD (INPUT.OUTPUT); D. DCL ACCOUNT FILE RECORD; Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=105 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 106 What happens after the following code is executed? DCL A CHAR(5) lNlT(’ABCDE’); DCL B CHAR(4) DEF A POS(2);


A. The value of B is ‘ABCD’ B. The value of B is ‘BCDE’ C. The value of B is NULL. D. There is a syntax error. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=106 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 107 What is the value of XY.A, if any, after executing the following code? DCL 1 XY, 2 A CHAR(4), 2 B BIN FIXED(31); DCL 1 YZ, 2 C CHAR(2) INIT(’CC’), 2 D PIC’99’ INIT(10); XY = YZ; A. ‘CC10’ B. ‘CC ‘ C. CC’ D. CONVERSION would be raised. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=107 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 108 Given the following declaration, the compiler will issue a warning message that says “INITIAL list for the array A contains only one item.”. Which INIT statement would correctly eliminate this message? DCL A(10) CHAR(5) INIT( ‘‘); A. INIT( COPY(’ ‘.10)) B. INIT((10)’ ’) C. INIT( (10)(’ ’)) D. INIT(LOW(10)) Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=108 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 109 Which of the following options is proper for the PROC statement, but invalid for the ENTRY statement?

A. OPTIONS(BYADDR) B. OPTIONS(COBOL) C. RETURNS(<attribute-list>) D. RECURSIVE Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=109 -------------------------------------------------------------------------------------------------------------------------------------


QUESTION: 110 What is the output of the following program? MAIN: PROC OPTIONS(MAIN); DCL 1 A UNION, 2 5 CHAR(4) INIT(’FADE’), 2 C CHAR(2); C = ‘BA’; PUT SKIP LIST( B !! C); END;

A. BA00BA B. BABABA C. BADEBA D. FADEBA Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=110 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 111 If the following syntax is incorrect, how should the syntax be changed? DCL A CHAR(100) BASED(P); DCL P PTR; ALLOCATE A; READ FILE(DDIN) INTO(A);

A. READ FILE(DDIN) INTO(P); B. READ FILE(DDIN) SET(A); C. READ FILE(DDIN) TO(P); D. No changes are needed because the syntax is correct. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=111 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 112 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 CIIAR(46); OPEN FILE(DDOUT); DO It 1 TO 10; WRITE FILE(DDOUT) FROM(OUTSTR); END;

A. 10 records will be written to the output file. B. At runtime, an error will occur because of mismatch of record length. C. At compile time, an error will occur because of mismatch of record length. D. Nothing will be written to the output file. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=112 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 113 Given the following code, which value is output on the last line? DCL N FIXED BIN (31); DCL X FIXED BIN (31) INIT (0); DON = 1 TO 7, 11 TO 15 WHILE (X< 20); X = N*N; PUT SKIP LIST (X); END;


A. 16 B. 25 C. 49 D. 121 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=113 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 114 What is the result, if any, or executing the following code? DCL A BIT(1) INIT(’0’B); DCLB BIT(1) INIT(’0’B); DCLC BIT(1) INIT(’1’B); A = ^B & C; A. The value of A is ‘OS. B. The value of A is’1’S. C. The value of A is unpredictable. D. There is no result because the syntax is wrong. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=114 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 115 What would be printed, if anything, to SYSPRINT after executing the following code? DCL A BIN FIXED(15) INIT(1000); DCL B PlC ‘99999’ INIT(2000); B = A + B; PUT SKIP LIST(’THE VALUE OF B IS:’ !! B);

A. THE VALUE OF B IS :3000 B. THE VALUE OF B IS :03000 C. THE VALUE OF B IS:3000 D. Nothing will be printed because CONVERSION would be raised. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=115 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 116 What is the most appropriate declaration for the variable X? X = 1234567890.123;

A. DCLXCHAP(14); B. DCLX BIN FIXED(15); C. DCLX DEC FIXED(153); D. DCLX PlC ‘99999999V.999’; Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=116 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 117 What is the most appropriate declaration for the variable A? A = ‘10010001’B;


A. OCL A CHAR(2); B. OCL A BIT(8); C. OCL A PlC ‘9999999’; D. OCL A BIN FIXED(15); Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=117 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 118 Which of the following statements must NOT be used to exit a BEGIN block?

A. END B. GOTO C. LEAVE D. RETURN Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=118 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 119 What has to be done, if anything, when the compiler warns that a variable may be uninitialized when used?

A. Use the DFT(INITFILL) compiler option so the message will disappear. B. Make sure the variable has a valid content before using it. C. Initialize the variable to blank. D. Ignore the message. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=119 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 120 Given the following declarations, which code is always a valid way to test if the value of B is 7? DCL P POINTER NIT (NULL()); DCL B FIXED BIN (31) BASED (P); A. IF ^ = NULL() THEN IF B = 7 THEN PUT (‘OK’); B. IF B ^ = 7 THEN; ELSE PUT (‘OK’); C. IF B = 7 THEN PUT (‘OK’); D. IF P ^= NULL() ! B = 7 THEN PUT (‘OK’); Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=120 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 121 Given the following program, what will be output? TEST: PROC OPTIONS(MAIN); DCL 1


B, 2 B1 FIXED BIN(31) INIT(1), 2 B2 FIXED BIN(31) INIT(2), 2 B3 FIXED BIN(31) INIT(4), 2 B4( 4 ) FIXED BIN(31), 2 B5 FIXED BIN(31) INIT(5), 2 B6( 5 ) FIXED BIN(31); CALL SUB( ADDR(B) ); SUB: PROC( P); DCL P POINTER, N1 FIXED BIN(31), N2 FIXED BIN(31), 1 A BASED(P), 2 A1 FIXEDBIN(31), 2 A2 FIXEDBIN(31), 2 A3 FIXED BIN(31), 2 A4( N1 REFER(A3) ) CHAR(4), 2 A5 FIXED BIN(31), 2 A6( N2 REFER(A5) ) CHAR(4); PUT SKIP LIST ( STG(A)); END; END;

A. 24 B. 36 C. 40 D. 52 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=121 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 122 If the physical dataset referred to by DDOUT has a maximum record length of 4096 and a RECFM=V, what happens after executing the following code? DCL DDOUT FILE RECORD OUTPUT; DCL OUT_CHAR CHAR(500) VARYING INIT(’This is a varchar test’); OPEN FILE(DDOUT); WRITE FILE(DDOUT) FROM(OUT_CHAR);

A. One record with a length of 22 will be written to the output file. B. One record with a length of 500 will be written to the output file. C. One record with a length of 4096 will be written to the output file. D. An error will occur because of mismatch of record length. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=122 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 123 What would be printed, if anything, to SYSPRINT after executing the following code? DCLA CHAR(5) INIT(’1000’); DCL B PlC ‘S99999’ INIT(2000); B = A + B; PUT SKIP LIST(’THE VALUE OF B IS:’ !! B);

A. THE VALUE OF B IS :+ 3000 B. THE VALUE OF B IS :+03000 C. THE VALUE OF B IS: D. Nothing will be printed because CONVERSION would be raised. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=123 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 124 Which of the following will be achieved when making a program FETCHABLE?


A. Improved performance B. Larger load size of the main program C. Easier maintenance D. Reduced memory requirements for the FETCHed program Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=124 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 125 Given the following code, what is the value of X after execution of the assignment? DCL X CHAR (5) lNlT (‘ABCDE’); DCL Y CHAR (3) lNlT (‘123’); X=Y A. ‘123’ followed by ‘DE’ B. ‘123’ followed by low values C. ‘123’ followed by blanks D. ‘ABCDE’ Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=125 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 126 What is the result of executing the following code? DCLA CHAR(6) INIT(’100.50’); DCL B BIN FIXED(15) INIT(50); B = A + B;

A. The value of B is 150. B. The value of B is 150.50. C. The value of B is 101. D. CONVERSION would be raised. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=126 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 127 Given the following code, what condition prefixes should be placed before the statement to ensure that the reference is valid? PUT SKIP LIST( ‘< !! SUBSTR(X,1 ,N) !!’>’);

A. SIZE B. SUBSCRIPTRANGE C. STRINGSIZE D. STRINGRANGE Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=127 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 128 When the following program is executed, the compiler will produce this warning message:


“FIXED DEC(7,2) operand will be converted to FIXED OIN(25,7). Significant digits may be lost.” The best way to fix this problem and have the output value be 29.20 is to change the last assignment statement to which of the following? TEST: PROC; DCL 1 REC_OUT, 03 AVAIL FIXED BIN(31), 03 TOTAL_SPARE FIXED DECIMAL(7,2), 03 WORK_TOTAL FIXED DECIMAL(7,2); AVAIL= 17; WORK_TOTAL = 12.2; TOTAL_SPARE = AVAIL + WORK_TOTAL PUT SKIP LIST( TOTAL_SPARE); END;

A. TOTAL_SPARE = DEC( AVAIL + WORK_TOTAL); B. TOTAL_SPARE = DEC(AVAIL) + WORK_TOTAL; C. TOTAL_SPARE = AVAIL + BIN( WORK_TOTAL); D. TOTAL_SPARE = BIN( AVAIL + WORK_TOTAL); Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=128 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 129 What is the value of A after executing the following code? DCL A CHAR(8) NIT (‘EfGhIjKI’); DCL TRANSLATE BUILTIN; A = TRANSLATE(A,’ABCDEFGH’,’abcdefgh’);

A. efghijkl B. efghIjKI C. EFGHIJKL D. EFGHIjKI Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=129 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 130 Which of the following must be used to load and unload a program to and from main memory?

A. FETCH and RELEASE B. LOAD and UNLOAD C. ALLOCATE and FREE D. GET and PUT Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=130 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 131 What are the values of the elements of the array A, if any, after executing the following code? DCLA(5) BIN FIXED(15) INIT((5)(0)); DCL I BIN FIXED(31); DO I =-1 TO 1; A(l) = 1; END;

A. 1,1,1,0,0


B. 1,0,0,0,0 C. There is a syntax error. D. SUBSCRIPTRANGE would be raised if enabled. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=131 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 132 What will be the output of the following program? MAIN: PROC OPTIONS(MAIN); DCL A CONTROLLED FIXED BIN(31); DCL B CONTROLLED FIXED BIN(31); DCL JX FIXED BIN(31); DO JX= 1 TO 4; ALLOC A; A = JX; END; DO WHILE( ALLOCN(A)> 0); ALLOC B; B = A; FREE A; END; DO WHILE( ALLOCN(B) > 0); PUT SKIP LIST( B); FREE B; END; END;

A. 1111 B. 1234 C. 4321 D. 4444 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=132 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 133 If FUNC_CODE is a CHAR(4) variable, then for the following code, what is the best declaration for GHU, GU, etc SELECT( FUNC CODE); WHEN( GHU) … WHEN( GU ) … etc END; A. DCL (GHU INIT(’GHU’), GU INIT(’GU’), …) CHAR(4); B. DCL (GHU INIT(’GHU’), GU INIT(’GU’), …) CHAR(4) STATIC; C. DCL (GHU VALUE(’GHU’), GU VALUE(’GU’), …) CHAR(4); D. DCL (GHU INIT(’GHU’), GU INIT(’GU), …) CHAR(4) AUTOMATIC; Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=133 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 134 What must be done, if anything, before calling the program U if it is declared as follows? DCL U ENTRY OPTIONS (FETCHASLE);

A. FETCH U; B. ALLOCATE U; C. LOAD U; D. Nothing needs to be done. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=134 -------------------------------------------------------------------------------------------------------------------------------------


QUESTION: 135 Given the following code: DCL (K, L) FIXED BIN (31) INIT (0); DCL SUB ENTRY( FIXED BIN(31) BYADDR, FIXED BIN(31)) OPT IONS(BYVALUE); CALL SUB(K, L); PUT(K, L); and the following external procedure: SUB: PROCEDUPE(K, L) OPTIONS( BYVALUE); DCL (K BYADDR, L) FIXED BIN(31); K = 10; L = 10; END; Which numbers are output by the PUT statement?

A. 0,0 B. 0,10 C. 10,0 D. 10,10 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=135 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 136 Given the following declarations, which code is INVALID? DCL (P,Q) POINTER; DCLX CHAR(16) BASED(P);

A. ALLOCXSET(P); FREE X; B. P = ALLOC(STG(X)); FREE X; C. P = AUTO(STG(X)); FREE X; D. ALLOCXSET(Q); P = Q; FREE X; Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=136 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 137 If the following syntax is incorrect, how should the syntax be changed? READ FILE(DDIN) IN STRUC1;

A. READ FILE(DDIN) INTO STRUC1; B. READ FILE(DDIN) IN(STRUC1); C. READ FILE(DDIN) INTO(STRUC1); D. No changes are necessary. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=137 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 138 Which message will be displayed, if any, when the following code is executed with the Enterprise PL/I compiler using default compiler options? DCL 1 STRUCTURE, 2 A CHAR(4), 2 P PTR; STRUCTURE = “; SELECT (P); WHEN (NULL()) PUT LIST (‘P IS NULL’); WHEN (SYSNULLO) PUT LIST (‘P IS SYSNULL’); OTHERWISE PUT LIST (‘P is something else’); END;


A. P is SYSNULL B. P NULL C. P is something else D. The compiler will generate an error for the assignment statement. Forcing execution will produce unpredictable results. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=138 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 139 What will be printed to SYSPRINT, if anything, after executing the following code? DCL A PlC ‘9999’. A =’ 123’; PUT SKIP LIST(’VALUE OF A lS:’ !! A);

A. VALUE OF A lS: 123 B. VALUE OF A lS :0123 C. VALUE OF A IS: 123 D. No value will be displayed because the assignment statement will cause a conversion error. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=139 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 140 What happens, if anything, after end of rile has been reached in the following code? DCL INF FILE RECORD INPUT; DCL INFIELD CHAR(100) BASED(P); DCL P PTR; DCL EOF BIT(1) INIT(’0’B); ON ENDFILE(INF) BEGIN; EOF = ‘16; ALLOC INFIELD; INFIELD = ‘EOF REACHED’; END; OPEN FILE(INF); READ FILE(INF) SET(P); DO WHILE(^EOF); READ FILE(INF) SET(P); END;

A. Runtime error because there is no CLOSE statement. B. INFIELD will have a value ‘EOF REACHED’ and the program ends. C. There will be an infinite loop. D. Nothing because end of file will never be reached. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=140 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 141 For which of the following data representations is a variable declared with the attribute WIDECHAR meant to be used?

A. ASCII B. EBCDIC C. UTF-16


D. GRAPHIC Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=141 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 142 Given the following code, how many times is the PUT statement executed? DCL I FIXED BIN (31) INIT (0); L1: DO LOOP; I += 1; DO LOOP; I += 1; IF I >= 10 THEN LEAVE L1; PUT SKIP LIST (I); END; END;

A. 7 B. 8 C. 9 D. 10 Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=142 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 143 Which of the following is a DEC FIXED constant?

A. 1000.10 B. 100010B C. 1E+03 D. ‘100010’B Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=143 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 144 In order to use a pointer to access the variable in the following program, with what storage class should Y be declared? A: PROC OPTIONS(MAIN); DCLX FIXED BIN(31) BASED; DCL P POINTER; P = FUNC(); PUT SKIP LIST( P->X); FUNC: PROC RETURNS( POINTER); DCL Y FIXED BIN(31) INIT(17); DCL P POINTER; P = ADDR(Y); RETURN( P); END; END;

A. AUTOMATIC B. BASED C. CONTROLLED D. STATIC Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=144 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 145 What is the key difference between logical file name and physical dataset name?


A. Logical file name is used in the program while physical dataset is not. B. Physical dataset name is used in the program while logical file name is not. C. Logical file name is used in the job control while physical dataset is not. D. Physical dataset name is used in the job control while logical file name is not. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=145 -------------------------------------------------------------------------------------------------------------------------------------

QUESTION: 146 Which of the following is NOT a possible cause of the following compiler message? The end of the source was reached before the logical end of the program.

A. The program is missing a closing quote in some string. B. The program is missing an end of comment. C. The program is missing an END statement. D. The program is missing the name of the outermost PROCEDURE on the last END statement. Answer: http://www.twpass.com/twpass.com/exam.aspx?ecode=000-041&qno=146 -------------------------------------------------------------------------------------------------------------------------------------


TwPass Certification Exam Features; -

TwPass offers over 2500 Certification exams for professionals. More than 98,800 Satisfied Customers Worldwide. Average 99.8% Success Rate. Over 120 Global Certification Vendors Covered. Services of Professional & Certified Experts available via support. Free 90 days updates to match real exam scenarios. Instant Download Access! No Setup required. Price as low as $19, which is 80% more cost effective than others. Verified answers researched by industry experts. Study Material updated on regular basis. Questions / Answers are downloadable in PDF format. Mobile Device Supported (Android, iPhone, iPod, iPad) No authorization code required to open exam. Portable anywhere. Guaranteed Success. Fast, helpful support 24x7.

View list of All Exams (AE); http://www.twpass.com/twpass.com/vendors.aspx

Download Any Certication Exam DEMO. http://www.twpass.com/twpass.com/vendors.aspx

To purchase Full version of exam click below; http://www.TwPass.com/


000 041