Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OVRPRTF Question

Status
Not open for further replies.

Sparc

Programmer
Jun 20, 2001
4
US
I have an app that produces a rather large spoolfile. In order to send it to the appropriate outq and put it on hold i'm using an OVRPRTF command in the CL used to call it. However, if I try to use the SBMJOB command instead of a straight CALL in the CL it appears as if the OVRPRTF command is ignored. Am I missing a parameter(s) in the SBMJOB or in the OVRPRTF command that would allow me to submit rather than tie up the session while the app runs?
 
I am assuming you are doing this:

PGM

OVRPRTF *PRT HOLD(*YES)

SBMJOB CMD(CALL PGMNAME PARM(PARM))

ENDPGM

That should work. IIRC the SBMJOB takes the settings at the point it gets submitted. If that doesn't work. Try running the command in the program itself. Mike Wills
RPG Programmer (but learning Java)

"Kernel Panic has performed an Illegal Operation, so I must defrag the situation before Dr. Watson reads the logs and discovers a lost cluster."
 
I believe by using the SBMJOB command the application called using this is considered a new job so the earlier issued OVRPRTF in the CL would be ignored.

It appears that the simplest way to get around this is to use a CALL command in the CL and then submit the entire CL rather than just the Call statement within the CL - that way the OVRPRTF would be valid.
 
Or try another neat trick I have seen. Have the CL submit itself. That way you still are using one CL. If you would like I can give you the general logic on how that is done. Mike Wills
RPG Programmer (but learning Java)

"Kernel Panic has performed an Illegal Operation, so I must defrag the situation before Dr. Watson reads the logs and discovers a lost cluster."
 
Would you submit the general logic for the self submitting cl. I have used it on a previous job and I need to use it again and did not take the code with me.

Thanks in Advance.
 
Hmm...I don't have an example. Search Google groups or midrange.com archives. There should be examples there. Mike Wills
RPG Programmer (but learning Java)

"Kernel Panic has performed an Illegal Operation, so I must defrag the situation before Dr. Watson reads the logs and discovers a lost cluster."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top