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

Comp-3 to Numeric conversion


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

New User


Joined: 24 Jun 2005
Posts: 1
Location: Pune (India)

PostPosted: Mon Jul 04, 2005 6:45 pm
Reply with quote

Hi,
There is a Variable ws-num1 PIC 9(16) comp-3.
I want to copy data starting from 8th position to 3 characters to another variable ws-num2 PIC 9(3).
I want to copy data from one file to another.
Is it possible through JCL.

Thanks
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Mon Jul 04, 2005 6:53 pm
Reply with quote

Hi m.porwal,

Check this link......

http://ibmmainframes.com/viewtopic.php?t=3353&highlight=

Regards,

Priyesh.
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: Mon Jul 04, 2005 9:15 pm
Reply with quote

A PIC 9(16) comp-3 value is a 9-byte PD value that might look like this in hex:

X'01234567890123456C'

Let's assume it starts in position 1.

If you mean that you want to convert the digits 890 to C'890' in positions 1-3, you can do it like this:

Code:

* Convert X'abcd' to C'abcd'.
   INREC FIELDS=(5,2,HEX)
* Truncate C'abcd' to C'abc'.
   OUTREC FIELDS=(1,3)


If you want more specific help, you need to explain in more detail exactly what you're trying to do and show what your input records look like and what you want the output records to look like. Also, what's the RECFM and LRECL of the input file.
Back to top
View user's profile Send private message
kotesh

New User


Joined: 11 May 2005
Posts: 20

PostPosted: Wed Jul 06, 2005 4:45 pm
Reply with quote

icon_surprised.gif icon_lol.gif icon_cool.gif
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts IBM IMU Utility for Easytrieve Code t... IBM Tools 0
No new posts GDG generation name to GDG Base name ... DFSORT/ICETOOL 3
No new posts FB to .CSV conversion using sort DFSORT/ICETOOL 7
No new posts small int to zoned decimal conversion DFSORT/ICETOOL 3
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
Search our Forums:


Back to Top