Joined: 24 Jun 2005 Posts: 1 Location: Pune (India)
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.
A PIC 9(16) comp-3 value is a 9-byte PD value that might look like this in hex:
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:
* Convert X'abcd' to C'abcd'.
* Truncate C'abcd' to C'abc'.
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.