Name Stream File based on data in file.

245 pts.
Tags:
CL
IFS
RPG
Hi, I'm not even sure this one is possible. I can create and write to a stream file with no problems. Now we want to create individual attachment files for Mapics for manufacturing orders. A file contains the individual manufacturing order numbers. As we read the file we want to create a steam file for each manufacturing order that is read. (i.e. M12345.txt, M22222.txt ) Any ideas? Thanks!
ASKED: July 10, 2013  12:33 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta

    I can't tell what the problem is.

    I can create and write to a stream file with no problems.

    If there is no problem doing that, then what is the problem?

    Tom

    125,585 pointsBadges:
    report
  • NYRANGER
    If I pre-define the file name I can create the file. They want the file name to be determined by what is in the file. So if the first record is M12345 they want the file to be called M12345.txt, second record M67890 next file M67890.txt. and so on. How do you set up the file name when it is not pre-defined?
    245 pointsBadges:
    report
  • bvining
    Rather than defining the file name as a constant you can use a variable. In the variable have the path concatenated with the attachment name concatenated with '.txt'. Create/Open the stream file and away you go.
    6,240 pointsBadges:
    report
  • TomLiotta

    Bruce said it the way it is. I'm not sure how to say it better.

    If I pre-define the file name I can create the file.

    I'm not sure what you mean by "pre-define" when you follow it with "create the file". That already sounds like you're doing what you're asking us how to do.

    Maybe if you showed us some code that you use to "pre-define" a streamfile along with code you then use to "create" it, it would be clear. We could then show changed code that would be more flexible.

    Tom

    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following