View previous topic :: View next topic
Author
Message
Guruprasad.R New User Joined: 03 Sep 2009Posts: 2 Location: US
I have a JCL step that executes a FileAID utility like below:
------------------------------------------------------------------------------------
//PS010 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=A
//DD01 DD DSN=BEXP.PMSTB.N.IMAGE.XREF.PDSE,DISP=SHR
//DD01O DD DISP=(NEW,CATLG,CATLG),DSN=BEXD.PMSTB.N.MEM,
// UNIT=SYSDA,RECFM=FB,LRECL=80,BLKSIZE=0,
// SPACE=(TRK,(75,5),RLSE)
//SYSIN DD *
$$DD01 COPYALL IF=(1,EQ,C'CMA'),
MOVE=(+0,C'$$DD01 LMODDIR MEMBER='),
MOVE=(+0,8,40),
OUT=0
//*
----------------------------------------------------------------------------------
Infile looks like this:
CMA02254P01'BEXP.PCTLB.E.BEXP.PROD.IMG(C0225401)'
CMA02254P02'BEXP.PCTLB.E.BEXP.PROD.IMG(C0225402)'
CMA02254P03'BEXP.PCTLB.E.BEXP.PROD.IMG(C0225403)'
CMA02254P04'BEXP.PCTLB.E.BEXP.PROD.IMG(C0225404)'
CMA02254P05'BEXP.PCTLB.E.BEXP.PROD.IMG(C0225405)'
And after writing, the Outfile looks like this:
$$DD01 LMODDIR MEMBER=C0225401
$$DD01 LMODDIR MEMBER=C0225402
$$DD01 LMODDIR MEMBER=C0225403
$$DD01 LMODDIR MEMBER=C0225404
$$DD01 LMODDIR MEMBER=C0225405
I was trying to achieve the same result thru SORT or ICETOOL, I am facing some problem with syntax. Can someone please provide me a syntax for addressing the above situation.
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
The equivalent DFSORT job would be:
Code:
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=BEXP.PMSTB.N.IMAGE.XREF.PDSE,DISP=SHR
//SORTOUT DD DISP=(NEW,CATLG,CATLG),DSN=BEXD.PMSTB.N.MEM,
// UNIT=SYSDA,RECFM=FB,LRECL=80,BLKSIZE=0,
// SPACE=(TRK,(75,5),RLSE)
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(1,3,CH,EQ,C'CMA'),
BUILD=(C'$$DD01 LMODDIR MEMBER=',40,8,80:X))
/*
Back to top
Guruprasad.R New User Joined: 03 Sep 2009Posts: 2 Location: US
Thanks for the Solution. it works as desired. I just had one small question. What does this 80:X for in this Build ?
Back to top
Frank Yaeger DFSORT Developer Joined: 15 Feb 2005Posts: 7129 Location: San Jose, CA
80:X is a convenient way of setting the record length (and LRECL) to 80.
It just says to pad out the records with blanks from the last specified position to position 80. So in the output records you would have the constant, the 40,8 input field and then blanks up to and including position 80, and the LRECL would automatically be set to 80.
Back to top
Please enable JavaScript!