Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
coria

New User

Joined: 09 Oct 2006
Posts: 36

Posted: Tue Nov 06, 2007 12:09 pm    Post subject: Convert the packed data to COMP-3

Hi All, I need a help from you,
here is the hex data:
 Code: ------- ..../i? 0000686 0000195

the value should be 618.950, it is packed data, but not COM-3 (no 'D' or 'C' ended)

how to convert this data to S9(9)V9(3) COMP-3 by using a sort step?

Thanks!

Frank Yaeger

DFSORT Moderator

Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

Posted: Tue Nov 06, 2007 9:30 pm    Post subject:

 Quote: the value should be 618.950

Wouldn't the value be 618.965 rather than 618.950? If not, where did the 50 come from?

Ok, so the value is X'00000000618965'. You're correct that it's a packed data value without a sign (it's NOT binary and it's NOT PD) - it has 14 digits. DFSORT doesn't have a built-in format for a PD value without a sign.

 Quote: how to convert this data to S9(9)V9(3) COMP-3

That would be a 12 digit PD value. Note that PD values do not actually have the decimal point - it's implied. So the conversion you asked for would be from X'00000000618965' to X'000000618965C'.

To do that conversion, you need to remove the first 2 digits on the left and add a sign at the end. I assume the sign would always be positive (C) - right?

Do I understand correctly what you want?
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics Can EDCICONV convert EBCDIC to ASCII... natt.sut IBM Tools 3 Fri Nov 17, 2017 8:46 pm Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us