[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

RUNRMTCMD Printouts

Posted on 2013-01-28
6
Medium Priority
?
1,016 Views
Last Modified: 2013-01-30
According to the IBM manual, when using RUNRMTCMD, "the command is sent to the remote system, the local system waits for the command to complete and the output from the remote command will be placed in a spooled file."  Is is there any way to stop RUNRMTCMD from creating a spool file each time it is run (ideally be able to turn the printing back on when debugging a problem.)?
0
Comment
Question by:doninh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 27

Assisted Solution

by:tliotta
tliotta earned 1400 total points
ID: 38830200
Are you asking about the spooling of the print file or the printing of it? The printing can be avoided by a simple OVRPRTF. The spooling would be trickier.

Tom
0
 

Author Comment

by:doninh
ID: 38831301
Thank you for responding, Tom.   Ideally I would like to not have a spool file created at all, however, if that isn't possible, then I guess I could use OVRPRTF and have the spool file created in an output queue created for just this purpose.  Then after the job has finished, clear the output queue.  Then only thing I'm not sure of is how to specify the spool file before the RUNRMTCMD is executed.
0
 
LVL 35

Assisted Solution

by:Gary Patterson
Gary Patterson earned 600 total points
ID: 38831963
With RUNRMTCMD, the spooled file is actually created on the remote system, and then sent to the local system, so I don't think OVRPRTF on the local system will help.
 
I don't know of any way to "turn off" this behavior, at least not using the CL RUNRMTCMD command.

I'd suggest that you just delete the spooled file right after it is created on the local system.

If the spooled file is owned by the local job containing the RUNRMTCMD, you could just do this:

RUNRMTCMD ...
DLTSPLF FILE(...) SPLNBR(*LAST)

If the spooled file is owned by a QPRTJOB job, then things are a little trickier, and you first need to find the name of the spooled file in order to explicitly delete it.  Here is an article that discusses the options.  I recommend the QSPRILSP API approach:

http://www-01.ibm.com/support/docview.wss?uid=nas145751e5b298957558625713b0053b33e

One last note:  It is also possible to create a program or command on the remote system that intentionally "breaks" the RUNRMTCMD's ability to capture the remote spooled file and send it back.  If you are running a user-defined command or using RUNRMTCMD to run a remote CALL, then you could use this approach, but you'll also have the same spooled file cleanup job to do- just on the remote system instead of the local system.

- Gary Patterson
0
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

 
LVL 27

Accepted Solution

by:
tliotta earned 1400 total points
ID: 38833556
AFAIK, OVRPRTF does work. I'm not aware that the spooled file is created and sent, but that the data is returned and then spooled. I haven't actually checked the mechanism, but the override to QSYSPRT (often for HOLD(*YES)) does work. Under at least some circumstances, an override needs to be SECURE(*YES) because RUNRMTCMD does its own internal override.

Tom
0
 

Author Closing Comment

by:doninh
ID: 38836808
I've been able to avoid having the spool file print using OVRPRTF to QSYSPRT (sending spool file to an output queue with no attached printer) just before executing the RUNRMTCMD command.  (I created the output queue to be used just for this purpose.)  Immediately after the RUNRMTCMD is finished I delete the override.  The CL program loops and the RUNRMTCMD can be executed multiple times.  Then just before the the CL program ends, I clear the output queue containing the spool files that were created each time the RUNRMTCMD was executed.  It's now in production and the users are happy not to be getting 'meaningless' reports printing on their printers any more
Thanks for the great responses.
0
 
LVL 35

Expert Comment

by:Gary Patterson
ID: 38836933
Nice solution.  Thanks for posting back with it.
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working from home is a dream for many people who aren’t happy about getting up early, going to the office, and spending long hours at work. There are lots of benefits of remote work for employees.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question