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 OUTREC IFTHEN=(WHEN=(01,11,PD,GT,0), OVERLAY=(-1,MUL,1,11,PD,PD,LENGTH=11)), IFTHEN=(WHEN=NONE,OVERLAY=(01,11)) /* |
Code: |
Positive Value is stored as : FFFFFFFFFFF 00000001535 Negative value is stored as : FFFFFFFFFFD 00000001535 |
Code: |
OPTION COPY INREC OVERLAY=(21:21,11,ZD,MUL,-1,TO=ZD,LENGTH=11) |
Code: |
INREC IFTHEN=(WHEN=(21,11,ZD,GE,+0), OVERLAY=(21:21,11,ZD,MUL,-1,TO=ZD,LENGTH=11)) |
Quote: |
I don't understand how that can be interpreted as PD. Of course, if it is PD, it really doesn't look like that. |
deepika wrote: |
Thanks for the quick response,Kolusu. The COBOL Declaration for Input field is S9(18)V9(2) Comp-3. The output should be in the same format but multipied with -1. Please let me know if there is any sort option for the same. |
Quote: |
The COBOL Declaration for Input field is S9(18)V9(2) Comp-3. |
output generated using printer-friendly topic mod. All times are GMT - 5 Hours