Page 1 of 1

can we duplicate the stepnames

PostPosted: Wed Mar 31, 2010 5:18 pm
by pradeepgowda
can we give the identical name for stepnames
eg:
\\jobcard
\\step1 exec pgm=program1
\\ddname1 dd dsn=a.b.c
\\ddname1 dd dsn=a.b.c
\\step1 exec pgm=program2
\\ddname2 dd dsn=a.b.c
\\ddname2 dd dsn=a.b.c

Re: can we duplicate the stepnames

PostPosted: Wed Mar 31, 2010 5:46 pm
by Robert Sample
From the JCL Language Reference manual, section 16.1.2:
A stepname is optional, but is needed for the following. When a stepname is needed, it must be unique within the job, including stepnames in any procedures called by the job. If stepnames are not unique within the job, results might be unpredictable; but in most cases, references to non-unique stepnames will resolve to the first occurrence of that stepname.
So they don't have to be unique, but unpredictable results may occur if they are not unique. When IBM states results of something are unpredictable, wise programmers tread with caution.

Re: can we duplicate the stepnames

PostPosted: Thu Apr 01, 2010 1:08 am
by dick scherrer
Hello,

And even though the system may permit this (most/all) organizations do not. . . Organizations cannot take the risk of using something documented to be unpredictable. . .

When jobs are promoted/turned-over to Production, anything like this is rejected without review.