MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Recently faced Interview Questions.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Interview Q & A
View previous topic :: View next topic  
Author Message
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Fri Jun 30, 2006 8:25 am    Post subject: Recently faced 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
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Fri Jun 30, 2006 8:41 am    Post subject: Reply with quote

ranga_subham,

1. Depends where you add the copybook. If it is at the beginning then you will receive garbage values upon a call from the main program which might result in an abend. If it is at end and you don't refer those fields you are fine.

2.Nope

3.Search the application programming forum

4.Again search the application programming forum

5.Check Sql code. If zero , the row is updated. Also you can check sql errd(3) to see if the value is greater than zero. Sqlerrd(3) will contain the no: of rows updated/deleted.

6. Search the application programming forum

7. Whenever you are selecting a null column. Technically no advantage except for good programming standard.

8. Search application programming forum and JCL forum

9. Search application programming forum

10. No advantage. Just a standard IBM enforced to identify Varchar column declarations.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ranga_subham
Intermediate


Joined: 31 Jan 2006
Posts: 255
Topics: 72

PostPosted: Mon Jul 03, 2006 2:32 am    Post subject: Reply with quote

Thanks Kolusu. I will try to dig out for the remaining answers in the forum.
_________________
Ranga
*****
None of us is as smart as all of us - Ken Blanchard
Back to top
View user's profile Send private message
madhuroyus
Beginner


Joined: 09 Jan 2006
Posts: 45
Topics: 14
Location: Bangalore

PostPosted: Thu Jul 27, 2006 1:58 am    Post subject: Reply with quote

Hi Kolusu,

I am not much clear with the solutuions you mentioned for the first two questions. Can you please explain?

1) How it will get abend if it is defined in begining of the linkage section?
Means under what scenarios?
I feel that if there is some comp-3/numeric variables which are defined in the copy book and if they were populated with the garbage values then it might abend.
2)why is it not possible to find out which select statement belongs to which query?



Thanks
Madhu
_________________
Self confidence is something that says U will do it, when the rest of the world has exactly opposite view.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu Jul 27, 2006 4:31 am    Post subject: Reply with quote

madhuroyus,

1. You are right. If there is mismatch in data types especially with packed data items you will get an abend because of the garbage values.

2. Try compiling a Cobol-Db2 program and check the sysout from the pre-compiler listing and see if you can map it to the select statement.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
madhuroyus
Beginner


Joined: 09 Jan 2006
Posts: 45
Topics: 14
Location: Bangalore

PostPosted: Thu Jul 27, 2006 7:08 am    Post subject: Reply with quote

Thanks for explanation.

Still I need some clarification.

Abend should come in either cases

1)when it is declared in the begining of the linkage section
2)when it is declared in the later part of the linkage section

But you said it will come only in first case.

Please explain.

Thanks
Madhu
_________________
Self confidence is something that says U will do it, when the rest of the world has exactly opposite view.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu Jul 27, 2006 7:22 am    Post subject: Reply with quote

Quote:

Still I need some clarification.

Abend should come in either cases

1)when it is declared in the begining of the linkage section
2)when it is declared in the later part of the linkage section


madhuroyus,

Spend some time reading my posts carefully.
kolusu wrote:

Depends where you add the copybook. If it is at the beginning then you will receive garbage values upon a call from the main program which might result in an abend. If it is at end and you don't refer those fields you are fine.


Pay attention to the items in bold.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
madhuroyus
Beginner


Joined: 09 Jan 2006
Posts: 45
Topics: 14
Location: Bangalore

PostPosted: Mon Jul 31, 2006 7:04 am    Post subject: Reply with quote

Hi Kolusu,

I tested a program by giving the copy book in the beginning of the linkage section.

It was not abended (I have not referred to any copy book fields).

But when I was refer COMP-3 variable which was declared inside the copy book it was abended.

So, what I feel is, it is not the case where it has been declared in the linkage section. If the copy book fields are referred then only it may abend(provided if no data is passed from the calling program).

If you are also tended the above perception then its ok. If you have any deviations please let me know.

Thanks
Madhu
_________________
Self confidence is something that says U will do it, when the rest of the world has exactly opposite view.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Interview Q & A 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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group