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 Test 1 - Interview Questions

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> COBOL INTERVIEW QUESTIONS
  View previous topic :: View next topic  
Author Message
ballaravi@gmail.com
Member


Joined: 25 Jun 2010
Posts: 16

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

PostPosted: Wed Sep 08, 2010 5:58 pm    Post subject: Cobol Test 1 - Interview Questions Reply with quote

please i need answers for this, these are interview question papers me and my friends attended company in MINDTREE, i hope this will help all students,
please provied answers if u know it is correct.



(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 doesn’t 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 TIMES-COUNTER >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
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.

Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1625
Location: Mumbai, India

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

PostPosted: Thu Sep 09, 2010 1:01 pm    Post subject: Reply with quote

It would be nice if you tell us what were your answers?
_________________
Regards,
Anuj
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.
arivu
Member


Joined: 04 Aug 2010
Posts: 2
Location: chennai

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

PostPosted: Tue Sep 14, 2010 12:50 pm    Post subject: Reply with quote

i want many questions tis type...send me now.....
_________________
arivu
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1625
Location: Mumbai, India

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

PostPosted: Tue Sep 14, 2010 4:51 pm    Post subject: Reply with quote

arivu wrote:
i want many questions tis type...send me now.....
Have sent them across via courier!
_________________
Regards,
Anuj
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.
dbzTHEdinosauer
Moderator


Joined: 02 Oct 2006
Posts: 981

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

PostPosted: Tue Sep 14, 2010 5:06 pm    Post subject: Reply with quote

ballaravi@gmail.com,

as Anuj said, the behavior on this board is to post your questions and your answers.

if you have no answers, suggest you start reading the manuals.
all but a couple can be found within a minute or so.
a couple of the questions require some thought.

and, why do you expect anyone to take their time to read your run-on-sentences and poorly formatted questions?
_________________
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
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.
ballaravi@gmail.com
Member


Joined: 25 Jun 2010
Posts: 16

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

PostPosted: Wed Sep 15, 2010 9:17 am    Post subject: Reply with quote

Means if i answer this questions, can u tell me it is correct or not
_________________
Thank You
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.
dbzTHEdinosauer
Moderator


Joined: 02 Oct 2006
Posts: 981

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

PostPosted: Wed Sep 15, 2010 1:33 pm    Post subject: Reply with quote

maybe.
_________________
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
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.
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1625
Location: Mumbai, India

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

PostPosted: Wed Sep 15, 2010 3:05 pm    Post subject: Reply with quote

ballaravi@gmail.com wrote:
Means if i answer this questions, can u tell me it is correct or not
Yes, I (we?) can try.
_________________
Regards,
Anuj
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.
ballaravi@gmail.com
Member


Joined: 25 Jun 2010
Posts: 16

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

PostPosted: Thu Dec 02, 2010 4:32 pm    Post subject: COBOL TEST-1 ANS Reply with quote

I KEPT BY ANSWERS IN BOLD, IF I AM INCORRECT,PLEASE CORRECT ME


(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 doesn’t 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 TIMES-COUNTER ]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
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.
Shivankoo
Member


Joined: 13 Dec 2010
Posts: 14

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

PostPosted: Fri Aug 17, 2012 8:46 am    Post subject: Reply with quote

I think for question 13 the answer should be 1 that the sign bit is stored in the last nibble of the last byte.
_________________
Thanks and Regards
Shivankoo Sharma

//EMPIRE EXEC PGM=WIFE
//SYSIN DD DSN=VARSHA.ME.HOME,DISP=SHR
//SYSOUT DD DUMMY
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.
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1625
Location: Mumbai, India

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

PostPosted: Fri Aug 17, 2012 4:42 pm    Post subject: Reply with quote

Yes, for question 13, "a" is the correct option as you've indicated. However, it's been nearly 2 years when the original question was posted.

Unfortunately, there was no follow up from OP and the thread was left unattended even by us, after a promise...Embarassed
_________________
Regards,
Anuj
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.
dbzTHEdinosauer
Moderator


Joined: 02 Oct 2006
Posts: 981

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

PostPosted: Fri Aug 17, 2012 7:59 pm    Post subject: Reply with quote

(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 >>incorrect
_________________
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
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.
anu alexander
Member


Joined: 05 Jul 2013
Posts: 6

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

PostPosted: Mon Jul 08, 2013 10:48 am    Post subject: Reply with quote

i think for 15th question the answer is 'a'
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: Thu Jan 21, 2016 12:18 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 INTERVIEW QUESTIONS 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-5316.html