sujesh_prasannan Currently Banned New User
Joined: 01 Aug 2007 Posts: 6 Location: chennai
|
|
|
|
Hi,
I have a requirement in which i have to convert a comp variable (binary) to an displayable format, i have used a sort card for this.It is working fine for positive numbers but for negative numbers it is displaying some junk value. the sort card is:
Code: |
SORT FIELDS=COPY
OUTFIL OUTREC=(1:7X,8:63,8,16:4X,20:72,4,BI,EDIT=(STTTTTTTTT),
SIGNS=(,-,,),30:50X)
|
Input record lenght -- 450
input field
Code: |
BASE PIC X(08). start pos --63 len-8
NUMBER PIC S9(9) USAGE COMP. start pos --72 len-4
|
input file data:
Code: |
base number
02610244 -345678901
03667163 -678901234
03912421 890123456
0396468C -987654321
04064428 876543210
|
output obtained:
Code: |
base number
02610244 949288395
03667163 616066062
03912421 890123456
0396468C 307312975
04064428 876543210
|
Please let me know if there is any special way to handle negative numbers or is something wrong in my sort card. |
|