kleo32
New User
Joined: 30 Jan 2007 Posts: 1 Location: London
|
|
|
|
Hi All,
I need to generate a file (FB/LRECL=16) wherein I need a sequence number and its reverse, each of 8 bytes. The file should look something like this
0000000110000000
0000000220000000
.
.
0000123443210000
I can generate the sequence number using the SEQNUM, however is there any function to reverse it.
Thanks |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
This DFSORT job will do what you asked for:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=INIT,BUILD=(SEQNUM,8,ZD)),
IFTHEN=(WHEN=INIT,
BUILD=(1,8,9:8,1,7,1,6,1,5,1,4,1,3,1,2,1,1,1))
/*
|
|
|