Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts display the sign only if the value is... useit DFSORT/ICETOOL 3 Wed Oct 04, 2017 5:53 pm
No new posts Binary to display characters Roy Ware SYNCSORT 3 Tue Sep 19, 2017 8:46 pm
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm
No new posts Suppress value reported by BREAK in D... Learncoholic DFSORT/ICETOOL 3 Wed Aug 16, 2017 6:03 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us