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 Display ZEDLMSG without Pressing F1 &... anandgbe CLIST & REXX 8 Thu Dec 15, 2016 4:20 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm
This topic is locked: you cannot edit posts or make replies. DSList (3.4) cannot display Chinese c... jacobdng TSO/ISPF 4 Wed Oct 05, 2016 2:51 pm
This topic is locked: you cannot edit posts or make replies. Get and display content of an address... lind sh CICS 1 Mon Aug 08, 2016 9:18 am


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