TechTip: Vary Off Controllers with Printers Attached

Document Management
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times
Occasionally, there is a need to vary off a controller. Most shops have several printers attached to a controller, which means that several ENDWTR commands must be executed against these printers. During one of these ENDWTR marathon events (I had to do three controllers), I thought to myself, "There has to be a better way." The next day, I wrote ENDCTLWTR.

This utility consists of one command and one CL program. The ENDCTLWTR command ends all print writers on a specified controller. The command also allows you to select the method for ending the writers (*CNTRLD, *IMMED, *PAGEEND).

ENDCTLWTR runs program END001C. END001C uses the Work with Configuration Status (WRKCFGSTS) command to create a spooled file that lists the status of all of the devices attached to the specified controller. The spooled file is transferred to a physical file in QTEMP, where records are scanned for devices with a status of ACTIVE/WRITER. For each match, the device name is extracted from the file and an ENDWTR command is issued.

To compile END001C, you must create the temp file TPACTWTR in QTEMP first. This can be easily done by issuing this command: CRTPF FILE(QTEMP/TPACTWTR) RCDLEN(132). Then, compile the program END001C interactively. Or add it as a pre-run command if using Turnover or another change management software package.

Click here to download code.

--Keith Reischl
Sr. iSeries Technical Analyst
This email address is being protected from spambots. You need JavaScript enabled to view it.

MCMagOnline pays for tips!
Send your tips to
This email address is being protected from spambots. You need JavaScript enabled to view it.

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$0.00 Raised:
$