Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Packed Decimal to Display

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Packed Decimal to Display
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    Post subject:
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 Moderator


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

PostPosted: Mon Feb 23, 2009 10:07 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us