View previous topic :: View next topic
Author
Message
Digvijay Singh Active User Joined: 20 Apr 2022Posts: 148 Location: India
Hi All ,
My requirement is i have a pds member (abc.xyz.t123(mem1) containing a jcl job with job name anything which is dynamic it could be anything.
I want to write a sort card to give this job name a constant job name lets say AFQGDG1 INSTEAD OF WHATEVER JOBNAME IS THERE IN JCL KEPT IN MEM1.
JCL: IN MEM1 (abc.xyz.t123(mem1)
//XYZ12345 --JOBNAME WHICH IS DYNAMIC
WANT TO REPLACE THIS JOBNAME WITH CONSTANT JOBNAME AFQGDG1
.
How i can achive this any idea i have already copied the pds (abc.xyz.t123(mem1) data into a flat file now looking for a sort card to do so.
Any hint appreciated.
Thanks
Back to top
Joerg.Findeisen Senior Member Joined: 15 Aug 2015Posts: 1334 Location: Bamberg, Germany
Sample:
Code:
OPTION COPY
INREC IFOUTLEN=80,IFTHEN=(WHEN=(1,79,SS,RE,
C'^//[$#@A-Z][$#@A-Z0-9]{0,7}[ ]+JOB[ ]+'),
PARSE=(%01=(STARTAFT=C'//',ENDBEFR=BLANKS,FIXLEN=8),
%02=(FIXLEN=80)),
BUILD=(C'//AFQGDG1',2X,%02))
END
Back to top
Digvijay Singh Active User Joined: 20 Apr 2022Posts: 148 Location: India
Thanks for your response.
i tried using above code but my step is failing.
Code:
//STEP02 EXEC PGM=SORT
//SORTIN DD DSN=ALT0.GDG.INPUT.JCL1,DISP=SHR
//SYSOUT DD SYSOUT=*
//SORTOUT DD DSN=ALT0.GDG.INPUT.JCL2,
// SPACE=(CYL,(1,1),RLSE),DCB=*.SORTIN,
// DISP=(NEW,CATLG,DELETE)
//SYSIN DD *
OPTION COPY
INREC IFOUTLEN=80,IFTHEN=(WHEN=(1,79,SS,RE,
C'^//[$#@A-Z][$#@A-Z0-9]{0,7}[ ]+JOB[ ]+'),
PARSE=(%01=(STARTAFT=C'//',ENDBEFR=BLANKS,FIXLEN=8),
%02=(FIXLEN=80)),
BUILD=(C'//AFQGDG6',2X,%02))
END
//STEP03 EXEC PGM=IEBGENER
Error ;
Code:
IEF236I ALLOC. FOR M0022001 STEP02
IGD103I SMS ALLOCATED TO DDNAME SORTIN
IEF237I JES2 ALLOCATED TO SYSOUT
IGD101I SMS ALLOCATED TO DDNAME (SORTOUT )
DSN (ALT0.GDG.INPUT.JCL2 )
STORCLAS (C) MGMTCLAS (Y02H1NNF) DATACLAS (NCSH)
VOL SER NOS= TSQ573
IEF237I JES2 ALLOCATED TO SYSIN
IEF237I JES2 ALLOCATED TO SPYSET
IEF472I M0022001 STEP02 - COMPLETION CODE - SYSTEM=000 USER=0016 REASON=0000000
IGD104I ALT0.GDG.INPUT.JCL1 RETAINED, DDNAME=SORTIN
IEF285I DCSQBTCH.M0022001.JOB25559.D0000103.? SYSOUT
IGD105I ALT0.GDG.INPUT.JCL2 DELETED, DDNAME=SORTOUT
IEF285I DCSQBTCH.M0022001.JOB25559.D0000101.? SYSIN
IEF285I DCSQBTCH.M0022001.JOB25559.D0000105.? SYSOUT
SURF930I STEP ENDED: JOB=M0022001 STEP=STEP02 PGM=SORT ID=SH/00000/004 CC
Back to top
Digvijay Singh Active User Joined: 20 Apr 2022Posts: 148 Location: India
more errors:
Code:
SYNCSORT FOR Z/OS 3.1.4.0R U.S. PATENTS: 4210961, 5117495 (C) 2018 SYNCSO
z/OS 2.4.0
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 13CD7, MODEL 8561 605 LICEN
SYSIN :
OPTION COPY
INREC IFOUTLEN=80,IFTHEN=(WHEN=(1,79,SS,RE,
*
C'.//.$#@A-Z..$#@A-Z0-9.{0,7}. .+JOB. .+'),
PARSE=(%01=(STARTAFT=C'//',ENDBEFR=BLANKS,FIXLEN=8),
%02=(FIXLEN=80)),
BUILD=(C'//AFQGDG6',2X,%02))
END
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER251A INCLUDE/OMIT INVALID COND
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Back to top
Digvijay Singh Active User Joined: 20 Apr 2022Posts: 148 Location: India
Adding on it ..
I just want to add constant job name AFQGDG* in place of job name which would be from coloumn 3 to 8 char maximum
Back to top
Joerg.Findeisen Senior Member Joined: 15 Aug 2015Posts: 1334 Location: Bamberg, Germany
Use Codepage 1047 for the RE terms, or it's equivalents. It works perfectly well in my test case.
Back to top
Digvijay Singh Active User Joined: 20 Apr 2022Posts: 148 Location: India
Thanks for your response again.
I tried only running this sort card which you gave me and it is getting abended anyway I have no clue about this codepage.
I am doing more research how i can achive it.
Back to top
dneufarth Active User Joined: 27 Apr 2005Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
Does Syncsort support RE?
Back to top
Joerg.Findeisen Senior Member Joined: 15 Aug 2015Posts: 1334 Location: Bamberg, Germany
@Dave, question has been asked in DFSORT section. So one would expect solutions utilizing DFSORT features.
Back to top
Joerg.Findeisen Senior Member Joined: 15 Aug 2015Posts: 1334 Location: Bamberg, Germany
Simplified:
Code:
OPTION COPY
INREC IFOUTLEN=80,
IFTHEN=(WHEN=(1,2,CH,EQ,C'//',AND,
3,1,SS,EQ,C'$#@ABCDEFGHIJKLMNOPQRSTUVWXYZ',AND,
4,80,SS,EQ,C' JOB '),
PARSE=(%01=(STARTAFT=C'//',ENDBEFR=BLANKS,FIXLEN=8),
%02=(FIXLEN=80)),
BUILD=(C'//AFQGDG1',2X,%02))
END
Add more checks for length and validity if required.
Back to top
dneufarth Active User Joined: 27 Apr 2005Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
Joerg, Note WER messages earlier in this discussion
Back to top
Joerg.Findeisen Senior Member Joined: 15 Aug 2015Posts: 1334 Location: Bamberg, Germany
dneufarth wrote:
Joerg, Note WER messages earlier in this discussion
I should have paid more attention on this, you are right.
Back to top
Rohit Umarjikar Global Moderator Joined: 21 Sep 2010Posts: 3076 Location: NYC,USA
Moved to the right section.
Back to top
Please enable JavaScript!