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
 
How to hard code the PD(Packed Decimal) data thru SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
brit_ch01

New User


Joined: 24 Dec 2007
Posts: 13
Location: Mumbai

PostPosted: Wed Jan 30, 2008 9:13 pm    Post subject: How to hard code the PD(Packed Decimal) data thru SYNCSORT
Reply with quote

I have to hard code +99999999999999.99 to a field in packed decimal format.

Can you please let me know how to do this.

I have tried the below method , but it works if the value is without decimal.

SORT FIELDS=(1,10,CH,A)
INREC FIELDS=(1,10,+999999999999999,PD,LENGTH=8)
Back to top
View user's profile Send private message

Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1276
Location: Israel

PostPosted: Wed Jan 30, 2008 9:34 pm    Post subject:
Reply with quote

PD fields do not have a decimal point. The program reading or writing the field must know where the point is.
For example, if a packed field contains X'0123456F', it will be interpreted by a program as:
123.456 if the program defines the field as PIC 9(4)V9(3) COMP-3
1234.56 if the program defines the field as PIC 9(5)V9(2) COMP-3
0.123456 if the program defines the field as PIC 9V9(6) COMP-3
Back to top
View user's profile Send private message
diwa_thilak

Active User


Joined: 13 Jul 2006
Posts: 205
Location: At my desk

PostPosted: Thu Jan 31, 2008 10:55 am    Post subject:
Reply with quote

Brit,

i encountered a similar situation in recent time. I need to insert 4.1 into the attribute defined as PD.

I used the following sort card for that.

Code:
//SYSIN    DD  *                             
   SORT FIELDS=COPY                         
   OUTREC FIELDS=(1,11,X'00410C',12,68)     
/*     


Hope the explanation given by marso is sufficient.

Marso,

Pretty neat explanation buddy.
Back to top
View user's profile Send private message
brit_ch01

New User


Joined: 24 Dec 2007
Posts: 13
Location: Mumbai

PostPosted: Thu Jan 31, 2008 2:03 pm    Post subject: Reply to: How to hard code the PD(Packed Decimal) data thru
Reply with quote

I have tried with the Hex value. It is working fine.
Thanks a lot
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts 3270 Data stream error Benchwarmer CICS 6 Tue Apr 17, 2018 12:06 am
No new posts How to list data set names with diffe... murali.andaluri CLIST & REXX 8 Thu Apr 12, 2018 11:33 pm
No new posts Getting GG return code abdulrafi IMS DB/DC 2 Tue Apr 10, 2018 12:31 pm
No new posts Reformatting and adding additional fi... Badbeef SYNCSORT 6 Thu Apr 05, 2018 4:45 pm
No new posts Invalid XML character while producing... nikhil.bhole IBM Tools 4 Tue Mar 20, 2018 1:24 am

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