Posted: Fri Jul 09, 2021 12:03 pm Post subject: Conversion from PD to ZD doesn't retain sign.
Good day everyone, thought it should be an easy task, but missing something.
Need to convert a S9(10)V99 COMP-3 value to S9(9)V99 with a C or D sign bit in the last byte.
Used this in DFSOrt but losing a sign somewhere.
OUTREC FIELDS=(1,7,PD,TO=ZD,LENGTH=11)
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Fri Jul 09, 2021 12:12 pm Post subject:
ramy2016,
DFSORT does indeed retain the sign. F is a positive sign. If you need C as positive sign you need to use ZDC instead of ZD as ZD or ZDF output, F is used as the positive sign and D is used as the negative sign. For ZDC output, C is used as the positive sign.
Also a 7 byte PD field can have upto 14 digits in display format. Why are you just limiting to 11?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum