DFSORT - Convert CH to PD



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

DFSORT - Convert CH to PD

Postby shwetss » Thu Jan 31, 2008 8:01 pm

Hi,
I need to convert a character field of 8 bytes to PD/BI, for summing up.
The file format is as follows:
1 - 42 --> CH
43 - 50 --> CH - need to convert this field
51 - 64 --> CH

Can you please help me solve it using DFSORT/ICETOOL?
Thanks!
shwetss
 
Posts: 1
Joined: Thu Jan 31, 2008 7:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DFSORT - Convert CH to PD

Postby dick scherrer » Fri Feb 01, 2008 12:28 am

Hello,

Do you really need to convert data formats or do you just need to "sum" that field?

If you only need to sum the field, you can define the field as ZD and proceed.

Are you usng COBOL or the SORT (this is posted in the COBOL part of the forums)?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: DFSORT - Convert CH to PD

Postby arunprasad.k » Fri Feb 01, 2008 12:52 pm

How can you convert a character (I assume that it has non-numeric values) to a Packed deciamal?

If you want to convert Numeric fields to Packed deciamals, use the chapter 2.4.7 in the below link.

It has some fine examples. Also you can refer to 2.4.8 for using edited variables.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ICE1CG20/CCONTENTS

Use ZD if your input has only numeric fields.

Arun.
arunprasad.k
 
Posts: 110
Joined: Thu Dec 27, 2007 5:18 pm
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post