IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Converting data types


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
new2cobol

New User


Joined: 04 Jan 2006
Posts: 77
Location: Bangalore

PostPosted: Thu Jun 22, 2006 7:43 am
Reply with quote

Hi,

I've got a file with COMP-3 (PD) values in it. I am creating a report extracting values from this report using DFSORT and ICETOOL. Is there away I can conver the PD values into ZD?
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Thu Jun 22, 2006 8:38 am
Reply with quote

The below post by Frank might help you.

ibmmainframes.com/viewtopic.php?t=11861

If your requirement is some thing diffrent, then post your requirement completely with some dummy data and file properties.


Thanks
Krishy
Back to top
View user's profile Send private message
new2cobol

New User


Joined: 04 Jan 2006
Posts: 77
Location: Bangalore

PostPosted: Thu Jun 22, 2006 1:28 pm
Reply with quote

That helped in another sort card I had, but this is still open.

The issue is the file looks like this

Code:

asdfgh345..&*


I mean some charecters, numbers, packed numbers. I want my report to have data like

Code:

asdfgh   345    1234


-> that is the packed data converted to readable format.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Thu Jun 22, 2006 8:34 pm
Reply with quote

You can do this in several ways with DFSORT's INREC, OUTREC or OUTFIL statement. See the following for more information:

www.ibm.com/servers/storage/support/software/sort/mvs/beyond_sorting/online/srtmboft.html#ocv

www.ibm.com/servers/storage/support/software/sort/mvs/beyond_sorting/online/srtmboft.html#oed

For example, you could use DFSORT control statements something like this:

Code:

  OPTION COPY
  OUTREC FIELDS=(1,6,10:7,3,17:10,4,PD,TO=ZD,LENGTH=4)


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

Use [URL] BBCode for External Links
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top