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

Recently faced mainframe cobol Interview Questions.
Goto page 1, 2  Next
 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> INTERVIEW QUESTIONS
  View previous topic :: View next topic  
Author Message
rangab
Active Member


Joined: 17 Mar 2006
Posts: 56

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

PostPosted: Mon Jul 10, 2006 10:59 am    Post subject: Recently faced mainframe cobol Interview Questions. Reply with quote

Hi,

The below are few of the interview questions I've faced recently. Appreciate if you could provide answers.

1). What happens if you add a copybook to linkage section instead of adding it to a working-storage section in a sub-program?
2). There are select queries on a table in a COBOL-DB2 program. After pre-compilation, each select query is replaced by equivalent cobol statements. If you look at them, is it possible to find out which statement belongs to which query?
3). What is the basic consideration to use static / dynamic call and justification?
4). While writing a new COBOL program, how do you decide upon whether a varaible should be declared as COMP, COMP-1, COMP-2, COMP-3? What is the basis and justification?
5). A field of a DB2 table is updated. How do you test it? What is the we exactly look in the job to know whether the field is updated properly or not?
6). There are different calls in COBOL, Call by content, Call by value and Call by reference. Is it possible that a single CALL statement have all these varieties? When do you go for each one of these? What is the basis and justification?
7). When do we use null indicator of a field? Does the usage of it have any benefits?
8 ). What are the other ways of passing data to a JCL to program? (I know passing of data using PARM, Instream data and datasets).
9). Can you have multiple indexes on a table or array? What is the advantage?
10). What are the advantages of declaring the VARCHAR in 49 level in a COBOL-DB2 program?

Please clear my doubts.

TIA.
_________________
========
Ranga...:-0)
========
Learn Which You Don't Know - Teach Others Which They Don't Know.
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.

guptae
Member


Joined: 23 Nov 2006
Posts: 8
Location: Bangalore,India

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

PostPosted: Tue Dec 05, 2006 11:42 am    Post subject: Reply with quote

Hi Rangab,

Please find the answer

Quote:
1). What happens if you add a copybook to linkage section instead of adding it to a working-storage section in a sub-program?


In that case u have to pass copybook throgh main progarm suppose your copybook name is pdtlseg then u need to pass it through ur main pgm to subpgm name sub1

CALL 'SUB1' USING PDTLSEG
, other variable

Quote:
2). There are select queries on a table in a COBOL-DB2 program. After pre-compilation, each select query is replaced by equivalent cobol statements. If you look at them, is it possible to find out which statement belongs to which query?


It converted to equivlent CAll stmt

Quote:
3). What is the basic consideration to use static / dynamic call and justification?


In case of static call load module of main & sub pgm in one .So we need to use static call when we require high speed because in static call i/o will be less to comparative dynamic call in which for every call it need to seach the load module for subpgm but if there are frequent changes in subpgm then we shd go for dynamic because in static call every time u compile subpgm u need to recompile Main program.
[quote]
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.
gsobier
Member


Joined: 14 Dec 2006
Posts: 4

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

PostPosted: Thu Dec 14, 2006 11:42 pm    Post subject: Reply with quote

...if you can't answer these questions then you are simply not qualified for the position... ...even if you did cheat in some way, they will find you out real quick on the job and then you are back to looking for a job... ...very risky in my mind...
_________________
Computers do exactly what they are told, never what you want.
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.
Leo
Member


Joined: 14 Nov 2006
Posts: 13
Location: HYBD

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

PostPosted: Sun Dec 17, 2006 6:23 pm    Post subject: Reply with quote

Mr gsobier

This is not a forum for you to show off !!!! , we are here to help people who as got doubts with or without any exp!!!. I am sure there are a lot of people who even with real hands on exp may not answer all those questions correctly . why don?t u answers all those questions instead of passing comments , lets see how many u answer !!!!!!!!

Moderators please take a note of such comments and take action
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.
Krishna
Site Admin


Joined: 27 Jan 2006
Posts: 1052

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

PostPosted: Sun Dec 17, 2006 9:24 pm    Post subject: Forum Rules Reply with quote

Hi All,

Please note this forum is to help all mainframe professionals ( starting from learner to advanced ) around the world. I request all members dont post any comments which hurts other members feelings.

Please read the forum rules in the following thread.
http://www.ibmmainframeguru.com/MainframeGuru/viewtopic.php?t=2



Regards,
Krishna
Admin - http://www.ibmmainframeguru.com
http://www.geocities.com/srcsinc
http://www.jacharya.com
Back to top
View user's profile Send private message Send e-mail
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
giri
Member


Joined: 04 Sep 2007
Posts: 8

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

PostPosted: Tue Sep 04, 2007 3:35 pm    Post subject: Reply with quote

Quote:
There are different calls in COBOL, Call by content, Call by value and Call by reference. Is it possible that a single CALL statement have all these varieties? When do you go for each one of these? What is the basis and justification?
we can write all combination of these in single call stms and diff is in call by value or content the value is going to the sub prog ..and it will store in another memory space..in call by ref the address of variable will send to the sub prog..

and justification i think it is related to memory allocation regarding usage clases..and i dont know about basis ..sorry.
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.
giri
Member


Joined: 04 Sep 2007
Posts: 8

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

PostPosted: Tue Sep 04, 2007 3:40 pm    Post subject: Reply with quote

7). When do we use null indicator of a field? Does the usage of it have any benefits?
this is the concept which is for nullable cols in table while inserting.
if u r going to insert a null value inthat col. when the value of corresponding indicator is -1 then automatically null value will store in that col.
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.
giri
Member


Joined: 04 Sep 2007
Posts: 8

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

PostPosted: Tue Sep 04, 2007 3:49 pm    Post subject: Reply with quote

10). What are the advantages of declaring the VARCHAR in 49 level in a COBOL-DB2 program?
the adv. is optomal utilisation of memory.
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.
guru
Member


Joined: 20 Apr 2007
Posts: 24

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

PostPosted: Sat Sep 15, 2007 12:39 am    Post subject: Reply with quote

Hi giri,

Why you have posted 3 different posts, instead of a single 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.
devegouda.chage
Member


Joined: 12 Sep 2011
Posts: 32
Location: Bangalore

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

PostPosted: Fri Nov 04, 2011 4:28 pm    Post subject: Reply with quote

1>
according to me it will give error...because
whatever the variables declared in linkage section of sub program ,it should be declared in working-storage section of main program in the same order , in your case its not happening according to the rule,and hence it may give soc4 error.
_________________
Thanks & Regards
Dev
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
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Nov 04, 2011 8:30 pm    Post subject: Reply with quote

Quote:

according to me it will give error...
Did you run a test to confirm what you believe. . .

In a sub-program, the variables used by the CALL are usually in the linkage section. . .

Possibly i misunderstand what is your belief. . .
_________________
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.
devegouda.chage
Member


Joined: 12 Sep 2011
Posts: 32
Location: Bangalore

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

PostPosted: Sat Nov 05, 2011 11:56 am    Post subject: Reply with quote

[/quote]
In a sub-program, the variables used by the CALL are usually in the linkage section. . .

[/quote]



yes ,but in the above scenario itís not happening
he is copying working-storage variables in linkage section.
so you need to pass these new variables(linkage section) with the actual linkage section variables,
for ex...
in main program
working-storage section.
copy main-wsVars.
.
.
procedure division.

call sub-pg using main-wsVars.

stop run.
--------------------------------------

sub program
working-storage section.
.....
.
.
linkage-section.
copy main-wsVars.

copy sub-wsVars..... (//instead of copying to working storage section he will copy to linkage section)
..
...
procedure division using main-wsVars. ..........//here instead of only giving main-wsVars ,we need to pass sub-ws-Vars and also we
need to declare it in working-storage section of main program)

if am wrong ,please correct me Smile
_________________
Thanks & Regards
Dev
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
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Sat Nov 05, 2011 11:37 pm    Post subject: Reply with quote

Yes, there are things wrong.
Quote:

we need to declare it in working-storage section of main program

Not so. Variables to be used in a called module do not need to be in working-storage . . . They may be, but this is not a COBOL rule. It might be some site-specific rule/standard.
Quote:

yes ,but in the above scenario itís not happening
he is copying working-storage variables in linkage section.
Why do you believe this? TS posted no code, so this is just an interpretation.

Lots of the disconnects in our topics are due to unclear posts and variable intrepretation.

Do keep in mind that this topic started more than 5 years ago. . . Smile
_________________
Have a good one


Last edited by DikDude on Mon Nov 07, 2011 10:21 am; edited 1 time in total
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.
devegouda.chage
Member


Joined: 12 Sep 2011
Posts: 32
Location: Bangalore

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

PostPosted: Mon Nov 07, 2011 9:41 am    Post subject: Reply with quote

Thank you DikDude for your Suggestions Smile
_________________
Thanks & Regards
Dev
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: Sat Jan 30, 2016 11:11 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 -> INTERVIEW QUESTIONS All times are GMT + 5 Hours
Goto page 1, 2  Next
Page 1 of 2



 
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-361.html