Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Need help for populating an output file using rexx

Need help for populating an output file using rexx

Need help for populating an output file using rexx

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.

RE: Need help for populating an output file using rexx

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


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close