IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Packed Decimal to Display


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Mon Feb 23, 2009 3:32 pm
Reply with quote

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
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Mon Feb 23, 2009 4:31 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Feb 23, 2009 10:07 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
No new posts Need Help with Packed Decimal Signs DFSORT/ICETOOL 4
No new posts Select a DB2 value in a specific deci... DB2 4
Search our Forums:

Back to Top