Multi threading program in AS400

5 pts.
Tags:
AS/400
AS400 spool file
multithreading
A multi threading program(3 threads) generate 3 output file (spool file) of the same kind. I want to copy this file. I need only one file in the stream folder. How can I get single file which contains data of all 3 file? (Spool file structure is same) ?
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

Are you looking to copy after the jobs end or combine into one spool as the 3 jobs are still processing? If the later, and running on an I-Series, I don’t think it’s possible.If so I have not seen it in my 35+years.

Discuss This Question: 3  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.
  • TheRealRaven
    How are you running the "copy"?

    In general, you'd use shell redirection of the form [ n ]>> file  to "Append standard output (or n) to file". See the Redirection topic in Qshell (or Pase if you prefer).

    You'd copy the first spooled file, then 'append' each of the other two.

    Other possibilities exist, but redirection is simplest.
    35,690 pointsBadges:
    report
  • BigKat
    you could have the 3 threads write their data to a pf and have a print program run over it when they are done.
    9,460 pointsBadges:
    report
  • TheRealRaven
    Properly structured, the 3 threads should be able to all write to a single (shared ODP) spooled file. It doesn't make good sense, though, since the lines would be intermixed unless the threads ran serially. But in that case there seems no reason to be multi-threaded for spooling records.
    35,690 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.

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

Following

Share this item with your network: