Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
If i give rollback what happen to the CURSOR state

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
anil_koneti

New User


Joined: 21 Apr 2005
Posts: 5

PostPosted: Sat May 14, 2005 11:06 am    Post subject: If i give rollback what happen to the CURSOR state
Reply with quote

hi friends,
please give me the answers for these questions
1.in my jcl i have 5 steps
in my first step contains one ps file
i want to know that the ps file contains records r not
how can we know u sing jcl pgm
(is it listcat )
2.in my cursor declaration i gave with hold option
cursor is still open if i give commit
if i give rollback then what happen
is cursor is closed r not
3.my copy book length lrec is 80 i change it as 90
then what are the changes we will do in jcl pgms
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Sat May 14, 2005 2:05 pm    Post subject: Re: please give me the answers for the folling questions
Reply with quote

1. See this:

http://ibmmainframes.com/viewtopic.php?t=590&highlight=idcams+print
Back to top
View user's profile Send private message
subhasis_50

Moderator


Joined: 09 Mar 2005
Posts: 363
Location: Earth

PostPosted: Tue May 17, 2005 11:23 am    Post subject: re: ans
Reply with quote

Hi,
Use idcams utility to find that ur file contains record or not.
Use the following code:
//STEP01 EXEC PGM=IDCAMS,COND=(0,NE)
//SYSPRINT DD SYSOUT=*
//FILE1 DD DSN=TEST.DATA,DISP=SHR
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
PRINT INFILE(FILE1) -
DUMP COUNT(1)
/*
//* DON'T RUN STEP02 IF FILE IS EMPTY
//* A RETURN CODE OF 4 WOULD INDICATE NO RECORDS WERE FOUND
//STEP02 EXEC PGM=WHATEVER,COND=(4,EQ,STEP01)

The IDCAM step will return 4, if there is no records else it will give 0. So you will know that any record is present there or not in the PS file.

Qn 3.
Find out how many programs are using that copy book. Compile all those programs with the change copybook. No need to change Run JCL .

Thanks
Subhasis
Back to top
View user's profile Send private message
shivakumar .b
Warnings : 1

New User


Joined: 11 May 2005
Posts: 18
Location: bangalore

PostPosted: Tue May 17, 2005 4:49 pm    Post subject: Re: please give me the answers for the folling questions
Reply with quote

HI ANIL,
I CAN ANSWER FOR U R 2ND QUESTION.
IF WE DECLARE CURSOR WITH "WITH HOLD" OPTION, THEN EVEN IF WE ISSUE COMMITT STATEMENT, THE CURSOR WILLNOT GET CLOSED. BUT IF WE ISSUE ROLLBACK STATEMENT, THEN ALL THE CURSORS AND CURSORS WITH "WITH HOLD" OPTION WILL BE GET CLOSED.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Testing rerad cursor for status with ... John F Dutcher DB2 8 Fri May 19, 2017 9:35 pm
No new posts Getting -504 Cursor Name GTT-ARTS-CUR... Robin Sulsona DB2 2 Fri Mar 17, 2017 1:43 am
No new posts scheduling between OPC and TWS give u... nsbl IBM Tools 4 Sun Mar 12, 2017 5:35 pm
No new posts Release of Adabas Cursor mohitsethi All Other Mainframe Topics 1 Mon Feb 06, 2017 8:36 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us