Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help for populating an output file using rexx

Status
Not open for further replies.

me eru

Programmer
Jul 21, 2020
1
US
Hi All,

I am accepting a copybook as input from user and need to write a output file with test data as per the input copybook layout.
I am taking the PIC clause and checking if it is 'X' or 9 and taking the length which is present in between the braces.
for example if the value is PIC X(25), im taking 25 into a variable and picking that many bytes of random data from the reference file and writing it to an output file.

I am able to write a output file, but the data is overwritten and the output contains the last fields value.
Can anyone please help me on this how to proceed.?
I want to read a first record from my input and write output for those many bytes.
and read next record from input file and write a output in the same first line with few bytes starting from the next byte of first field.

Thanks in advance.
Me eru.
 
Presumably you have resolved this by now? Presumably you were closing and reopening the file/dataset after each write.


Nic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top