Free COBOL Multiple Choice Questions:Part 3

11/07/2009 1 Comment

Mainframe COBOL MCQs, Mainframe COBOL free Multiple Choice Questions. 

The answers are highlighted in bold.

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.
Related Posts


1 comment :

 

Aired | The content is copyrighted and may not be reproduced on other websites. | Copyright © 2009-2016 | All Rights Reserved 2016

Contact Us | About Us | Privacy Policy and Disclaimer