can we duplicate the stepnames

JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

can we duplicate the stepnames

Postby pradeepgowda » Wed Mar 31, 2010 5:18 pm

can we give the identical name for stepnames
\\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
Posts: 40
Joined: Mon Jan 04, 2010 4:17 pm
Has thanked: 0 time
Been thanked: 0 time

Re: can we duplicate the stepnames

Postby Robert Sample » Wed Mar 31, 2010 5:46 pm

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.
Robert Sample
Global moderator
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: can we duplicate the stepnames

Postby dick scherrer » Thu Apr 01, 2010 1:08 am


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.
Hope this helps,
User avatar
dick scherrer
Global moderator
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Return to JCL


  • Related topics
    Last post