IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Some Interview Questions


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sunojsm
Warnings : 1

New User


Joined: 21 Jun 2004
Posts: 33
Location: Andorra

PostPosted: Sun Mar 13, 2005 11:05 pm
Reply with quote

hi,
Can anybody ans the below qs plz.


1. I have 50 steps in my prog. I wanted to execute
step nos 5,10 and 15. Can u pls advise?
2. How to open cobol program in XP-Editor?
3. Can we call a proc inside a proc?
4. I have one main program which calls 2 sub-programs.
I wanted to call one of them as static and the other
as dynamic. How?
5. Diff between Sys-Abend and Sys-Dump?
6. What is the result of Select empname from emp where
1=1?
7. I have records from 1 to 10. At record no 5 i will
code as below
Start browse
Read next
Read next
Read prev. Where will be the position of the cursor
after execution?

expecting your replies.

Bye
Back to top
View user's profile Send private message
Prandip

New User


Joined: 04 Mar 2005
Posts: 84
Location: In my tiny cubicle ...

PostPosted: Mon Mar 14, 2005 9:20 am
Reply with quote

Quote:

2. How to open cobol program in XP-Editor?

What in the heck is an XP-Editor?
Quote:

3. Can we call a proc inside a proc?

From the "z/OS V1R6.0 MVS JCL Reference" manual:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B650/CCONTENTS?DT=20040712170508
Quote:

5.3 Nested Procedures

Cataloged and in-stream procedures can invoke other procedures (up to 15 levels of nesting). In a procedure, an EXEC statement can invoke another procedure, which can contain an EXEC statement to invoke another procedure, and so on.

Note that an in-stream procedure cannot be defined within another procedure. The sequence PROC, PROC, PEND, PEND is not valid.

Back to top
View user's profile Send private message
saniel

New User


Joined: 02 Mar 2005
Posts: 1

PostPosted: Mon Mar 14, 2005 2:52 pm
Reply with quote

Quote:
6. What is the result of Select empname from emp where
1=1?


It will display all the empnames from the emp table since the where condition is true.
Back to top
View user's profile Send private message
sivatechdrive

Active User


Joined: 17 Oct 2004
Posts: 191
Location: hyderabad

PostPosted: Mon Mar 14, 2005 3:24 pm
Reply with quote

difference between sys dump and sys abend

SYSUDUMP is used to dump the content of various registers, variables and datasets acccessed at the time of abnormal termination, into a dataset.
The dump is in hexadecimal.

Syntax --> //SYSUDUMP DD .....
EXAMPLE JCL --> //MYJOB JOB (W345),'RAMESH'
//STEP1 EXEC PGM=COBPROG
//SYSUDUMP DD DSN=TEST.PROD.LIB

SYSABEND is used to dump the contents of various registers variables ,
datasets accessed and The nucleus at the time of abnormal termination.
The dump is in hexadecimal.

Syntax --> //SYSABEND DD .....
EXAMPLE JCL --> //MYJOB JOB (WE345),'KRISHNA REDDY'
//STEP1 EXEC PGM=COBPROG
Back to top
View user's profile Send private message
mainframemouli

New User


Joined: 01 Mar 2005
Posts: 52
Location: Mysore

PostPosted: Mon Mar 14, 2005 4:45 pm
Reply with quote

Quote:
1. I have 50 steps in my prog. I wanted to execute
step nos 5,10 and 15. Can u pls advise?


step1 dd dsn=filename,cond=only
step2 dd dsn=filename,cond=only
.
.
.
step5 dd dsn=filename.

like this for other steps that you don't want to execute give cond=only and the steps that you want to execute don't specify it.

You can use If else concepts also....



Quote:
2. How to open cobol program in XP-Editor?


This question is answered in some question search it please...



Quote:
3. Can we call a proc inside a proc?


Yes we can call



Quote:
4. I have one main program which calls 2 sub-programs.


search the answer in the topic dynamic call and static call you can get the answer in this forum.

Quote:
5. Diff between Sys-Abend and Sys-Dump?


Both are same except that the system nucleus at that the time of termination is stored in SYSABEND.

Quote:
7. I have records from 1 to 10. At record no 5 i will
code as below
Start browse
Read next
Read next
Read prev. Where will be the position of the cursor
after execution?


Cursor at position 7th record.
Back to top
View user's profile Send private message
raju1951

New User


Joined: 13 Feb 2004
Posts: 4

PostPosted: Sat Mar 19, 2005 10:03 am
Reply with quote

i feel start browse will set the pointer at no:5,
read next will read record no 5,
then 6,
then back to previous record 5
Back to top
View user's profile Send private message
sunojsm
Warnings : 1

New User


Joined: 21 Jun 2004
Posts: 33
Location: Andorra

PostPosted: Sat Mar 19, 2005 5:38 pm
Reply with quote

hi members,

thanks for ur valuable replies.

bye
Back to top
View user's profile Send private message
bobbymf

New User


Joined: 18 Mar 2005
Posts: 5
Location: banglore

PostPosted: Sun Mar 20, 2005 5:40 pm
Reply with quote

when u give startbr at 5th record it will place the cursor at 5th record.
when u give readnext it reads the next record that is the 6th and when u code readnext again it will read the 7 th record. atlast when u give read prev it reads the 6th.


start br ----- 5th rec
readnext ------ 6threc
readnext ------- 7threc
readprev -------6threc.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Mar 21, 2005 1:27 am
Reply with quote

Raju,s reply is correct untill the last stmt. To reverse the diection of a seq read in a CICS environment 2 reads are required. For example, to make Raju's solution correct, add another read prev, THEN the rec ptr will be at rec #5. If you want to reverse direction after this and read rec #6 you must issue "read next read next".
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Mar 21, 2005 1:35 am
Reply with quote

Hi All,

Should have added this:

Borrowing Bobbymf's notation my solution looks like this:

start br -------- 5th rec
readnext ------ 5th rec
readnext ------ 6th rec
readprev ------ 6th rec
readprev ------ 5th rec
readnext ------ 5th rec
readnext ------ 6th rec
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Comp interview questions Mainframe Interview Questions 5
No new posts Interview Questions on Cobol DB2 program Mainframe Interview Questions 5
No new posts The Last Two Question For You To Ask ... Mainframe Interview Questions 0
No new posts Mainframe Interview Questions CICS,CO... Mainframe Interview Questions 6
No new posts Viewing executing process in NDM .. q... IBM Tools 0
Search our Forums:

Back to Top