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 

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
somu123
Beginner


Joined: 20 Sep 2005
Posts: 4
Topics: 1

PostPosted: Fri Oct 07, 2005 8:23 am    Post subject: Interview Questions Reply with quote

Hi,
In a recent interview some questions were asked which i could not answer.These are the q's.

1.Can we declare a cursor in DB2 in data division section instead of procedure division and what will be the programming structure for it

2.If I have some employees in a DB2 table and I put a query as follows and what will be the result

select * from emp where one=one
select * from emp where 1=1

3.what are the different ways of passing parms to programs.One I knew is thru the PARM parameter in the job and using the linkage section in the program.But they were expecting something else which I dont know.

4.In DB2,I have a DCLGEN,then I remove that declaration stmt from the program and can i use a copy book instead of a DCLGEN.???

Any idea on these ? Thanks for the responses.
_________________
Thanks,
somu123
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Oct 07, 2005 9:02 am    Post subject: Reply with quote

somu123,

Quote:

1.Can we declare a cursor in DB2 in data division section instead of procedure division and what will be the programming structure for it


You can define the cursor wherever you want. Just make sure that you defined the any of host variables fields used in the cursor declaration. Also make sure the Table declaration is included/copied before the cursor declaration.

Quote:

2.If I have some employees in a DB2 table and I put a query as follows and what will be the result

select * from emp where one=one
select * from emp where 1=1


First query will fail with column not found(-206) as "one" is not a part of the table.

second query will run fine.

Quote:

3.what are the different ways of passing parms to programs.One I knew is thru the PARM parameter in the job and using the linkage section in the program.But they were expecting something else which I dont know.


search the application program forum and JCL forum for "parm" and you will find many topics which discuss this.

Quote:

4.In DB2,I have a DCLGEN,then I remove that declaration stmt from the program and can i use a copy book instead of a DCLGEN.???


Yes you can.

Hope this helps...

Cheers

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


Joined: 20 Sep 2005
Posts: 4
Topics: 1

PostPosted: Fri Oct 07, 2005 9:25 am    Post subject: Reply with quote

Thanks Kolusu.
_________________
Thanks,
somu123
Back to top
View user's profile Send private message
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