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
MCMagOnline pays for tips!
Send your tips to
LATEST COMMENTS
MC Press Online