Send spool files with option 2 to an output queue that just emails it

65 pts.
Tags:
AS/400
Spool files
We have users all over Canada and reports are printed on our iSeries Here is what we want to do:
  1. User looks at their spooled files
  2. User places a 2=Change (change spool file) and places in an out queue
  3. Once spool file gets to the out queue it send an email to the user with the spool file attached
  4. Spool file gets removed form out queue


Software/Hardware used:
iSeries

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: 21  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
  • CharlieBrowne
    This can be done, but I would ask how are you going to know which user to send it to. Will each user have their own queue?
    I believe there is freeware on the web that have commands to WRKSPLF and then have options to email it. I have used that in the past. There was a limitation on how large the spool file is.
    There are also great products that would help you make this easier. Where use ESEND for ROBOT systems.
    41,430 pointsBadges:
    report
  • TeddySoh

    There is a software call PDFing. Search for it on the Internet. We are using it now and we found it very useful and it doesn't cost much.

    25 pointsBadges:
    report
  • PGMBOB
    You might want to lock each user to see only their files. Iused a security handle when the spool was created so each "district" was the owner of their spool. The report was by district and the print file was opened with an override to the correct "district" owner. The system directory cn be the link to the right Email. Convert to PDF and email from IFS are available options in newer releases. Good Luck!
    1,160 pointsBadges:
    report
  • bvining
    If you're up to a little programming then you could really streamline this process.

    Back in 6.1 IBM provided an exit point in the system named UIM Spooled File User-Defined List Action Exit Program . It's a long name but the net is that you can add your own options (A through Z) to commands such as WRKSPLF, WRKJOB, and WRKOUTQ (even D P if you're in the S/36 environment). 

    So instead of your user selecting option 2 and moving the spool file to an out queue for subsequent sending, you could have a new option 'S' (Send) or 'E' (Email), prompt the user for who to send it to, and then send it off. The actual sending could be your own code or some 3rd party code that provides the actual sending function through say a command interface.

    The exit point will tell your exit program pretty much everything you want to know about the spool file to send (job name, user name, job number, spool file name, spool file number, spool file create date, spool file create time, qualified output queue name), you prompt for the recipient(s), and off you go.

    With this approach you can even have a message show up on the bottom of the IBM Work with panel confirming the email went out :)

    I do have an example program using the exit point in my API Update session given at several conferences over the past few years. The function I actually demonstrate is option 'P' to prioritize the selected spool file by moving it to the top of the queue for processing (rather then emailing the selected spool file), but would give you the general idea,

    Bruce Vining
    6,620 pointsBadges:
    report
  • JCunha

    Thank you all for your insightful input.

    John

    65 pointsBadges:
    report
  • ToddN2000
    We use PDFing as well. Works like a charm !
    15,605 pointsBadges:
    report
  • WoodEngineer
    We do this exact process by sending the spool file to a single output queue which is monitored using a data queue.  When a spool file arrives we retrieve the user's e-mail address from their directory entry on the IBM i (using an IBM API) and send it using a handy tool from Gumbo.  BVS Tools offers a similar PDF product as well.
    This technique works great and requires no special action by the user.
    6,875 pointsBadges:
    report
  • GHENDER

    Bruce,

    Where can I find the example program you were referring to?


    200 pointsBadges:
    report
  • JCunha

    Thank you.....

    Another question

    We want an easy way to convert spooled files to PDF format so that the user gets a PDF format file on the email

    Any HELP is greatly appreciated!

    Thanks

    65 pointsBadges:
    report
  • Splat
    JCunha, what is your OS release?  Here is a guide if you're at v6r1 or v7r1.
    7,665 pointsBadges:
    report
  • azohawk
    Gumbo has a product called SpoolMail that will convert to PDF and email.
    675 pointsBadges:
    report
  • bvining
    GHENDER,

    Send your email address to bvining@brucevining.com and mention you're looking for a copy of the API Update class I give. I'll send it to you. You'll find the example in there (along with a whole lot of other "new" 5.4, 6.1, and 7.1 API enhancements).


    6,620 pointsBadges:
    report
  • JCunha

    Answer to Splat

    V6R1M0

    Thanks

    65 pointsBadges:
    report
  • Splat
    JCunha, if you want to use the built-in PDF output just follow the instructions at that link.  It's easy to load the Transform Services for i5/OS & the rest is about as easy.
    7,665 pointsBadges:
    report
  • JCunha
    Thanks Splat
    65 pointsBadges:
    report
  • WoodEngineer
    Be aware of what AZOHAWK wrote: Converts to PDF AND e-mails.  All in one Gumbo command.
    6,875 pointsBadges:
    report
  • Splat
    WoodEngineer, MIME & Mail from Easy400 (Giovanni Perotti) will do so also.
    7,665 pointsBadges:
    report
  • JCunha

    How do I get a parameter in a command to indent?

      WRKOBJ                                                                          
     Object . . . . . . . . . . . . .                         Name, generic*, *ALL       
           Library  . . . . . . . . . . .     *LIBL         Name, *LIBL, *CURLIB...   
     Object type  . . . . . . . . . .   *ALL           *ALL, *ALRTBL, *AUTL...   

    My commad

    File Name  . . . . . . . . . . .                       File Name   
    Library Name:  . . . . . . . . .   *LIBL         Library Name
    Member Name: . . . . . . . . . .                 Member Name 
    User Name: . . . . . . . . . . .                     User Name   
                                                                                

    Thanks

    65 pointsBadges:
    report
  • bvining
    I'm not sure why this question in in the discussion of sending spool files, but check out the use of the QUAL command within your command definition.
    6,620 pointsBadges:
    report
  • JCunha

    Thank you

    and sorry for posting the question here.....



    65 pointsBadges:
    report
  • PutzGrilla

    Hi Bruce, I missing You on this forum.

    PutzGrilla.

    795 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