INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

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.

Jobs

(iSeries) Insert vars based on query in CLP

(iSeries) Insert vars based on query in CLP

(OP)
Hello all.

I am trying to automate creation and e-mailing of PDF documents from SPLF, and am using BVS's SPLTOOL (SPL2STMF) utility.

I need to get the splf name, job name, user, job number and splf number into vars so I can plug them into the SPL2STMF command.

So far, I have:
Created a SPLF of the outq (WRKOUTQ OUTQ(MYOUTQ) OUTPUT(*PRINT),
Created a 132 column PF of the SPLF (F132) with one record per entry,
Created a query with PF output with user defined fields using SUBSTR to get my information into fields.

I probably will know the username,jobname and splf name, but I need to select by date to get the jobnumber and, possibly, the splf number into vars to be inserted into the SPL2STMF command.

This has to be CLP, and I have no idea how to get that information into variables.  Can someone either give me a hint or take pity on my and just give me the code????

Thanks in advance for any assistance!

Bruce Uberti
Oregon Judicial Department

RE: (iSeries) Insert vars based on query in CLP

It's surprisingly easier than you might think. You can do it all within one CL.

Declare the outfile from the query.
Run your query.
Read through that file.
Run the spool tool command using the field names prefixed with an ampersand "&".

Let's say, your outfile has the following fields...
"Field name = Description"
FIELD1 = SPLFNAME
FIELD2 = JOBNAME
FIELD3 = JOBNBR
FIELD4 = USER
FIELD5 = SPLNBR

CODE

DCLF       FILE(Library/Filename)
RUNQRY     QRY(Library/Query) - which creates the above file.
RCVF
I don't know the options for that command, so I'll just show you how to use the variables.
SPL2STMF   SPLNAME(&FIELD1) JOBNAME(&FIELD2) etc...

I assume you know how to email from the IFS.

Let me know if that works for you.

Mark

RE: (iSeries) Insert vars based on query in CLP

(OP)
Mark -

Thanks for the information!  I'll work with it when I get back to work and let you (and everyone else) know how it shook out.

I do know how to email from the IFS, but will not be able to do that until my enterprise people set up SMTP on our local iSeries again.  

In the interim, I'll sched a Domino Agent to grab the ensuing attachment and send it via Notes.

Thanks again for the response

Bruce

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!

Resources

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