IF I AM INCORRECT,CORRECT ME
(1) How many bytes does a s9(7) SIGN LEADING SEPARATE field occupy?
a) 8 bytes
b) 9 bytes
c) 7 bytes
d) 6 bytes
(2) Each module of a structured program should have -------- Entry point and -------- exit point
a) Three,Five
b) Two,one
c) One, One
d) Two, Two
(3) Which of the following files can be opened in all the 4 modes?
a) indexed
b) relative
c) sequential
d) All of the above
(4) Just one -------- statement allows several alternative paths of execution
a) evaluate
b) if statements
c) perform statement
d) copy statement
(5) What keyword is used for class testing?
a) Alphanumeric
b) Hexadecimal
c) Numeric edited
d) Numeric
(6) Which of the following statement is not allowed when a relative file is opened to I/O mode and the access mode is random
a) read
b) write
c) rewrite
d) start
(7)
PERFORM PARA-A THRU PARA-A-EXIT VARYING A FROM 1 BY 1 UNTIL A=13.
How many times would the statements in PARA-A execute?
a) 13
b) 14
c) 12
d) 11
(8) Say whether the following is True or False MARKS GRADE 80-100 A, 80-101 B, 80-102 C
EVALUATE MARKS
WHEN 80 THRU 100
MOVE "A" TO GRADE
WHEN 80 THRU 101
MOVE "B" TO GRADE
WHEN 80 THRU 102
MOVE "C" TO GRADE
END-EVALUATE
a) True
b) False
c) Compilation Error
d) None of the above
(9) A compiler checks for:
a) Runtime errors
b) Syntax errors
c) a & b
d) None of the above
(10) How do you define a variable of COMP-1?
a) 01 WS-VAR PIC S9(4) COMP-1.
b) 01 WS-VAR USAGE COMP-1.
c) 02 WS-VAR COMP-1.
d) 01 WS-VAR COMp-1 USAGE.
(11) There is a file whose ORGANISATION is INDEXED.you want to read the records from the file in RANDOM fashion as well as sequentially.then which of the access mode would you specify?
a) SEQUENTIAL
b) RANDOM
c) DYNAMIC
d) ACCESS MODE has nothing to do with it
(12) When you will get the abend SB14?
a) Data set opened in output mode
b) PS dataset opened in extend mode
c) PDS member opened in extend mode
d) PDS member opened in input mode
(13) Which one of the following cannot cause more than one execution of the paragraph(s) that may be named in the statement.
a) The simple PERFORM statement
b) The PERFORM with TIMES option
c) The PERFORM with UNTIL option
d) The PERFORM with VARYING option
(14) Consider the following piece of code
01 GROUP-ITEM
05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50
05 AMOUNT-2 PIC 9(4)V99 USAGE COMP
PROCEDURE DIVISION
MOVE ZERO TO GROUP-ITEM.
ADD 50 TO AMOUNT-1.
what will be the content of AMOUNT-1?
a) 50
b) 100
c) 0
d) unpredictable
(15) Consider the following program segment.
P1.
PERFORM P2 THRU P3 ARYING A FROM 1 BY 1 UNTIL A = 4.
DISPLAY A.
STOP RUN.
P2.
ADD 1 TO A.
ADD A TO SUM
P3.
EXIT.
Indicate which of the following will take place.
a) Compiler will detect a syntax error as the EXIT verb is not required in his case.
b) There will be an infinite loop.
c) The program will ultimately stop after displaying 4
d) None of the above.
(16) A=10, B=5, C=10, D=5, E=0 What will be the value of E after the following statement ADD A, B TO C, D GIVING E.
a) 15
b) 10
c) Runtime Error
d) Syntax Error
COBOL TEST-3 WITH ANSWERS
Moderator: Moderator Group
-
- Member
- Posts: 16
- Joined: Fri Jun 25, 2010 10:50 am
-
- Member
- Posts: 3
- Joined: Mon Mar 17, 2014 11:27 pm
-
- Member
- Posts: 3
- Joined: Mon Mar 17, 2014 11:27 pm
For #1 read here:
http://publibz.boulder.ibm.com/cgi-bin/ ... r50/5.3.15?
For #5, read here:
http://publibz.boulder.ibm.com/cgi-bin/ ... 50/6.1.6.2?
You need to become familiar and comfortable with the documentaion. Had you looked in the COBOL Language Reference, there would have been no need to post.
We are here to help, not read the manual for you and regurgitate what is there . . .
http://publibz.boulder.ibm.com/cgi-bin/ ... r50/5.3.15?
For #5, read here:
http://publibz.boulder.ibm.com/cgi-bin/ ... 50/6.1.6.2?
You need to become familiar and comfortable with the documentaion. Had you looked in the COBOL Language Reference, there would have been no need to post.
We are here to help, not read the manual for you and regurgitate what is there . . .
Have a good one
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page