×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

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

Sending files to multiple outq

Sending files to multiple outq

Sending files to multiple outq

(OP)
Does anyone know how the command/program for sending one report to multiple outq looks like? Any example would be appreciated.

Thanks.

RE: Sending files to multiple outq

Look here.

RE: Sending files to multiple outq

Look here.
Or,

SNDTCPSPLF RMTSYS(SameAS400) PRTQ('MyLib/MyOtherOutq') FILE(SplfName) JOB(.../.../...) DESTTYP(*AS400) TRANSFORM(*NO)

RE: Sending files to multiple outq

(OP)
I was thinking more like duplicating an output and sending the duplicate to another OUTQ.

The user receives a report in one location and another user wants to receive the same report in another location.

Here's the example I was able to find:
 CALL PGM   /* program that generates QSYSPRT */
      CPYSPLF    FILE(QSYSPRT) TOFILE(ACJXL/SPOOL1) +
                   MBROPT(*REPLACE)
      OVRPRTF    FILE(QSYSPRT) TOFILE(QSYS/QSYSPRT) +
                   OUTQ(outq1) COPIES(1) HOLD(*YES) +
                   USRDTA('report01') SPLFNAME(report01)
      CPYF       FROMFILE(ACJXL/SPOOL1) TOFILE(QSYS/QSYSPRT)
      DLTOVR     FILE(QSYSPRT)
 
For some reason the OUTQ of the report remains the same and does not change to outq1. I've tried moving the OVRPRTF above the CALL but I received the same results.

Any ideas?


RE: Sending files to multiple outq

Forget the overrides. You need to do a CHGSPLFA on the last spool file to change its ouput queue (after you have duplicated the spool file):

CODE

CHGSPLFA FILE(QSYSPRT) JOB(*) SPLNBR(*LAST) OUTQ(OUTQ1)

Solum potestis prohibere ignes silvarum.

RE: Sending files to multiple outq

Flapeyre,
If you change outq with CHGSPLFA the report is no more in the previous OUTQ; however Ju5 wants the reports to remain in it as far as I understand her first request.

Ju5,
Why do you want to duplicate the spool using CPYSPLF CTLCHAR(*FCFC)? Doing so will not save the printing attributes such as CPI and LPI whilst using SNDTCPSPLF avoids the hassle of the defective CPYSPLF.

RE: Sending files to multiple outq

(OP)
I'm actually just using an example I found at this link:

http://search400.techtarget.com/tip/0,289483,sid3_gci929529,00.html

I think I found another way using SNDNETSPLF but which do you think would be better: SNDTCPSPLF or SNDNETSPLF?

Also I have one RPG program that produces 2 QSYSPRT files. Is there a way to duplicate both of them?

RE: Sending files to multiple outq

(OP)
Looks like SNDTCPSPLF does the job! Thanks Mercury2! I wasn't sure if I could TCP the file back into the same system(the destination address is the same one you're using) but apparently, you can. Here's what I used:

SNDTCPSPLF RMTSYS(AS40008.SBY.STF.BMS.COM) PRTQ(outq1) +
             FILE(QSYSPRT) SPLNBR(*LAST) +
             JOBSYSNAME(*CURRENT) DESTTYP(*AS400) +
             TRANSFORM(*NO)

I had to set the Transform parameter to *NO because the copied file becomes garbage if the Transform is set to *Yes. I also had to specify that the Destination type was *AS400 to retain formatting.

I still need to know if it's possible to do the same when a program outputs 2 QSYSPRT files, if it's even possible, and how.

RE: Sending files to multiple outq

(OP)
I jsut noticed that the two files generated by the program have different names. SNDTCPSPLF should still work. Right?

RE: Sending files to multiple outq

Quote (Ju5):

I had to set the Transform parameter to *NO because the copied file becomes garbage if the Transform is set to *Yes. I also had to specify that the Destination type was *AS400 to retain formatting.
That's exactly what I showed on my example of SNDTCPSPLF above.

To answer your last question SNDNETSPLF and SNDNETSPLF send both the spooled files to the network. However SNDNETSPLF sends the spooled files over SNA (IBM Network) and I am pretty sure that you are better off with SNDTCPSPLF that sends over TCP/IP.
If the files generated by the program have different names SNDTCPSPLF will work. If they have the same name, SNDTCPSPLF will work provided that they have the correct spool number (SPLNBR).

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