View previous topic :: View next topic
|
Author |
Message |
anil_koneti
New User
Joined: 21 Apr 2005 Posts: 5
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
subhasis_50
Moderator
Joined: 09 Mar 2005 Posts: 363 Location: Earth
|
|
|
|
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 |
|
|
shivakumar .b Warnings : 1 New User
Joined: 11 May 2005 Posts: 18 Location: bangalore
|
|
|
|
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 |
|
|
|