kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Dec 26, 2002 9:24 am Post subject: |
|
|
Rasprasads,
There are 2 ways of changing the sign. you can use a change command to change the sign on the last byte of the field in question or you can use horizontal math function (add,sub,mul,div) to change the sign.
Choose whichever you like
Code: |
//STEP0100 EXEC PGM=SORT
//*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=YOUR INPUT FILE,
// DISP=SHR
//SORTOUT DD DSN=YOUR OUTPUT FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(X,Y),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
INREC FIELDS=(1,18,
19,1,CHANGE=(1,X'1C',X'1D',X'1D',X'1C',
X'2C',X'2D',X'2D',X'2C',X'3C',X'3D',X'3D',X'3C',
X'4C',X'4D',X'4D',X'4C',X'5C',X'5D',X'5D',X'5C',
X'6C',X'6D',X'6D',X'6C',X'7C',X'7D',X'7D',X'7C',
X'8C',X'8D',X'8D',X'8C',X'9C',X'9D',X'9D',X'9C'),
NOMATCH=(19,1),
20,621)
/*
|
Method:2
Code: |
//STEP0100 EXEC PGM=SORT
//*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=YOUR INPUT FILE,
// DISP=SHR
//SORTOUT DD DSN=YOUR OUTPUT FILE,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYL,(X,Y),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
INREC FIELDS=(1,11, $ FIRST 11 BYTES
-1,MUL,12,8,PD,PD,LENGTH=8, $ MULTIPLY WITH -1 FOR PD
20,621) $ REST OF THE FIELDS
/*
|
Hope this helps...
cheers
kolusu |
|