Page 1 of 1

JCl Restart VSAMinit

PostPosted: Fri Jul 19, 2013 4:22 pm
by Krishna kumar B
Hi ,


sample Jcl
************
JOB msgclass=A ............................
.
.
.
PROC1 EXEC PROC1
PROC2 EXEC PROC2
****************
procs
*****************
PROC1 PROC
..
STEP010 EXEC XXXX
XXXXXXXXX

STEP020 EXEC VSAMINIT, DSN= ABCD.EDF.GDE,DISP=SHR
****************
PROC2 PROC
..
STEP005 EXEC XXXX
XXXXXXXXX

STEP020 EXEC VSAMINIT, DSN= EDF.GDE.FGHR,DISP=SHR

***************


I want to restart the job fromSTEP20 of PROC2
i gave Restart Card in the Job( RESTART=VSAMINIT.STEP20) it executed from PROC1 rather than PROC2.
kindly help.

Re: JCl Restart VSAMinit

PostPosted: Fri Jul 19, 2013 4:47 pm
by NicC
How about cleaning up your JCL - 1 procedure per job, no nested procedures? For your immediate problem comment out or delete procedure 1 from you job - cancel after submission so that thatever you did is backed out.

Re: JCl Restart VSAMinit

PostPosted: Fri Jul 19, 2013 4:51 pm
by Robert Sample
Did you read the JOB statement RESTART option details in the JCL Reference manual? Did you read, in particular, the caution that STEPNAME.PROCSTEPNAME must be unique within the job or the results are unpredictable? Now you know why the caution is in the manual.

Re: JCl Restart VSAMinit

PostPosted: Fri Jul 19, 2013 5:23 pm
by Krishna kumar B
Nic and Robert,
agreed...

i dont have acess to datasets , Job is in production. I can only provide Restart Parm for an operator to proceed..

Re: JCl Restart VSAMinit

PostPosted: Fri Jul 19, 2013 5:59 pm
by Robert Sample
You need to get with your production support people and get the PROC changes made. The system did exactly what the manual told you it would do -- gave you unpredictable results when you attempted to do something the system told you would give you unpredictable results. There is no way you can resolve this on your own; either a production JCL change is required, or you must accept that you cannot do the RESTART you tried.

Re: JCl Restart VSAMinit

PostPosted: Fri Jul 19, 2013 9:10 pm
by Akatsukami
Krishna kumar B wrote:Hi ,


sample Jcl (so-called; this isn't very close)
JOB  msgclass=A ............................
.
.
.
PROC1  EXEC PROC1
PROC2 EXEC PROC2 

procs
PROC1 PROC
..
STEP010 EXEC  XXXX
XXXXXXXXX

STEP020  EXEC VSAMINIT, DSN= ABCD.EDF.GDE,DISP=SHR
****************
PROC2 PROC
..
STEP005 EXEC  XXXX
XXXXXXXXX

STEP020  EXEC VSAMINIT, DSN= EDF.GDE.FGHR,DISP=SHR

I want to restart the job fromSTEP20 of PROC2
i gave Restart Card in the Job( RESTART=VSAMINIT.STEP20) it executed from PROC1 rather than PROC2.
kindly help.

In addition to NicC's and Mr. Sample's warnings about nesting procedures, if you actually want to restart the job from STEP20 of PROC2, you should code
RESTART=PROC2.STEP020

on the job card; note that you want to use stepnames, not procnames (having the two be the same is confusing). You will benefit from (re-)reading about the RESTART parameter of the JOB card.