View previous topic :: View next topic
|
Author |
Message |
m.porwal
New User
Joined: 24 Jun 2005 Posts: 1 Location: Pune (India)
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
kotesh
New User
Joined: 11 May 2005 Posts: 20
|
|
Back to top |
|
|
|