View previous topic :: View next topic
|
Author |
Message |
Raghuraman_New
New User
Joined: 03 Oct 2008 Posts: 43 Location: Chennai,India.
|
|
|
|
Hi,
I am converting a whole number to a PD data Format. When the input number is negative , there is a leading negative sign the output (PD format) whereas there is no positive sign appearing when the input is positive number.
Eg:-
Case 1:
Input : -00000100000000000
Actual output* : -100.000000000
Expected output* : -100.000000000
Case2:
Input : +00000100000000000
Actual output* : 100.000000000
Expected output* : +100.000000000
The case 1 is acheived with the below CNTLCARD but couldnt acheive the case 2.
The CNTLCARD used is given below,
Code: |
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,18,FS,PD,LENGTH=10)
|
*The output are seen thru INSYNC and the data type is PS(9,9) (packed decimal).[/code][/quote] |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
I don't think your problem is with SyncsortV1.2, PD fields always have a sign, your problem is with the way INSYNC is displaying the value of a positive field. Most products that format and display data don't show a + for positive fields. Look in the INSYNC documentation for the solution to your "problem". |
|
Back to top |
|
|
Raghuraman_New
New User
Joined: 03 Oct 2008 Posts: 43 Location: Chennai,India.
|
|
|
|
Hi ,
I am afraid that it might not be a problem with INSYNC . Because when i browsed the ps file and with HEX ON in the PS file the value of
100.000000000 in the PD format is represented as (pls see F in the last bit)
Code: |
0000000000
000100000F
|
+100.000000000 in the PD format is represented as (pls see C in the last bit)
Code: |
0000000000
000100000C
|
So if i am right it is something to do with the way data is converted to PD fromat . |
|
Back to top |
|
|
|