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 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 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
Search our Forums:

Back to Top