Recently faced mainframe cobol Interview Questions.

other mainframe interview questions

Moderators: Anuj Dhawan, Moderator Group

User avatar
rangab
Active Member
Posts: 56
Joined: Fri Mar 17, 2006 3:21 pm

Recently faced mainframe cobol Interview Questions.

Post by rangab » Mon Jul 10, 2006 10:59 am

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.

User avatar
guptae
Member
Posts: 8
Joined: Thu Nov 23, 2006 11:28 am
Location: Bangalore,India

Post by guptae » Tue Dec 05, 2006 11:42 am

Hi Rangab,

Please find the answer
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
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
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.

User avatar
gsobier
Member
Posts: 4
Joined: Thu Dec 14, 2006 9:35 pm

Post by gsobier » Thu Dec 14, 2006 11:42 pm

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

User avatar
Leo
Member
Posts: 13
Joined: Tue Nov 14, 2006 12:02 pm
Location: HYBD

Post by Leo » Sun Dec 17, 2006 6:23 pm

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

User avatar
Krishna
Site Admin
Posts: 1052
Joined: Fri Jan 27, 2006 7:50 am

Forum Rules

Post by Krishna » Sun Dec 17, 2006 9:24 pm

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/Mainfra ... ic.php?t=2



Regards,
Krishna
Admin - http://www.ibmmainframeguru.com
http://www.geocities.com/srcsinc
http://www.jacharya.com

giri
Member
Posts: 8
Joined: Tue Sep 04, 2007 1:47 pm

Post by giri » Tue Sep 04, 2007 3:35 pm

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.

giri
Member
Posts: 8
Joined: Tue Sep 04, 2007 1:47 pm

Post by giri » Tue Sep 04, 2007 3:40 pm

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.

giri
Member
Posts: 8
Joined: Tue Sep 04, 2007 1:47 pm

Post by giri » Tue Sep 04, 2007 3:49 pm

10). What are the advantages of declaring the VARCHAR in 49 level in a COBOL-DB2 program?
the adv. is optomal utilisation of memory.

User avatar
guru
Member
Posts: 24
Joined: Fri Apr 20, 2007 7:17 pm

Post by guru » Sat Sep 15, 2007 12:39 am

Hi giri,

Why you have posted 3 different posts, instead of a single one?

devegouda.chage
Member
Posts: 32
Joined: Mon Sep 12, 2011 10:50 am
Location: Bangalore

Post by devegouda.chage » Fri Nov 04, 2011 4:28 pm

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

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Fri Nov 04, 2011 8:30 pm

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

devegouda.chage
Member
Posts: 32
Joined: Mon Sep 12, 2011 10:50 am
Location: Bangalore

Post by devegouda.chage » Sat Nov 05, 2011 11:56 am

[/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 :)
Thanks & Regards
Dev

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Sat Nov 05, 2011 11:37 pm

Yes, there are things wrong.
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.
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. . . :)
Last edited by DikDude on Mon Nov 07, 2011 10:21 am, edited 1 time in total.
Have a good one

devegouda.chage
Member
Posts: 32
Joined: Mon Sep 12, 2011 10:50 am
Location: Bangalore

Post by devegouda.chage » Mon Nov 07, 2011 9:41 am

Thank you DikDude for your Suggestions :)
Thanks & Regards
Dev

academyindia4

Topic deleted by Admin

Post by academyindia4 » Sat Jan 30, 2016 11:11 pm

<< Content deleted By Admin >>

Post Reply

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



Other References
Mainframe Tools and others