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: 1243
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am

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