Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : When you specified V for RECFM parameter, LRECL value is largest record in the file plus 4 bytes. These four bytes contain the actual length of each variable length record in the file

Google
 
Web mainframegurukul.com

Cobol Multiple Choice Questions By Shravan Wipro

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> COBOL
  View previous topic :: View next topic  
Author Message
Sra1P
Member


Joined: 03 Oct 2013
Posts: 1

Answer was approved by Question owner.
Useful Post
19 votes
Not an useful post
Greate Post!! Salute Author
25 salutes

PostPosted: Thu Oct 03, 2013 3:48 pm    Post subject: Cobol Multiple Choice Questions By Shravan Wipro Reply with quote

COBOL


1) Can you redefine an X(200) field with a field of X(100) ?
a. Yes
b. No
c. Canít say

2) How is sign stored in a COMP field?
a. In the least significant bit
b. In the last nibble
c. Over punched with the numeric value
d. In the most significant bit

3) How many bytes will a S9(8) COMP field occupy?
a. 8 bytes
b. 4 bytes
c. 2 bytes
d. 5 bytes

4) What is SET TO TRUE all about?
a. Set value to condition name variable
b. Set value to related data item
c. Set value to index
d. None

5) What is the length of PIC 9. 99?
a. 3
b. 4
c. 5
d. 2

6) 01 TEST RECORD
02 FIRST PIC X(4)
02 SECOND REDEFINES FIRST PIC S9(4) COMP
will give
a. S0C7
b. Logic error
c. Compile error
d. No error

7) The PIC clause of file status should be
a. XX.
b. 99
c. AA
d. a or b

8) What is the mode in which you will OPEN a file for writing?
a. OUTPUT
b. INPUT
c. EXTEND
d. a & c

9) In a COBOL PERFORM statement, when is the condition tested?
a. After the perform
b. Before the perform
c. Canít say
d. System dependent

10) COPY statement requires _____ compiler option to be in effect
a. RENT
b. LIB
c. DYNAM
d. NODYNAM

11) The Max length of Parm Parameter is
a. 100
b. 200
c. 75
d. None of the Above

12) The Logical Name of the File will be assigned to
a. DD Name
b. Step Name
c. Job Name
d. Joblib

13) What is mean by Half Word Binary
a. S9(8) comp
b. S9(4) comp
c. 9(4) comp
d. S9(2) comp

14) When displaying a data-name, it _______ be part of an output record.
a. Must
b. Mustnít
c. Need not
d. Canít say

15) The ___ cobol verb is used while updating a file.
a. Write.
b. Update.
c. Read
d. Rewrite

16) The____ statement release the resources which are assigned to that file
a. STOP RUN
b. EXIT.
c. WRITE
d. END

17) In a sort file, names used must be in the ........entry.
a. FD
b. SD
c. MD
d. None

18) In an EVALUATE statement, can we give a complex condition on a when clause?
a. Yes
b. No

19) Can a copy member with nested COPY statements
contain the Replacing option?
a. Yes
b. No

20) Consider the following program.
PERFORM 10 TIMES
IF A=B
NEXT SENTENCE
ELSE
DISPLAY B
END-IF
END-PERFORM.
If after 5th iteration A becomes equal to B then what happens.
a. Program will go into a loop.
b. It will do the 6th iteration.
c. It will come out of the perform loop.
d. It will come out of the if loop and do the 6th iteration.

ANS-

1) a
2) d
3) b
4) Ė
5) b
6) d
7) Ė
8) d
9) Ė
10) Ė
11) a
12) a
13) b
14) c
15) d
16) a
17) b
18) a
19) b
20) c


1) If PIC clause for a data item is PPPP999 and the value moved to the data-item is 234 then the edited value taken is
a. 234
b. 2340000
c. .0000234
d. None of the above

2) To update an indexed record we use a __________ statement.
a. Update
b. Write
c. Rewrite
d. Read

3) When displaying a data-name, it _______ be part of an output record.
a. Must
b. Mustnít
c. Need not
d. Canít say

4) The device specified in the Environment Division will change significantly, if the program is run on the different computer.
a. True
b. False

5) 01 TRANSACTION-REC.
05 DATE-OF-SALE PIC 9999.
10 MONTH PIC 99.
10 YEAR PIC 99.
a. Itís a valid statement(entry)
b. Itís an invalid statement(entry)

6) Identify the correct statement;
a. Unlike a Write statement in which the file-name is specified, a Read statement specifies the record-name.
b. Unlike a Read statement in which the file-name is specified, a Write statement specifies the record-name.
c. Both are incorrect.

7) In file handling, the file status of 34 indicates
a. Permanent error
b. Permanent error due to boundary violation
c. Invalid key due to boundary violation
d. Invalid key due to no record found


8) How is sign stored in packed decimal representation of fields
a. Sign is stored as a binary value in the last nibble of storage
b. Sign is stored as a hex value in the last nibble of storage
c. As a default, sign is over punched with the numeric value stored in the last byte
d. None of the above

9) If you were passing a table via linkage
a. A subscript is preferable
b. Index is preferable
c. Both can be used
d. Canít say

10) Indicate which of the following statement is not allowed when a relative file is opened in I-O mode and access is RANDOM.
a. READ
b. WRITE.
c. REWRITE
d. START.

11) The ___ cobol verb is used while updating a file.
a. Write.
b. Update.
c. Read
d. Rewrite

12) The____ statement release the resources which are assigned to that file
a. STOP RUN
b. EXIT.
c. WRITE
d. END

13) The sort file name in the SORT syntax used must be in a ........entry.
a. FD
b. SD
c. MD
d. None

14) In an EVALUATE statement, can we give a complex condition on a when clause?
a. Yes
b. No

15) What is the Next Sentence statement.
a. Gives control to the next verb after the explicit scope terminator
b. Gives control to the next line
c. Gives control to the verb following the last period.
d. A AND B..

16) Can a copy member with nested COPY statements
contain the Replacing option?
a. Yes
b. No

17) Called program can contain Call statements.
a. True
b. False

18) In ......organization the records are stored in contiguous allocation.
a. Sequential
b. Indexed
c. Relative
d. None

19) If you want to store two variables say, subscript and amount in a COMP and COMP-3 field, which one is preferred.
b. For a subscript COMP is preferred and for the amount COMP-3 is preferred.
c. For a subscript COMP-3 is preferred and for the amount COMP is preferred.
d. For a both subscript and amount COMP is preferred.
e. For a both subscript and amount COMP-3 is preferred.

20) Consider the following program.
PERFORM 10 TIMES
IF A=B
NEXT SENTENCE
ELSE
DISPLAY B
END-IF
END-PERFORM.
If after 5th iteration A becomes equal to B then what happens.
a. Program will go into a loop.
b. It will do the 6th iteration.
c. It will come out of the perform loop.
d. It will come out of the if loop and do the 6th iteration.


ANS-COBOL
1 Ėc
2 Ėc
3 Ėc
4 Ėa
5 Ėb
6 Ėb
7 Ėb
8 Ėb
9 Ėa
10-c
11-d
12-a
13-b
14-a
15-c
16-b
17-a
18-a
19-b
20-c





1) JUSTIFIED RIGHT
a. Eliminates the need for extra filler area
b. Move in the procedure division is required to achieve right-justification of data
c. Both (a) and (b)
d. None of the above

2) OCCURS clause can be specified for
a. An elementary item
b. Group item
c. Both (a) and (b)
d. None of the above

3) ___________ verb is used to alter the value of index in COBOL
a. Alter
b. Move
c. Set
d. Both (b) and (c)

4) To update an indexed record we use a __________ statement.
a. Update
b. Write
c. Rewrite
d. Read

5) When displaying a data-name, it _______ be part of an output record.
a. Must
b. Mustnít
c. Need not
d. Canít say

6) In the statement; CALL literal-1 USING identifier-1 Ö.
The identifier specified in the USING clause is defined in
a. Working-storage section
b. Linkage-section
c. File-section
d. Local-storage section

7) The device specified in the Environment Division will change significantly, if the program is run on the different computer.
a. True
b. False


8) ADD CORRESPONDING identifier-1 TO identifier-2.
a. Identifier-1 and identifier-2 must not be data items with level numbers 66, 77, and 88
b. Identifier-1 and identifier-2 can have a REDEFINES clause
c. Identifier-1 and identifier-2 can have a OCCURS clause
d. All the above

9) PERFORM RANGE-TO-BE-EXECUTED
VARYING I FROM 1 BY 1 UNTIL I>15
AFTER J FROM 1 BY 1 UNTIL J>10
a. The range RANGE-TO-BE-EXECUTED will be performed 150 times
b. The range RANGE-TO-BE-EXECUTED will be performed 15 times
c. The range RANGE-TO-BE-EXECUTED will be performed 1 times
d. Wonít be performed, there will be a error message

10) The ____________ statement can only be used if the file is opened in I-O mode
a. Write
b. Read
c. Rewrite
d. All the above

11) A COPY statement cannot occur within another COPY statement
a. True
b. False

12) In file handling, the file status of 34 indicates
a. Permanent error
b. Permanent error due to boundary violation
c. Invalid key due to boundary violation
d. Invalid key due to no record found

13) The utility for compiling COBOL program is
a. IEWL
b. IGYCRCTL
c. IGYCTCRL
d. IKJEFT01

14) How is sign stored in packed decimal representation of fields
a. Sign is stored as a binary value in the last nibble of storage
b. Sign is stored as a hex value in the last nibble of storage
c. As a default, sign is over punched with the numeric value stored in the last byte
d. None of the above


15) While defining a variable with COMP-1
a. Picture clause may be given
b. Picture clause need not be given
c. Picture clause cannot be given
d. Picture clause must be given

16) How many bytes does a S9(7) SIGN TRAILING SEPARATE field occupy
a. 4 bytes
b. 6 bytes
c. 8 bytes
d. 10 bytes

17) Mismatch in LRECL or BLKSIZE or RECFM between COBOL program and the JCL gives you a file status of
a. 35
b. 37
c. 39
d. 41

18) If you were passing a table via linkage
a. A subscript is preferable
b. Index is preferable
c. Both can be used
d. Canít say

19) Consider the following code:
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 times will B-PARA be executed
a. 5 times
b. 50 times
c. 15 times
d. Zero times

20) The PIC clause of file status should be
a. XX
b. 99
c. AA
d. a or b

ANS-

1) Ė
2) c
3) c
4) c
5) c
6) b
7) a
8) d
9) a
10) d
11) b
12) b
13) b
14) b
15) c
16) c
17) c
18) b
19) a
20) Ė



1. Data name in COBOL may have a maximum of
a) 18 characters
b) 30 characters
c) 24 characters
d) 8 characters

2. The difference between Ď*í and Ď/í is that in case of Ď/í the comment line will be printed after page ejection.
a) True
b) False

3. The maximum length of numeric literals can be
a) 120 digits
b) 18 digits
c) 44 digits
d) None of the above

4. The maximum length of non-numeric literals can be
a) 18 characters
b) 124 characters
c) 254 characters
d) 120 characters

5. While defining a numerical data item, the occurrence of ĎPí indicates the position of the assumed decimal point when the point lies ______________ the data item.
a) Inside
b) Outside
b) Within
d) None of the above

6. Paragraph names need not be unique in the entire program
a) True
b) False
c) Canít say

7. A level 66 entry cannot rename another
a) Level 01 and level 77 entry
b) Level 66 and level 88 entry
c) Level 01 and level 88 entry
d) Level 01, 66, 77, 88 entry


8. The USAGE clause cannot be specified for
a) Level 01 and level 77 entry
b) Level 66 and level 88 entry
c) Both (a) and (b)
d) There is no such restriction

9. Which of the following is a packed decimal data representation
a) COMP
b) COMP-1
c) COMP-2
d) COMP-3

10. An index data item cannot be specified in a MOVE statement
a) True
b) False

11. In reference modification, the data name must have USAGE
a) DISPLAY
b) COMP
c) COMP-3
d) Canít say

12. SUBTRACT C from 100 is
a) Valid
b) Invalid
c) Canít say

13. In the statement, SORT file-name1 ON ASCENDING KEY data-name1 USING file-name2 GIVING file-name3
a) file-name2 and file-name3 can be same
b) file-name2 and file-name3 must be different
c) Canít say

14. The CALLÖ BY CONTENT technique
a) Can change the original data values in callerís storage
b) Cannot change the original data values in the callerís storage
c) Allows the sub-program to access and process a copy of the data-items from the callerís storage
d) Both (a) and (c)

15. If a data item is given packed decimal representation and value to be stored is +3456789 then the PIC clause will be
a) S9(8)
b) S9(4)COMP-3
c) S9(4)COMP
d) S9(8)COMP-3


16. If PIC clause for a data item is PPPP999 and the value moved to the data-item is 234 then the edited value taken is
a) 234
b) 2340000
c) 0000234
d) None of the above

17. The purpose of POINTER phrase in STRING command is
a) To specify the leftmost position within sending field where the first character will be stored
b) To specify the leftmost position within receiving field where the first transferred character will be stored
c) To specify the rightmost position within sending field where the first character will be stored
d) To specify the rightmost position within receiving field where the first transferred character will be stored

18. Consider the two statements:
1) WRITE print-rec FROM heading-9
2) MOVE heading-9 TO print-rec
WRITE print-rec
a) The output of both (1) and (2) will be same
b) The output of both (1) and (2) will be different
c) There is some syntax error in (1)
d) There is some syntax error in (2)

19. Level-number data-name1 REDEFINES data-name2
a) In the above statement the level-number of data-name1 and data-name2 must be identical
b) In the above statement the level-number of data-name1 and data-name2 must be different
c) In the above statement the level-number of data-name1 and data-name2 can be different
d) The given syntax is incorrect

20. ADD CORRESPONDING identifier-1 TO identifier-2.
a) Identifier-1 and identifier-2 must not be data items with level numbers 66, 77, 88
b) Identifier-1 and identifier-2 can have a REDEFINES clause
c) Identifier-1 and identifier-2 can have a OCURS clause
d) All the above


Q1) What does the INITIALIZE verb do with alphanumeric items?
1) Set to Zero
2) Set to SPACES
3) 9ís will be inserted
4) None


Q3) What does SEARCH ALL do?
1) Linear search
2) Bubble sort
3) Binary search
4) None



Q5) What compiler option must be given for array bounds checking
1) NOSSRANGE
2) SSRANGE
3) DYNAM
4) LIB
Q7) Can you redefine an X(200) field with a field of X(100) ?
1) Yes
2) No
3) Canít say


Q9) How is sign stored in a COMP field?
1) In the least significant bit
2) In the last nibble
3) Over punched with the numeric value
4) In the most significant bit


Q11) How many bytes will a S9(8) COMP field occupy?
1) 8 bytes
2) 4 bytes
3) 2 bytes
4) 5 bytes

Q15) What is SET TO TRUE all about?
1) Set value to condition name variable
2) Set value to related data item
3) Set value to index
4) None

Q17) What is the length of PIC 9. 99?
1) 3
2) 4
3) 5
4) 2

Q23) What is not valid statement
1) Add corresponding group-item1 to group-item2
2) Subtract corresponding group-item1 from group-item2
3) Move corresponding group-item1 to group-item2
5) Multiply corresponding group-item1 by group-item2


Q25) What is meant by S0C-07 system ABEND code?
1) Data exception
2) Memory violation
3) Division by zero
4) Missing DD name



Q28) Linkage Section comes under
1) Identification Division
2) Environment Division
3) Data Division
4) Procedure Division


Q31) Stop Run statement can be coded only_________ times in the source.
1) 1 time
2) 3 times
3) 2 times
4) As many as required

Q33) Following is a valid cobol user-defined word
1) DATA
2) 34B100-PARA1
3) -48B
4) GROSS PAY

Q35) COBOL stands for
1) Common business oriented language
2) Command business oriented language
3) Common business organized language
4) None

Q37) Consider the following PROCEDURE DIVISION statements

INSPECT ALPHA TALLYING COUNTER FOR LEADING ďAĒ

Let the picture of ALPHA be X(20) and suppose its initial content is as follows ANANDAbKUMARbMAI (where b denotes blank space).
If COUNTER (whose PICTURE is 99) originally contains 08 then after execution of the INSPECT statement, COUNTER will have
1) 13
2) 09
3) 28
4) 5

Q39) Occurs clause cannot be used for
1) Level number 01
2) Level number 02
3) Level number 49
4) None

Q43) You have a string MAINFRAME. Which of the following statement will give you ĎMAINí
1) MAINFRAME(1:4)
2) MAINFRAME(0:4)
3) MAINFRAME(:4)
4) MAINFRAME(4:)

Q47) What GOBACK will do if it is coded in subprogram
1) Returns control to the calling program
2) Returns control to the system
3) No effect
4) None

Q49) 01 TEST RECORD
02 FIRST PIC X(4)
02 SECOND REDEFINES FIRST PIC S9(4) COMP
will give
1) S0C7
2) Logic error
3) Compile error
4) No error


Q50) The PIC clause of file status should be
1) XX.
2) 99
3) AA
4) 1 or 2
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.

DikDude
Moderator


Joined: 22 Jul 2011
Posts: 1001
Location: usa

Answer was approved by Question owner.
Useful Post
1 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Oct 03, 2013 11:24 pm    Post subject: Reply with quote

You need to post how you answered these questions.

Then, someone can review your answers and provide any clarification needed.
_________________
Have a good one
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
academyindia4
Guest





Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Jan 19, 2016 12:55 pm    Post subject: Topic deleted by Admin Reply with quote

<< Content deleted By Admin >>
Back to top
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> COBOL All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Cobol Tutorial
This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial
This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial
This Tutorial covers all important aspects of DFSORT. Has more SORT examples
INTERVIEW Questions
This page covers important interview questions
Mainframe Jobs
Mainframe Jobs posted by members of mainframegurukul forum
FaceBook Page
MainframeGurukul FaceBook Page
LinkedIn Page
MainframeGurkul Linkedin Page

This widget requires Flash Player 9 or better







Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials || Mainframe CICS tutorial|| Mainframe COBOL Tutorial

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB

mainframetopic-7288.html