Você está na página 1de 43

1) The following statement WRITE OUT-REC.

Which one of the following modes of operating the Sequential file is not true (a) OPEN INPUT (x) (b) OPEN INPUT-OUTPUT (c) OPEN EXTEND (d) OPEN OUTPUT 2) The same file name can be specified in the USING and GIVING phrase of a SORT statement. (1) True (x) (2) False 3) If USING is specified in the SORT verb, then GIVING must also be specified. (1) True (2) False (x) 4) In SORT statement, all keys must be specified as ascending or descending but not as combination of the two (1) True (2) False (x) 5) SORT RAFFLES_FILE ON ASCENDING KEY IBM-MAIN Y2K-MAIN USING INPUT-FILE GIVING OUTPUT-FILE. Which one the following is true. (1) The sorted file will contain all Raffles records in ascending order of Y2K-MAIN. (2) IBM-MAIN is the major key and Y2K-MAIN is the minor key (x) (3) The statement is wrong as there should be only one key since the clause ascending key appears only once. (4) Both INPUT-FILE and OUTPUT-FILE must be described in the DATA DIVISION with SD entries. 6) SORT STUDENT-FILE ON ASCENDING KEY CLASS-NUMBER STUDENT-NAME USING INPUT-FILE GIVING OUTPUT-FILE. Which one of the following is false. (1) All records with same CLASS-NUMBER will appear together in the consecutive positions of the sorted file. (2) The data-names CLASS-NUMBER and STUDENT-NAME must appear in the record description of STUDENT-FILE. (3) The files INPUT-FILE and OUTPUT-FILE should be opened by an OPEN statement before the SORT statement. (x) (4) The sizes of the records described for STUDENT-FILE , INPUT-FILE and OUTPUT-FILE must be equal. 7) About the MERGE verb,which one of the following is true. (1) Can merge a maximum of three files. (2) Does not require that the input file to be merged be sorted on the merge keys. (3) Requires that all files mentioned in the statement must have records of same size (x) (4) Does not require that the position of the merge keys with in the records descriptions of each of the files must be same.

8) Indicate which one the following is not a valid combination of a SORT verb (1) USING .. GIVING (2) USING .. INPUT PROCEDURE (3) USING .. OUTPUT PROCEDURE (x) (4) INPUT PROCEDURE .. OUTPUT PROCEDURE 9) Indicate which one of the following will not have the INVALID KEY Phrase when used in connection with sequentially accessed relative file in a PROCEDURE DIVISION with out any declarative section. (1) REWRITE STATEMENT (x) (2) WRITE STATEMENT (3) START STATEMENT 10) WRITE MASTER-REC INVALID KEY GO TO PARA-ERROR. Indicate which of the following are not valid modes of opening the INDEXED file of which MASTER-REC is a record (a) OPEN INPUT (b) OPEN OUTPUT (c) OPEN INPUT-OUTPUT (d) OPEN INDEXED. (1) a and b (2) a and c (3) c and d (4) a and d (x) 11) which of the following is true about the file which is referenced in a DELETE statement (1) It must be opened in INPUT mode (2) It must be opened in OUTPUT mode (3) It must be opened in I-O mode (x) (4) As in the case of SORT statement, the file must be closed before the use of this statement 12) Indicate which of the following statement is not allowed when a relative file is opened to I-O mode and the ACCESS mode is RANDOM (1) READ (2) WRITE (3) REWRITE (4) START 13) Indicate which of the following is not a PROCEDURE DIVISION verb (1) START (2) SEEK (3) RERUN (4) DELETE 14) Indicate which of the following is not a PROCEDURE DIVISION verb (1) REWRITE (2) INSERT (x) (3) DELETE (4) START 15) Indicate which of the statements may indicate DUPLICATE alternative key warning if it occurs

in case of an INDEXED ORGANISATION without DUPLICATE phrase (A) READ (B) REWRITE (C) WRITE (D) DELETE (E) START (1) A,D,E (2) A,B,C (3) A,C,D (4) B,C,D 16) In case of a disk file, the ACCESS MODE clause must always be specified. (1) True (2) False (x) 17) A READ statement can have AT END clause and INVALID KEY clause, but both must not appear simultaneously. (1) True (x) (2) False 18) With a READ statement either AT END clause or INVALID KEY clause must be specified (1) Yes (2) No (x) 19) Relative key clause must be mentioned in case of a Relative file organisation. (1) Yes (2) No (x) 20) The START statement enables the programmers to start processing from any record position. (1) True (x) (2) False 21) Both the RECORD KEY and ALTERNATIVE KEY clause can be specified for and INDEXED file. (1) True (x) (2) False 22) 77 A PIC X(10) VALUE IS AABBCCDDEE.In PROCEDURE DIVISION contains the statement EXAMINE A REPLACING ALL ABC BY XYZ .Indicate which one of the following is true (1) The EXAMINE statement is incorrect because A does not contain the character ABC in a continuous sequence (2) The EXAMINE statement is incorrect as it can be used to replace a numeric literal by another numeric literal. (3) The EXAMINE statement is incorrect as it is used to replace a single character by another single character but not a group of characters. (x) (4) The EXAMINE statement is incorrect as TALLYING OPTION is missing. 23) The UNSTRING verb is used to transfer data from several sources to one receiving field. (1) Yes (2) No (x) 24) The STRING verb can be used to tranfer characters from one alphanumeric field to another alphanumeric field starting at some particular position in receiving field (1) False (x)

(2) True 25) If the DELIMITED BY SIZE phrase is used with STRING verb, the transfer of characters in to the receiving field stops as soon as a blank is encountered in the sending field (1) Yes (2) No (x) 26) The INSPECT statement can be used to check whether the value in a data name is numeric (1 True (2 False (x) 27) In an UNSTRING statement a receiving field receives the characters of the sending field including the delimiter. (1) True (2) False (x) 28) If the OVER FLOW option is not used in a STRING statement and the overflow condition occurs, the STRING operation is terminated. (1) True (2) False (x) 29) In an UNSTRING statement if a receiving field with PICTURE X(06) receives only two characters from the sending field the remaining four positions will retain their original characters (1) True (2) False (x) 30) UNSTRING ABC INTO FIELD-1. Indicate which one of the following is correct. (1) There will be a syntax error, as the statement does not contain any DELIMITED BY phrase. (2) There will be a syntax error, as the sending string must be identifier and not a literal. (x) (3) The statement is correct and after the execution of the statement field-1 will contain the three characters ABC from the left-most position and the remaining positions of field-1 will remain unchanged (4) The statement is correct and after the execution of the statement field-1 will contain the three characters ABC from the left-most position and the remaining positions of field-1 will get filled with spaces. 31) Indicate in which of the following, the REPORT NAME does not appear (1) RD entry (2) INITIATE statement (3) SELECT clause (x) (4) TERMINATE statement 32) Which of the following Report groups must have a data name for its identification. (1) REPORT HEADING (2) REPORT FOOTING (3) DETAIL (x) (4) PAGE HEADING (48) CONTROL FOOTING

33) Indicate which of the following clause is not allowed in a RD entry (1) FIRST DETAIL (2) LAST DETAIL (3) CONTROLS (4) LINE NUMBER (x) 34) Indicate which of the following, performs the initialization of the sum controls, LINE-COUNTER and PAGE-COUNTER to their initial values. (1) RESET (2) INITIATE (x) (3) VALUE (4) GENERATE 35) Which of the following is not allowed to assign a value to a data name in a REPORT SECTION. (1) MOVE (2) TOTAL (x) (3) SUM (4) SOURCE 36) A formal parameter name can appear more than once in the USING phrase of the PROCEDURE DIVISION header of the subroutine (1) True (2) False (x) 37) The calling program contains the statement CALL RAFF USING A,B,C. And the PROCEDURE DIVISION header of the called subroutine(called RAFF) is PROCEDURE DIVISION USING C,B,A. Which one of the following gives the correct information about the actual and formal parameters has been connected. (1) Actual A with Formal A, Actual B with Formal B, Actual C with Formal C. (2) Actual A with Formal B, Actual B with Formal C, Actual C with Formal A. (3) Actual A with Formal C, Actual B with Formal B, Actual C with Formal A. (4) None of the above 38) Identify the incorrect statement (1) CALL RAF-SUB. (2) CALL RAF-SUB ON OVER FLOW GO TO MIS-SUB. (3) CALL RAF-SUB USING PARAM-1. (4) CALL RAF-SUB USING PARAM-1 UNTIL PARAM-1 >10 (x)

1) The following portion of procedure division MOVE 0 TO A, I. PARA-1. ADD 3 TO A. ADD 2 TO I. IF I < a=" ,">B MOVE A TO C ELSE MOVE B TO C. ADD C TO D. Indicate which one of the following does not support the above statements 1. The value of A will be added to D only if A is greater than B. 2. The value of B will be added to D only if B is greater than A. 3. The larger of the values, A and B will be added to D. 2) IF NOT AGE LESS THAN 30 AND 40 GO TO PARA-AGE-MIDDLES. The controls will go to the paragraph named PARA-AGEMIDDLE. (a) if AGE is greater than or equal to 40. (b) If AGE is greater than or equal to 30. (c) If AGE is greater than or equal to 30 but less than 40. (d) If AGE is less than or equal to 30. 3) Indicate which of the following is true about the 88 level entry. (a) it is used for individual data item in working-storage section. (b) It is used for items with rename clause. (c) It is used for a data item which redefines another data item. (d) It is used for a condition name which can have either a true or false. 4) IF A = 1 OR 2 OR 3 NEXT SENTENCE ELSE MOVE A TO B. Which of the following describes the above sentence correctly. (1) IF A NOT = 1 OR 2 OR 3 MOVE A TO B. (2) IF NOT A = 1 AND 2 AND 3 MOVE A TO B. (3) IF A NOT = 1 AND 2 AND 3 MOVE A TO B. (4) IF A NOT = 1 OR A NOT = 2 OR A NOT = 3 MOVE A TO B. 5) IF A <> D GO TO P1 ELSE IF NOT (A > B OR B < a="6," b="7," c="5" d="8"> (1) P1 (2) P2 (3) P3 (4) NONE OF THE ABOVE. 6) Determine the total number of bytes in the following. 01 REC-1. 02 FIRST-GROUP. 03 A1 PIC X(4). 03 A2 PIC 99. 02 REDEFINES FIRST-GROUP. 03 A3 PIC 999.

03 A4 PIC 999. 02 THIRD-GROUP. 03 A5 OCCURS 5 TIMES PIC 99. (1) 22 (2) 16 (3) 12 (4) 14 7) Determine the bytes 01 REC-1. 01 A PIC X(6). 02 B REDEFINES A. 03 C OCCURS 6 TIMES PIC 9. 02 D OCCURS 4 TIMES. 03 E PIC X(5). 03 F PIC 999. 1) 38 2) 44 3) 14 4) 12 8) Which of the following statements are incorrect. (1) Subscripting enables us to write a more compact code in the procedure division. (2) Subscripting enables us to refer to any element of a table by the same data name with the facility of identifying the particular element through the values of subscript. (3) Subscripting reduces the number of entries to be included in the data division. (4) Subscripting enables us to use loops in the procedure division.

1) The association between a filename and corresponding file medium is done in (a) Date-compiled paragraph, identification division (b) Object-computer paragraph, configuration section and environment division (c) File-control paragraph, I-O Section and environment division (d) I-O control paragraph, I-O Section and environment division. 2) The following is Data Division entry 01 EMP-RECORD. 02 EMP-NAME. 04 FIRST-PART. 05 FIRST-NAME PIC X (10). 05 MIDDLE-NAME PIC X (10). 04 SURNAME PIC X(20). Which one of the following gives correct information about the above record description. a) It is correct. b) It is not correct because first-name and middle name contain the same PIC Clauses c) Not correct because the PIC Clause is missing for the first three data items. d) Not correct because the level number 03 is missing

3) Indicate which one of the following is correct a) 01 level entry cannot have any picture clause. b) 01 level entries may appear in any section of the Data Division. c) 01 level entries may appear only in the File Section. d) 01 level entries may appear only in the working-storage section and that too after all 77 level entries. 4) The following combination of edit characters can appear in the same PIC clause Except a. -$* b. $CR c. $Z9 d. -$CR e. -$Z9 5) Determine the size of the data item -9(4). 99 a) 6 b) 7 c) 8 d) 4 6) Determine the size of the data item SPPPP9999 a) 9 b) 5 c) 8 d) 4 7) Which one of the following is correct a) $$Z(4).99 b) $9(4)zz.99 c) A(4)BB d) +9(5).99CR 8) The smallest negative dollar amount with a dollar in the output that can be edited Through the picture string -$$$$ is 1) 1000 2) 9999 3) 999 4) 100 9) To describe a record the level numbers may be chosen from 1. 01 to 77 2. 01 to 49 and 77 3. all odd numbers from 01 to 49 4. 01 to 49

10) In the following entries which is valid entry 1. 02 Amount pic $ZZZZ9.99 2. 02 UNDER-LINE PIC X(132) VALUE IS ALL * 3. 03 FILLER PIC X(40) VALUE SPACES 4. 03 A PIC X (6) VALUE 123456. 11) Indicate which one of the following is not a valid delimiters in Cobol 1. , 2. ; 3. . 4. (x) 12) Indicate which one of the following is an invalid paragraph name 1. 12345 2. ZZ99 3. ABC-5 4. PARA+5 13) The picture of RAFFLES IS 02 RAFFLES PIC 999V99 What will be the content of raffles when the following data is named to it? 7892^23 a. 78922 b. 89223 c. 78900 d. 89223 14) Indicate which one of the following is correct 1. ADD A TO B GIVING C. 2. ADD A TO B, C TO D. 3. ADD A B TO C D GIVING E F. 4. ADD A B GIVING C D. 15) Indicate which one of the following is incorrect 1. SUBTRACT A FROM B GIVING D E F. 2. SUBTARCT A FROM D, B FROM E, C FROM F. 3. SUBTARCT A B C FROM D E GIVING F G. 4. SUBTRACT A B C FROM D E F. 16) Indicate which one of the following is correct 1. MULTIPLY A TIMES B. 2. MULTIPLY A INTO B. 3. MULTIPLY A BY B GIVING C. 4. MULTIPLY A BY B BY C. 17) Indicate which one of the following is incorrect 1. DIVIDE A INTO B. 2. DIVIDE A BY B. 3. DIVIDE A INTO B GIVING C.

4. DIVIDE A BY B GIVING C. 18) The Cobol compiler at the time of compilation indicates the error in the following Statement MULTIPLY 0.1 BY A. Which of the following had given the correct clause? 1. A has the PICTURE CLAUSE 9(4) V99. 2. A has the PIC CLAUSE ZZZ9.9 3. The Giving Option is missing 4. A is declared in the file section and not in the working storage section 19) In the statement WRITE PRINT-LINE AFTER ADVANCING TWO LINES indicates that two is a 1. Data name 2. Numeric literal 3. Figurative constant 4. Mnemonic name 20) The following is a Procedure division statement READ IN-FILE INTO IN-REC AT END CLOSE IN-FILE STOP RUN. Where IN-REC is the record-name of IN-FILE. Which one of the following is Correct? a. The AT END path is followed if any record becomes shorter than the record Definition. b. The statement is correct since IN-REC is the record name of the IN-FILE c. The statement is incorrect since AT END should be followed by GO TO statement d. The AT END path is taken if all the records have been read and the current read encounters the end of file. 21) In DATA DIVISION the entries are 01 BILL. 02 A PIC 99. 02 FILLER PIC X(7). Indicate which one of the following statement in the Procedure division is correct a. MOVE AB TO A. b. MOVE SPACES TO A. c. MOVE ZEROS TO A. d. MOVE SPACE TO FILLER.

Which of the following is not a procedure division verb? A) Read B) Insert C) Delete D) Start Which of the following is false about the formal parameters in a subroutine? A) Every formal parameter must appear in the linkage section of the subroutine B) Every formal parameter must appear in the using phrase of the procedure division header of the subroutine C) A formal parameter name can appear more than once in the using phrase of the procedure division header of the subroutine D) A formal parameter can be used as a data name in the procedure division statements of the subroutine Perform and call accomplishes functions that are similar in nature but there are a few basic differences, which of the difference is incorrect ? A) Perform does not allow parameters whereas call does. B) Perform refers to the same program whereas call refers to a separately compiled subprogram C) Perform allows repeated invocations in the same statement whereas call invokes the subprogram only once D) Perform refers to only one paragraph whereas call refers to an entire subprogram consisting of any number of paragraphs Indicate which of the following is false? A) The copy statement is executed during compile time rather than run time B) The replacing phrase in the copy statement cannot be used to omit a part or whole of a library text C) The copy statement must be preceded by a space character and terminated by a period D) The library text to be copied by a copy statement must not include any copy statement The COBOL program contains the following IF statement IF VAR1 NOT = 'P' OR 'Q' OR 'R' PERFORM PARA-ERROR As a result of this statement, PARA-ERROR will be executed A) If VAR1 has some value other than 'P', 'Q' and 'R' B) Always irrespective of the value of VAR1 C) Never, irrespective of the value of VAR1 D) If VAR1 was defined as a condition-name with values 'P', 'Q' or 'R'

Consider the following PROCEDRE DIVISION statement: IF VAR1 LESS THAN VAR2 WRITE REC-1 ELSE WRITE REC-2 if, before executing this statement, VAR1 contains alphanumeric Literal 'l' and VAR2 contains alphanumeric literal 'A', then A) REC-1 is always written B) REC-2 is always written C) Action depends on the computer system on which the program runs D) Compiler error results The following statement is used in a COBOL program: PERFORM UPDATE-INPUT UNTIL DONE Irrespective of the context in which it is given, it may be said that A) DONE is a data-name whose value gets defined in an exception handling section B) DONE is a condition-name C) DONE is a data-name whose value gets decremented at each exit of the paragraph D) DONE is a data-name whose value gets decremented at each entry of the paragraph. The record description of EMPLOYEE-RECORD is given in four different ways below. The only correct choice is: A) 01 EMPLOYEE-RECORD. 10 EMP-CODE PIC X(6). 10 EMP-NAME PIC X(25). 10 FILLER PIC X(60). B) 01 EMPLOYEE-RECORD PIC X(91) USAGE DISPLAY. 10 EMP-CODE PIC X(6). 10 EMP-NAME PIC X(25). 10 FILLER PIC X(60). C) 01 EMPLOYEE-RECORD. 05 EMP-CODE PIC X(6). 10 EMP-NAME PIC X(25). 15 FILLER PIC X(60). D) 01 EMPLOYEE-RECORD PIC X(91). 10 EMP-CODE PIC X(6). 10 EMP-NAME PIC X(25). 10 FILLER.

Consider the following WORKING-STORAGE section entries: 01 WEEK-DAY-NAMES PIC X(45) VALUE 'MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY'. 01 WEEK-DAYS REDEFINES WEEK-DAY-NAMES. 02 WEEK_DAY PIC X(9) OCCURS 5 TIMES. Use of WEEK-DAY(4) in the PROCEDURE division will produce the value: A) 'NESDAY TH' B) 'URSDAY FR C) 'WEDNESDAY' D) None of the above, syntax errors result COBOL verb that is not directly related with an index name is A) SEARCH B) SET C) PERFORM D) SORT References to the file names that appear in A) Environment and Data Divisions only B) All four divisions C) Environment, Data and Procedure divisions only D) Data Division only A COBOL program contains the WORKING-STORAGE SECTION declaration: 01 VAR1 PIC X(3). Which of the following Procedure Division statements may result in a compiler error? A) IF VAR1 IS ALPHANUMERIC PERFORM PARA-1. B) IF VAR1 IS ALPHABETIC PERFORM PARA-1. C) IF VAR1 IS SPACE PERFORM PARA-1. D) IF VAR1 IS NUMERIC PERFORM PARA-1. (ALPHANUMERIC is not a class condition) How many bytes of storage are required to hold INPUT-REC in the following declaration? 01 INPUT-REC. 05 INPUT-GROUP OCCURS 12 TIMES. 10 INPUT-BATCH-A PIC 9(5) OCCURS 5 TIMES. 10 FILLER PIC X(5). 10 INPUT-BATCH-B PIC 9(5) OCCURS 5 TIMES.

A) 900 B) 600 C) 605 D) 660

Four data-names VAR-1, VAR-2, VAR-3 and VAR-4 are defined as following Data-name PIC clause Value Initialized to VAR-1 999 015 VAR-2 999 005 VAR-3 999 000 VAR-4 999 000 On executing the PROCEDURE DIVISION statement DIVIDE VAR-1 INTO VAR-2 GIVING VAR-3 REMAINDER VAR-4 these data-names will respectively assume values: A) 15, 0, 0, 5 B) 15, 5, 3, 0 C) 3, 5, 3, 0 D) 15, 5, 0, 5 A COBOL program will give a compile error at the following statement ADD 10 TO VAR-1 If ? A) VAR-1 is not initialized to zero B) VAR-1 has a PIC 999V9. C) VAR-1 is declared in the FILE SECTION and not the D) WORKING-STORAGE SECTION. E) VAR-1 has a PIC ZZZ9. Which one out of the following is incorrect? A) RENAME is used to regroup elementary items in a group. B) Renamed elementary items must be contiguous memory C) A Special level number 66 is used with RENAME clause D) RENAME clause can regroup a 01, 77, 88 or 66 entry.

State True/false EDITED PICTURE ITEMS CAN not HAVE VALUE CLAUSE A) True B) False C1, C2 and C3 are condition-names. Consider the following compound conditions: A. C1 OR C2 OR C3 B. C1 AND C2 AND C3 C. C1 OR (C2 AND C3) D. C1 AND (C2 OR C3) if C1 is known to evaluate to 'False' which of the above four conditions can be evaluated without additional information? A) NONE (C2 and C3 should also be evaluated in every case) B) ALL (All conditions evaluate to 'False') C) A AND C evaluate to 'True' D) B AND D evaluate to 'False' The function of the imperative statement RELEASE in COBOL is to A) Obtain the output record from a SORT B) Free the least recently used PROCEDURE division segment C) Move an input record to a SORT D) Free an assigned peripheral Which of the following is correct about level number 15 A) Must always have a PIC clause B) May describe a group item or an elementary item C) Must always appear in the file section D) Must always describe an elementary item Which of the following is not correct about the format of data division entries A) Entries with level number 01 must start in columns 8 to 11. B) Entries with level number 77 can start in column 8 or any column to its right but not beyond 72. C) Entries with level numbers 02 to 49 can start in column 8 or any column to its right but not beyond column 72 D) Data name or filler in any data division entry, cannot begin before column 12 and a gap of one space should be there between the level number and the data name or filler.

Which one of the following is not a valid delimiter in COBOL

A) ; B) C) , D) space Which one of the following is correct.? A) ADD A B GIVING C D B) ADD A TO B GIVING C C) ADD A TO B, C TO D D) ADD A B TO C D GIVING E F Which one of the following is correct? A) MULTIPLY A TIMES B B) MULTIPLY A BY B BY C C) MULTIPLY A INTO B D) MULTIPLY A BY B GIVING C Find which one of the following does not give the correct description of the usage clause. A) It is used in a data description and restricts the procedure division statements in which the data item can be used B) It is used in a data description affects the memory requirements C) It specifies the internal form of the data item in such a way that it facilitates the use of data item more efficiently D) All the above Which one of the following is true about corresponding phrase? A) It enables one to save memory space B) It helps to reduce coding effort C) It can be used only with the move verb D) It helps to create more efficient object code Which one of the following is false? A) If there is no parenthesis in a compute, then a division is always done before a subtraction. B) All the four arithmetic operators namely, +, -, * and / can be used in the same compute statement, if required C) The data name which is on the left-hand side of the equal sign in a compute statement should be described in the data division as a numeric data item. D) Both rounded and size error phrases can appear in the same compute statement Which of the following is true about 88 level entry?

A) It is used for individual data items in working-storage section B) It is used for items with renames clause C) It is used for a condition name D) It is used for a data item which redefines another data item Which one of the following is FALSE about the SEARCH verb? A) Any number of WHEN clauses can be used with this verb B) The SEARCH verb can only be applied to a table which is defined with the occurs clauses and indexed phrase C) Every search statement must contain the AT END clause D) The SEARCH verb passes control to the next sentence when either a when condition is satisfied or the end of the table is reached without satisfying any of the when conditions Which of the following is false?. A) It is possible to write programs without using GO TO B) The target of a go to statement being a procedure name, avoiding go to results in a program with no procedure names. C) Indiscriminate use of GO TO is not advisable as it can make the control structure of a program substantially complex D) Excessive use GO TO statement can make programs difficult for others to understand Which of the following cannot help us to get the reduce memory requirement of a program in COBOL? A) Reserve clause B) Redefines clause C) Same record area clause D) Rerun clause Which of the following is true about the RESERVE clause?

A) This is a part of file descriptor entry for a given file B) This is used only for file with block contains clause C) This is used whenever more than one file is processed in a program D) This can be used to save memory space by specifying one buffer instead of the usual two buffers Note:RESERVE clause The RESERVE clause allows the programmer to specify the number of record buffers to be allocated at run-time for the files. Example RESERVE 2 AREAS mean that two record buffers are to be allocated.

Which of the following is True about MERGE verb? A) Requires that all files mentioned in the statement must have records of same size B) It can merge only a maximum of three files C) It does not require that the input files to be merged be sorted on the merge keys D) It does not require that the positions of the merge keys within the record descriptions of each of the files must be same Which one of the following is incorrect? A) The case structure can be implemented through go to with depending on phrase as well as simple go to B) The case structure can be implemented through nested if sentence C) The case structure can be implemented through a sequence of if statements D) The case structure can be implemented through go to with depending on phrase but without any simple go to Which of the following is preferred clause for creating an indexed sequential file? A) Access mode is random B) Access mode is sequential C) Access mode is dynamic D) None of the above Which of the following is true about a file where write statement will always place a record in the next physical position A) Relative file B) Indexed sequential file C) None of the above D) Sequential file Which is true about the file which is referenced in a delete statement A) It must be opened in I-O mode B) It must be opened in input mode C) It must be opened in output mode D) As in the case of a sort statement, the file must be closed before the use of this statement How to get the number of members in a PDS without opening it? by issuing line command "I" against the dataset name.

What is the result of the following? MOVE 1 TO VAR1 MOVE 2 TO VAR2 EVALUATE TRUE WHEN VAR1=1 PERFORM PARA-1 WHEN VAR2=2 PERFORM PARA-2 WHEN OTHER NEXT SENTENCE END-EVALUATE. A) PARA-1 will be performed B) PARA-2 will be performed C) Both PARA-1 and PARA-2 will be performed. D) Compile error for incorrect use of NEXT sentence Which of the following is an INCORRECT specification for a data-name? A) var-var1 B) data1 C) two D) all (ALL is a reserved word) What is the result of the following? MOVE 1 TO VAR1 MOVE 2 TO VAR2 EVALUATE TRUE WHEN VAR1=1 PERFORM PARA-1 WHEN VAR2=2 PERFORM PARA-2 WHEN OTHER DISPLAY VAR1 END-EVALUATE. A) PARA-1 will be performed B) PARA-2 will be performed C) Both PARA-1 and PARA-2 will be performed. D) Compile error for incorrect use of NEXT sentence

Which of the following PIC clause is invalid as a floating symbol? A) + B) $ C) S D) -

What is the result of the following? MOVE 0 TO VAR1 EVALUATE TRUE WHEN VAR1=1 PERFORM PARA-1 WHEN VAR1=2 PERFORM PARA-2 WHEN OTHER PERFORM PARA-3 END-EVALUATE. A) PARA-1 will be performed B) PARA-2 will be performed C) Both PARA-1 and PARA-2 will be performed. D) PARA-3 will be performed Which of the following is an invalid paragraph name? A) A-1 B) 999 C) A+1 D) ZZ9 What is the result of the following? MOVE 0 TO VAR1 EVALUATE TRUE WHEN VAR1=1 PERFORM PARA-1 WHEN VAR1=2 PERFORM PARA-2 END-EVALUATE. A) PARA-1 will be performed B) PARA-2 will be performed C) Both PARA-1 and PARA-2 will be performed. D) None of the above

Which of the following is correct definition of figurative constant in COBOL? A) Constants that are represented as alphanumeric text also known as non-numeric literals. B) Constants that are represented in terms of digits, also known as literals C) Data names that are initialized to specific values in DATA DIVISION and retain those values throughout the execution of the program. D) Reserved words that are used as substitutes for certain special constants - numeric and alphanumeric

Where does AREA A in COBOL extends from? A) 8-16 B) 8-11 C) 12-72 D) 8-10 According to the given declarations in Data Division. How many elementary items are described below? 05 CALENDAR-DATE. 08 CALENDAR-DAY PIC 99. 08 CALENDAR-MON PIC 99. 08 CALENDAR-YEAR PIC 99. 05 FILLER PIC X(5). 05 VAR1 PIC XX. 05 VAR2 PIC X. 05 END-DATE. 10 FILLER PIC X(4). 10 END-YEAR PIC 99. A) 3 B) 6 C) 4 D) 5 Where does AREA B in COBOL extends from? A) 8-16 B) 8-11 C) 12-72 D) 8-10 FILE-CONTROL paragraph in a COBOL program appears in A) Input-Ouput Section in Environment Division B) File Section in Data Division C) Procedure Division, it can only be a user-defined paragraph D) Configuration Section in Environment Division

Program-id a paragraph name in IDENTIFICATION division? A) True B) False The Procedure Division of a program contains the statement WRITE MASTER-REC This suggests that the OPEN statement for this file must NOT be A) OPEN INPUT B) OPEN EXTEND C) OPEN INPUT-OUTPUT D) OPEN OUTPUT Program-id is compulsory? A) True B) False Program-id should necessary be same as member name of COBOL program? A) True B) False Rounded precedes the ON SIZE ERROR ? A) True B) False A Numeric literal in COBOL can have at most how many digits? A) 10 B) 160 C) 18 D) 32 A Non Numeric literal in COBOL can have at most how many digits? A) 10 B) 160 C) 18 D) 32 A 01 level cannot have PIC clause? A) True B) False

1) The association between a filename and corresponding file medium is done in (a) Date-compiled paragraph, identification division (b) Object-computer paragraph, configuration section and environment division (c) File-control paragraph, I-O Section and environment division (d) I-O control paragraph, I-O Section and environment division. 2) The following is Data Division entry 01 EMP-RECORD. 02 EMP-NAME. 04 FIRST-PART. 05 FIRST-NAME PIC X (10). 05 MIDDLE-NAME PIC X (10). 04 SURNAME PIC X(20). Which one of the following gives correct information about the above record description. a) It is correct. b) It is not correct because first-name and middle name contain the same PIC Clauses c) Not correct because the PIC Clause is missing for the first three data items. d) Not correct because the level number 03 is missing 3) Indicate which one of the following is correct a) 01 level entry cannot have any picture clause. b) 01 level entries may appear in any section of the Data Division. c) 01 level entries may appear only in the File Section. d) 01 level entries may appear only in the working-storage section and that too after all 77 level entries. 4) The following combination of edit characters can appear in the same PIC clause Except a. -$* b. $CR c. $Z9 d. -$CR e. -$Z9 5) Determine the size of the data item -9(4). 99 a) 6 b) 7 c) 8 d) 4 6) Determine the size of the data item SPPPP9999 a) 9 b) 5 c) 8 d) 4

7) Which one of the following is correct a) $$Z(4).99 b) $9(4)zz.99 c) A(4)BB d) +9(5).99CR 8) The smallest negative dollar amount with a dollar in the output that can be edited Through the picture string -$$$$ is 1) 1000 2) 9999 3) 999 4) 100 9) To describe a record the level numbers may be chosen from 1. 01 to 77 2. 01 to 49 and 77 3. all odd numbers from 01 to 49 4. 01 to 49 10) In the following entries which is valid entry 1. 02 Amount pic $ZZZZ9.99 2. 02 UNDER-LINE PIC X(132) VALUE IS ALL * 3. 03 FILLER PIC X(40) VALUE SPACES 4. 03 A PIC X (6) VALUE 123456. 11) Indicate which one of the following is not a valid delimiters in Cobol 1. , 2. ; 3. . 4. (x) 12) Indicate which one of the following is an invalid paragraph name 1. 12345 2. ZZ99 3. ABC-5 4. PARA+5 13) The picture of RAFFLES IS 02 RAFFLES PIC 999V99 What will be the content of raffles when the following data is named to it? 7892^23 a. 78922 b. 89223 c. 78900 d. 89223 14) Indicate which one of the following is correct 1. ADD A TO B GIVING C. 2. ADD A TO B, C TO D. 3. ADD A B TO C D GIVING E F.

4. ADD A B GIVING C D. 15) Indicate which one of the following is incorrect 1. SUBTRACT A FROM B GIVING D E F. 2. SUBTARCT A FROM D, B FROM E, C FROM F. 3. SUBTARCT A B C FROM D E GIVING F G. 4. SUBTRACT A B C FROM D E F. 16) Indicate which one of the following is correct 1. MULTIPLY A TIMES B. 2. MULTIPLY A INTO B. 3. MULTIPLY A BY B GIVING C. 4. MULTIPLY A BY B BY C. 17) Indicate which one of the following is incorrect 1. DIVIDE A INTO B. 2. DIVIDE A BY B. 3. DIVIDE A INTO B GIVING C. 4. DIVIDE A BY B GIVING C. 18) The Cobol compiler at the time of compilation indicates the error in the following Statement MULTIPLY 0.1 BY A. Which of the following had given the correct clause? 1. A has the PICTURE CLAUSE 9(4) V99. 2. A has the PIC CLAUSE ZZZ9.9 3. The Giving Option is missing 4. A is declared in the file section and not in the working storage section 19) In the statement WRITE PRINT-LINE AFTER ADVANCING TWO LINES indicates that two is a 1. Data name 2. Numeric literal 3. Figurative constant 4. Mnemonic name 20) The following is a Procedure division statement READ IN-FILE INTO IN-REC AT END CLOSE IN-FILE STOP RUN. Where IN-REC is the record-name of IN-FILE. Which one of the following is Correct? a. The AT END path is followed if any record becomes shorter than the record Definition. b. The statement is correct since IN-REC is the record name of the IN-FILE c. The statement is incorrect since AT END should be followed by GO TO statement d. The AT END path is taken if all the records have been read and the current read encounters the end of file. 21) In DATA DIVISION the entries are 01 BILL. 02 A PIC 99. 02 FILLER PIC X(7).

Indicate which one of the following statement in the Procedure division is correct a. MOVE AB TO A. b. MOVE SPACES TO A. c. MOVE ZEROS TO A. d. MOVE SPACE TO FILLER.

Q.1)Which of the following is valid COBOL word? A. B12-4 B. GROSS C. OVER TIME D. GROSS_SALARY Q.2)Which of the following is not a figurative constant? A. B. C. D. SPACES QUOTE BLANK LOW-VALUE What is the edited value of the picture clause PIC field 9999+ Numeric value moved to the Q.3) field -382 and the Edited value is A. 0382B. 3820C. -0038 D. -0003 Q.4)Which division is used to specify the computer used by the program A. B. C. D. Q.5) Identification Division Environment Division Data Division Procedure Division 1. Initially A=30, B=60 IF A = 40 DISPLAY ABC ELSE NEXT SENTENCE END-IF MOVE 90 TO B. DISPLAY B. What is the output of the program?

A. 30 B. 60 C. 90 D. cant perform the operation Q.6)In WRITE statement it is required to mention the record name and not the file name. A. True B. False Q.7)S9(7) COMP-3 field occupy _________ bytes. A. B. 4 6

C. D.

8 1 ________ clause used for the purpose allows the said area to be referred to by more than Q.8) one data name with different sizes and pictures. A. B. C. D. JUSTIFIED REDEFINES USAGE SIGN A data name gives references to the storage space to the memory where the actual value is Q.9) stored. A. B. True False . If A=10, B=20, C=30,D=0 Then the result of operation ______________ ADD A B TO C Q.10) GIVING D A. 60 B. 50 C. 20 D. 10 Q.11). _______ verb causes the termination of the execution of object program A. STOP RUN B. END C. GO-BACK Q.12)What is the difference between COMP & COMP-3? A. binary format, B. packed decimal format C. packed decimal format & binary format, Q.13)Which of the following is false among the statements? A. B. C. D. 77 level used for elementary level item 88 level used for condition. 77 level can be sub divided themselves 66 level used for RENAMES clause A ____means the specific value which remains unchanged throughout the execution of Q.14) program. A. LITERAL B. GLOBAL C. STOP RUN Q.15)The USAGE clause can be specified at any level. A. True B. False Q.16)Which of the following is not a valid delimiter in COBOL? A. a. ,

B. . C. ; D. Q.17)In a COBOL program specify the column position range of Area A . A. 8-11 B. 12-80 C. 0-7 Q.18)A numeric literal can have maximum of 18 digits A. B. True False The standard left-hand alignment of alphanumeric or alphabetic data can be reversed by Q.19) using the _________CLAUSE. A. B. C. D. JUSTIFIED SIGN SYNCHRONIZED USAGE What is the edited value of the following PICTURE Value Internal Representation $$$$$ Q.20) 009 ______________ A. B. C. D. bbb$9 $9 bbb $9bbb

1. How many comparisons can a single COBOL if statement make?


1 2 There is no limit COBOL if statements are not used to compare variable values

2. Which of the following errors are possible within a COBOL if statement?


Infinite loop Logical Error Runtime Error All of the above

3. The COBOL perform loop is the equivalent of which of the following

structures found in other languages, such as Java or C++


For loop Do-While loop Method None of the Above

4. If someone wanted a COBOL perform "loop" to execute once before the condition is checked, which of the following would they do?
Use a standard perform statement Use an in line perform Skillful use of the COBOL reserved word "AFTER" This is not possible in COBOL

5. A = 0, B = 9.. Perform until a > b Add 2 to a End -perform How many additions are performed?
3 4 5 6

6. If an IF statement is true, whats the first thing it does?


Exits the statement Executes the function Exits the Program Executes the If statement again

7. Not negative means


Equal to 0 Greater than or equal to 1 Less than or equal to 0

Greater than or equal to 0

8. Which of the following is NOT a valid symbol to use in an IF condition


= =< => >

9. Which is the correct ASCII collating sequence?


spaces, special characters, 0-9, A-Z, a-z spaces, a-z, A-Z, 0-9, special characters a-z, A-Z, 0-9, spaces, special characters 0-9, special characters, spaces, a-z, A-Z

10. The word COBOL is an acronym for what?


It is not an acronym. COmputer Basic Operating Language COmmon Business Oriented Language Common OBservation Official Language

11. There are 4 divisions in a cobol program. Which of the following is not one of them?
Identification Division Linkage Division Data Division Procedure Division

12. Cobol is self-documenting.


True False

13. User defined names must follow which one of the following rules?
Multiple word names must be separated with an underscore Names must be 10 or less characters Names must contain at least 1 alpha character in any position. Names must be lower case

14. Cobol paragraphs contain sentences. A sentence must end in a period and can contain multiple statements.
True False

15. Sentences and statements must start on a new line.


True False

16. When defining a file layout it is placed in the file section of the data division. Each record begins with an "01", a space, and the record name. Fields within a record traditionally began with 05?
All of these answers. This is an alternate name for the 05 name. This is a breakdown of the 05 field. This is another format for the field.

17. Condition names are names associated with a field that take on a true/false status depending on whether their value is equal to the field value.

They are indicated by a level number of what?


05 66 88 77

18. If a field is defined as Pic s9(6)v99 comp-3, it uses 5 bytes of storage.


True False

19. If we are limited to 5 bytes of storage, is there be a way to store a complete 8 digit date?
Yes No

20. You store it as YYYYMMDD in 8 bytes. What is the COBOL definition of this field?
Pic Y(4)M(2)D(2) Pic date(yyyymmdd) Pic date(8) Pic X(8)

(1) Index in Cobol is defined as _______ a) Array occurence b) Displacement from begining of Array c) It is sequentially accessible d) Not for Random process

(2) Study the following : 01 A PIC 99v0 value 5. 01 B PIC 9V9 VALUE 6. 01 C PIC 99V9 VALUE 2.8. 01 D PIC 99 VALUE 3. COMPUTE A ROUNDED B C = A + B * C / D a) A=11,B=0.6,c=10.6 b) A=10,B=0.6,C=10.6 c) A=11,B=0,C=10 d) A=10,B=6,C=10 (3) Which of the following statements will not indicate duplicate key warning if it occurs in case of an indexed organisation without DUPLICATES Phrase a) Read b) Write c) Rewrite d) Delete (4) What will happen if you code GO BACK instead of STOP RUN in a standalone COBOL program i.e. a program which is not calling any other program? a) Shows Error b) Nothing happened c) Return to previous step d) Infinite Loop (5) In packed decimal number +2431 how would be stored? a) +2431f b) 02431f c) 02431 d) +2431 (6) Just one -------- statement allows several alternative paths of execution a) evaluate b) if statements c) perform statement d) copy statement

(7) Given the following Data Division Entries : 01 T1. 03 N PIC 99. 03 T2. 04 M OCCURS 1 TO 20 DEPENDING ON N.

05 P PIC XX. Indicate which one of the following is incorrect? a) T1 will have variable size. b) m will have variable no of occurences c) T2 will have variable size. d) The above description is wrong (8) How many bytes will comp-2 occupy? a) 8 bytes b) 4 bytes c) 16 bytes d) 24 bytes (9) How can you reference an element of a 3 dimensional table? a) 2 indexes b) Subscripts c) Search d) Search-all (10) Identify the Syntax error in the following : 01 B pic A(7). 02 C PIC 9(4). ..................... IF(B NUMERIC) ADD 10 TO C. a) condition in the if statement is wrong. b) nothing is wrong c) C is initialized,Add 10 TO C is wrong. d) both b and c should have the same size (11) Temp files can be defined as a) DSN=&&TEMP b) DSN=&TEMP c) DSN=&&XYZ d) BOTh a) and c) are true (12) What do you mean by file status 37. a) File attribute mismatch b) file logically error c) Open specified on the file that doesnt support open mode. d) File opened in write mode (13) How is sign stored in Packed Decimal fields?

a) Sign is stored as a hex value in the last nibble (4 bits ) of the storage b) Sign is over punched with numeric value stored in the last bite c) Sign is stored in hex value in first 4 bits of storage d) None of the above

(14) Consider the following two statements MOVE 10 TO N. PERFORM PARA-X N TIMES STOP RUN. PARA-X. MOVE 5 TO N. How many times PARA-X will be executed? a) 10 b) 05 c) Infinite d) Execution Error (15) How do you set a return code to the JCL from a COBOL program a) By moving a value to RETURN-CODE reg b) By moving a value to RETURN_CODE c) By moving a value to RCODE d) By moving a value to RETURNCODE (16) Indicate which one of the following is not true about the SET verb. a) The verb can be used to set one or more indexes to a particular value b) The verb can be used to move the current value of an index to one or more identifiers c) The verb can be used to increment one or more identifiers by a positive integral value. d) The verb can be used to decrement one or more indexes by a positive integral value. (17) PERFORM ACCULATE-TOTALS VARYING A FROM 1 BY 2 UNTIL A ] 2 AFTER B FROM 1 BY 1 UNTIL B ] 2 AFTER C FROM 2 BY -1 UNTIL C [ -9 How many times accumulate-totals will be executed? a) 10 b) 09 c) 11 d) infinite loop. (18 ) How many times PARA-A is performed PERFORM PARA-A VARYING TIMES-COUNTER FROM 1 BY 1 UNTIL TIMESCOUNTER ]0. STOP RUN. PARA-A. SUBTRACT 1 FROM TIMES-COUNTER.

DISPLAY HAI. a) 10 b) infinite loop c) 2 d) 0 (19) Consider the following: 77 W-NUM PIC 9 VALUE 0. ---------------MOVE 1 TO W-NUM PERFORM PARA-X UNTIL W-NUM ] 9. - -----------PARA-X. ADD 1 TO W-NUM How many times PARA-X will execute? a) 12 b) 10 c) 09 d) Infinite Loop (20) Indicate what value will be displayed after the execution of the DISPLAY statement in the paragraph named P3. MOVE 2 to M. P1. PERFORM P2 9 TIMES. P2. MULTIPLY 2 BY M. P3. DISPLAY M a) 2048 b) 2036 c) 1048 d) None of the above (21) What is the compiler option to show line where the error occurred? a) ARITH(EXTEND) b) TEST c) RENT d) ARITH(COMPAT) (22) Consider the following program statements MOVE 0 TO SW.

PERFORM PRI-OUT UNTIL SW=1 DISPALY NO-OF-REC STOP RUN PRI-OUT. READ IN-FILE AT END MOVE 1 TO SW. WRITE OUO-REC FROM IN-REC. ADD 1 TO NO-OF-REC. if the IN-FILE contains 1000 records what value will be displayed after the PERFORM is over? assume that NO-OF-REC has PIC 9(4) a) 1000 b) 1001 c) 1 d) None of the above (23) 77 WA PIC 9(3)V99 VALUE 23.75 77 WB PIC ZZ9V99 VALUE 123.45 After MOVE WA TO WB The contents of WB will be ? a) b2375 ( b indicates space ) b) 023.75 c) b23.75 ( b indicates space ) d) None of the above (24) The ---- Statements has always allowed you to develop program functions that can be stored seperately from other program code and then be included in the program at a) Perform and Evaluate b) copy and perform c) call and perform d) Copy and call

(25) Identify the incorrect statement a) CALL MY-SUB b) CALL MY-SUB ON OVERFLOW GO TO PARA1. c) CALL MY-SUB USING PARM-1. d) CALL MY-SUB USING PARM-1 UNTIL PARM-1=10
(1) How should an elementary item subscript be declared to be more efficient? a) s9(8)comp b) s9(16)comp c) S9(4)comp d) s9(2)comp (2) A word in the Computer memory is identified by_________ a) word length

b) word size c) word address d) None of the above (3) In an EVALUATE statement, can I give a complex condition on a when clause? a) Yes b) No c) Compilation error d) Syntax error (4) What is the other verb for RELEASE and WRITE ? a) READ and WRITE b) Rewrite and Read c) Write and Read d) Write and Open (5) How could you write a program in a structured format? a) Bottom-up approach b) Each module serving different function c) Program is divded into many exit point d) No go to's (6) Which is more efficient, level 77 OR 01? a) 77 b) 01 c) Both d) Neither (7) Execution of a subordinate module is caused by the use of the COBOL verbs -----------in the superior module a) Perfrom b) Search c) Evaluate d) None of the above (8) Which of the following is true about the file which is referenced in a delete statement? a) Opened in INPUT mode b) Opened in OUTPUT mode c) Opened I/O mode d) None of the above (9) Can the OCCURS clause be at the 01 level? a) Yes

b) No c) only in 77 level number d) All of the above (10) The following are Data division entries 01 A PIC 9(2) VALUE IS 50 01 B PIC 9(3) VALUE IS 950 The following is the procedure Division statement ADD A TO B ON SIZE ERROR DISPLAY 'ON SIZE ERROR' DISPLAY 'B' B What is the value of B when it is displayed? a) 950 b) 1000 c) 100 d) None of the above (11) How many sections are there in data division?. a) 6 b) 3 c) 4 d) None of the above (12) An index can be modified only by a a) Add b) Evaluate c) Perform d) If (13) How is sign stored in a COMP field ? a) in last nibble b) in Least significant bit c) In the most significant bit. Bit is ON if -ve, OFF if +ve d) None of the above

(14) Indicate which one of the following is not true about the SET verb. a) The verb can be used to set one or more indexes to a particular value b) The verb can be used to move the current value of an index to one or more identifiers c) The verb can be used to increment one or more identifiers by a positive integral value. d) The verb can be used to decrement one or more indexes by a positive integral value. (15) How many bytes are allocated for a data item PIC S9(10) binary . a) 5 b) 6 c) 8

d) 10 (16) Consider the below code 01 WS-COUNT PIC 9 VALUE 5. PROCEDURE DIVISION. PERFORM NEW-SECTION THRU NEW-SECTION-EXIT WS-COUNT TIMES STOP RUN. NEW-SECTION. ----------------------------MOVE 10 TO WS-COUNT. -------- --------. NEW-SECTION-EXIT. EXIT. How many times will NEW-SECTION be performed a) 5 times b) 10 times c) 50 times d) will go in loop (17) 01 ws-n pic 9(2) value zero. a-para. move 5 to ws-n. perform b-para ws-n times. b-para. move 10 to ws-n. how many will b-para will execute? a) 10 times b) 0 times c) 5 times d) 50 times (18) ACCEPT WS-DATE FROM DATE WILL RETURN THE CURRENT DATE a) IN DDMMYY FORMAT b) IN YYYYMMDD FORMAT c) IN YYMMDD FORMAT d) IN MMDDYY FORMAT (19) Can you REWRITE a record in an ESDS file? Can you DELETE a record from it? a) Can rewrite (record length must be same), but not delete. b) Both rewrite and delete is possible c) Can delete ,but can not rewrite d) Can not do both

(20) PERFORM RTN-1 VARYING I FROM 1 by 2 UNTIL I > 2 AFTER J FROM 1 BY 1 UNTIL J > 2 AFTER K FROM 2 BY -1 UNTIL K < 1 . HOW MANY TIMES RTN-1 WILL BE EXECUTED ? a) 4 times

b) 5 times c) 6 times d) 8 times

1. Program name: P1. Load library: TRGF99.COBOL.LOADLIB Input File: TRGF99.FILE1 Output File: TRGF99.OUTFILE //JOB1 JOB 124 //STEP01 EXEC PGM=P1 //STEPLIB DD DSN=TRGF99.COBOL.LOADLIB1,DISP=SHR //INFILE DD DSN=TRGF99.FILE1,DISP=SHR //OUTFILE DD DSN=TRGF99.OUTFILE,DISP=MOD In the above scenario, if we execute the above program which one of the following errors we get? a) S806 b)SE37 c)S0C4 d)S0C7 ------------------------------------------------------------------------------------------2. If MAINPGM is a COBOL program that calls another program LINKPGM and passes a value say, 10, that value will be accepted by another variable in link program. Where that variable is declared? a) Working Storage Section of MAINPGM b) Linkage Section of MAINPGM c) Linkage Section of LINKPGM d) Working Storage Section of LINKPGM e) Both b & d --------------------------------------------------------------------------------------3. A file attribute mismatch was encountered. Which of the following status code is related to the above message? a)35 b)39 c)46 d)90 --------------------------------------------------------------------------------------4. Which of the following divisions are mandatory i) IDENTIFICATION ii) ENVIRONMENT iii) DATA iv) PROCEDURE a) i only b) i & ii c) iv only d) i & iv e) iii & iv ------------------------------------------------------------------------------------------5. 01 WS-ABC PIC X. 88 FOUND VALUE Y. 88 NOT-FOUND VALUE N. What is the error in the above code? a) PIC clause is missing in the FOUND declaration. b) PIC clause is missing in the NOT-FOUND declaration.

c) 88 level variables are declared in Area-A. d) 01 level variable is declared in Area-A. ------------------------------------------------------------------------------6. Every file entry in the File Control should have a description in the File Section. a) True b) False ----------------------------------------------------------------------------------7. IF A>B IF A>C DISPLAY A NEXT SENTENCE END-IF DISPLAY C END-IF. DISPLAY B. If A=10, B=5, C=7. What is the output? a) A C B b) A B c) B d) C B -----------------------------------------------------------------------------------------8. What is the statement that is used to stop the execution of the program? a) GOBACK b) EXIT c) STOP RUN d) EXIT -------------------------------------------------------------------------------------------9. MAIN-PARA DISPLAY IN MAIN-PARA. PERFORM PARA1 THRU PARA2. STOP RUN. PARA1. DISPLAY IN PARA1. PARA3. DISPLAY IN PARA3. PARA2. DISPLAY IN PARA2. Assume that the above code is in the PROCEDURE DIVISION of a COBOL program. If the above program is executed, what is the output? a) IN MAIN-PARA b) IN MAIN-PARA c) IN MAIN-PARA IN PARA1 IN PARA1 IN PARA1 IN PARA2 IN PARA3 IN PARA2 IN PARA2 IN PARA3 d) Compilation Error as Para-names are not declared in a proper order. --------------------------------------------------------------------------------10. Can we move a variable containing Alphanumeric value to a variable containing Numeric value? a) Yes b) No

----------------------------------------------------------------------------------11. How many bytes are required to store data internally for a variable defined as PIC 9(7)V99 USAGE COMP-3. a) 4 b) 5 c) 6 d) 9 --------------------------------------------------------------------------------12. Find the number of bytes which will be stored in the variable EMP-RECORD 01 EMP-RECORD. 02 EMP-DATA1. 03 EMP-NAME PIC X(10). 03 EMP-SAL PIC 9(04). 02 EMP-DATA2 REDEFINES EMP-DATA1. 03 EMP-N1 PIC X(12). 03 EMP-N2 PIC 9(02). 02 EMP-DATA3. 03 DEPT1 PIC X(02). 03 DEPT2 PIC X(02). a) 14 b) 16 c) 18 d) 32 ------------------------------------------------------------------------------------13. A PIC 9(2)V9(3) VALUE 10.121 B PIC 9(2) VALUE 12 C PIC 9(2)V99 VALUE 11.23 What will be the value in C after the following statement is executed ADD A, B GIVING C ROUNDED a) 22.121 b) 22.12 c) 22.13 d) 11.23

Você também pode gostar