View previous topic :: View next topic
|
Author |
Message |
dipakgoyal Warnings : 1 New User
Joined: 02 Aug 2007 Posts: 18 Location: Kolkata
|
|
|
|
I have an input-file, with a field
IN-AMT PIC S9(05)V999 SIGN IS LEADING SEPARATE CHARACTER.
The first 2 values are:
+00112.738
+00024.119
When I used the SYNCSORT to download it to a output file, using:
OUTREC FIELDS=(001:197,08,ZD,
010:C';',
The output I get is:
112730-;
24110-;
i.e.
1. Decimal is not printed
2. Negative sign coming in the end
3. LSB is truncated
Please note that increasing the input-field length , i.e using
OUTREC FIELDS=(001:197,09,ZD,
results in S0C7
Is there any way, apart from using EDIT=TTT.TTT
using which I can get the same output as input
like the way we use ZD,M4? |
|
Back to top |
|
|
nareshdacha
New User
Joined: 12 Jan 2010 Posts: 66 Location: US
|
|
|
|
Try this out.....
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,10,SFF,EDIT=(STTTTT.TTT),SIGNS=(+,-)) |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
nareshdacha,
The field under question occupies ONLY 9 bytes and NOT 10 bytes as in your post.
dipakgoyal,
I believe this would work for you.
Code: |
OUTREC FIELDS=(1:197,9,ZD,EDIT=(STTTTT.TTT),SIGNS=(+,-)) |
|
|
Back to top |
|
|
dipakgoyal Warnings : 1 New User
Joined: 02 Aug 2007 Posts: 18 Location: Kolkata
|
|
|
|
Thanks Arun
It solves the purpose |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Youre welcome. |
|
Back to top |
|
|
|