> So I guess I need to use Rexx, or some other language? SORT doesn't
> do variable length output fields?
Dave,
You don't have to use REXX as DFSORT is quite capable of handling variable
string. Use the function JFY (justifies string to left/right) or SQZ
(removes spaces in between and justifies the string left/right). Both
functions allow you to append strings to the beginning of the string or at
the end. You can also increase the length of the string.
I assumed the input to be dataset names which can have a maximum length of
44 bytes ( exception zfs files). Use the following JCL which would give
you the desired results
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
ZOS21D.ASM.AASMMAC1
ZOS21D.ASM.AASMMAC2
ZOS21D.ASM.AASMMOD1
ZOS21D.ASM.AASMMOD2
ZOS21D.ASM.AASMPUT2
ZOS21D.ASM.AASMSAM1
ZOS21D.ASM.AASMSAM2
ZOS21D.CBC.ACCNCMP
ZOS21D.CBC.ACCNSR1
ZOS21D.CBC.ACLBDLL
ZOS21D.CBC.ACLBDLL2
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC BUILD=(01,44,JFY=(SHIFT=LEFT,
LEAD=C'name="',
TRAIL=C'"',
LENGTH=80))
/*
The output from the above job is 80 bytes records
name="ZOS21D.ASM.AASMMAC1"
name="ZOS21D.ASM.AASMMAC2"
name="ZOS21D.ASM.AASMMOD1"
name="ZOS21D.ASM.AASMMOD2"
name="ZOS21D.ASM.AASMPUT2"
name="ZOS21D.ASM.AASMSAM1"
name="ZOS21D.ASM.AASMSAM2"
name="ZOS21D.CBC.ACCNCMP"
name="ZOS21D.CBC.ACCNSR1"
name="ZOS21D.CBC.ACLBDLL"
name="ZOS21D.CBC.ACLBDLL2"
Thanks,
Kolusu
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN