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
 

 

Convert pic 9 (18).9 (2) to packed decimal through Sort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Prase

New User


Joined: 07 Oct 2011
Posts: 6
Location: INDIA

PostPosted: Thu Feb 12, 2015 6:44 pm    Post subject: Convert pic 9 (18).9 (2) to packed decimal through Sort
Reply with quote

Hi,

I need to sum the field which has equivalent cobol declaration as Pic 9 (18).99 through Sort. I tried converting the field directly to PD using below code, but the sum field operation failed with S0C7 as the decimal conversion is not happening properly. Can anyone suggest me a method to convert the decimal data to packed decimal through sort ?

Conversion I used:
Outrec fields=(1,90,91,21, ZD,TO=PD,Length=11)

Sample value:
000000000000002645.56
000000000000003600.05

Thanks in advance

Regards,
Praseetha
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7226

PostPosted: Thu Feb 12, 2015 6:59 pm    Post subject: Reply to: Convert pic 9 (18).9 (2) to packed decimal through
Reply with quote

I wonder when I see definitions like that (which require the use of compiler option ARITH(EXTEND). If you have 18 significant digits, what use are two decimal places? If two decimal places are significant, then you'll have a considerable number of leading zeros.

Anyway...

Please copy/paste from your emulator, don't re-type. We don't want to chase typos. Please use the Code tags.

Have a look at the Fields Box sticky at the top of the forum.

A "." is not valid in a ZD, so you are using an incorrect field-definition. If you try with UFF instead, see if you get what you want.
Back to top
View user's profile Send private message
Prase

New User


Joined: 07 Oct 2011
Posts: 6
Location: INDIA

PostPosted: Mon Feb 16, 2015 10:26 am    Post subject:
Reply with quote

Thank you Bill.. that worked..!!! icon_biggrin.gif
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 Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts convert PD to ZD ram_vizag DFSORT/ICETOOL 5 Sat Nov 05, 2016 3:06 am


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