View previous topic :: View next topic
|
Author |
Message |
mkk157
Active User
Joined: 17 May 2006 Posts: 310
|
|
|
|
Dear Experts,
I like to convert the Packed decimal format field to display format.
Example.
Salary : S9(15)V99 COMP-3
Input file = 80 bytes:
From 1 - 62 All are characters
63 - 71 Salary COMP - 3
72 - 80 Characters
I'm using the sort card as
Code: |
//SYSIN DD *
OPTION COPY
INREC FIELDS=(1:1,62,
63:63,9,PD,TO=FS,LENGTH=19,
82:72,8)
/*
|
but the output is coming like below:
Code: |
-250000
-200000000
-1505666
-233318
-144931
-1889
3457
-50000
-40000
|
But I want the output with the '.' like below.
Code: |
-2500.00
-2000000.00
-15056.66
-2333.18
-1449.31
-18.89
34.57
-500.00
-400.00
|
Can anyone give me the sortcard. |
|
Back to top |
|
|
mkk157
Active User
Joined: 17 May 2006 Posts: 310
|
|
|
|
Hi All,
I got the solutions for this requirement,
Code: |
//SYSIN DD *
OPTION COPY
INREC FIELDS=(1:1,62,
63:63,9,PD,EDIT=(STTTTTTTTTTTTTTT.TT),SIGNS=(+,-),
82:72,8)
/*
|
Please corect me, If I'm wrong or provide me better script if any! |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
That edit mask would NOT give you the output in the form you showed you wanted. These DFSORT control statements would.
Code: |
OPTION COPY
INREC FIELDS=(1:1,62,
63:63,9,PD,EDIT=(SIIIIIIIIIIIIIIT.TT),SIGNS=(,-),
82:72,8)
|
|
|
Back to top |
|
|
|
|