IBM Support

Solution to Remote Writers Not Starting at IPL

Troubleshooting


Problem

This document discusses a problem where remote writers are started automatically after an IPL, but they fail with message CPF3397 "Writer &3/&2/&1 did not end normally" in the History Log and with messages TCP3423 "No TCP/IP service available" and TCP3701 "Send request failed for spooled file &1" in the writer job log.

Resolving The Problem

This document discusses a problem where writers are started automatically after an IPL, but the remote writers are failing with message CPF3397 - Writer &3/&2/&1 did not end normally in the History Log and with messages TCP3423 - No TCP/IP service available and TCP3701 - Send request failed for spooled file &1 in the writer job log. The problem is that TCP/IP is not starting soon enough for it to be completely up and running by the time the remote writers are started and are ready to send spooled files via Line Printer Requester (LPR) and TCP/IP.

The QSPL subsystem description is setup to automatically start remote writers for all Remote Output Queues (RMTOUTQs) that have the Writers to autostart (AUTOSTRWTR) parameter set to something other than *NONE. This is done through the QSTRRMTWTR auto-start job entry in the QSPL subsystem description. Remote writers, and printer writers for *LAN IPDS and *LAN 3812 printer device descriptions, require TCP/IP to be completely running in order to print. Therefore, the only way to ensure that the writers are able to print successfully is to give TCP/IP enough time to start before the QSPL subsystem is started. This problem can be done by changing the QSTRUP program to start the QSPL subsystem after all other subsystems have been started and after a short delay.

This document was last updated on 1 June 2011.




Retrieving the CL Source of a Start-Up Program

Usually the QSTRUP source code is retrieved and stored in the QCLSRC file in library QGPL, but a different source physical file can be used instead. If so, that file used be created using the Create Source Physical File (CRTSRCPF) command, for example:

CRTSRCPF FILE(library/QCLSRC)

Once the source physical file has been created, or if using the QCLSRC file in library QSYS, then the start-up program source code can be retrieved to the source physical file using the Retrieve CL Source (RTVCLSRC) command, for example:

RTVCLSRC  PGM(QSYS/QSTRUP)  SRCFILE(library/QCLSRC)  SRCMBR(*PGM)

Note: If the start-up program source has already been retrieved and modified, then running the RTVCLSRC command again could overwrite those modifications. In this case, the CL source code can be retrieved into a different source member by specifying that member name in the SRCMBR parameter, for example "SRCMBR(QSTRUP2)". Then that member can be compared to the existing start-up program source code that has already been modified.


Default Start-Up Program Source Code for V5R2M0 (R520) OS/400 through V5R4M0 (R540) i5/OS

The default start-up program or QSTRUP source code for V5R2M0 (R520) OS/400, V5R3M0 (R530) i5/OS and V5R4M0 (R540) i5/OS is as follows:

0021.00      PGM
0022.00      DCL VAR(&STRWTRS) TYPE(*CHAR) LEN(1)
0023.00      DCL VAR(&CTLSBSD) TYPE(*CHAR) LEN(20)
0024.00      DCL VAR(&CPYR) TYPE(*CHAR) LEN(90) VALUE('5722-SS1 (C) COPYRIGHT-
0025.00  IBM CORP 1980, 2000. LICENSED MATERIAL - PROGRAM PROPERTY OF IBM')
0026.00      QSYS/STRSBS SBSD(QSERVER)
0027.00      MONMSG MSGID(CPF0000)
0028.00      QSYS/STRSBS SBSD(QUSRWRK)
0029.00      MONMSG MSGID(CPF0000)
0030.00      QSYS/RLSJOBQ JOBQ(QGPL/QS36MRT)
0031.00      MONMSG MSGID(CPF0000)
0032.00      QSYS/RLSJOBQ JOBQ(QGPL/QS36EVOKE)
0033.00      MONMSG MSGID(CPF0000)
0034.00      QSYS/STRCLNUP
0035.00      MONMSG MSGID(CPF0000)
0036.00      QSYS/RTVSYSVAL SYSVAL(QCTLSBSD) RTNVAR(&CTLSBSD)
0037.00      IF COND((&CTLSBSD *NE 'QCTL      QSYS      ') *AND (&CTLSBSD *NE-
0038.00  'QCTL      QGPL      ')) THEN(GOTO CMDLBL(DONE))
0039.00      QSYS/STRSBS SBSD(QINTER)
0040.00      MONMSG MSGID(CPF0000)
0041.00      QSYS/STRSBS SBSD(QBATCH)
0042.00      MONMSG MSGID(CPF0000)
0043.00      QSYS/STRSBS SBSD(QCMN)
0044.00      MONMSG MSGID(CPF0000)
0045.00 DONE:
0046.00      QSYS/STRSBS SBSD(QSPL)
0047.00      MONMSG MSGID(CPF0000)
0048.00      QSYS/RTVSYSVAL SYSVAL(QSTRPRTWTR) RTNVAR(&STRWTRS)
0049.00      IF COND(&STRWTRS = '0') THEN(GOTO CMDLBL(NOWTRS))
0050.00      CALL PGM(QSYS/QWCSWTRS)
0051.00      MONMSG MSGID(CPF0000)
0052.00 NOWTRS:
0053.00      RETURN
0054.00      CHGVAR VAR(&CPYR) VALUE(&CPYR)
0055.00      ENDPGM


Modifying the Start-Up Program Source Code

If the start-up program or QSTRUP source code has been modified, for instance, to start additional subsystems or third-party applications, then first verify that the "QSYS/STRSBS SBSD(QSPL)" command to start the QSPL subsystem is after the commands to start the other subsystems and before the commands to retrieve the QSTRPRTWTR system value and to run QWCSWTRS, which is a program that is used to start the printer writers.

Even when the QSPL subsystem is started after all of the other subsystems, there is a good chance that the remote writers will be started before TCP/IP is fully up and running, so a delay will probably need to be added before starting the QSPL subsystem as well. In some cases, a 30-second delay may give TCP/IP enough of a head-start to allow the remote writers to start printing without risk of failing with messages TCP3423 - No TCP/IP service available and TCP3701 - Send request failed for spooled file &1. However, unless printing needs to start immediately after an IPL, it would be better to wait 5 minutes, or 300 seconds, because using too small of a delay could cause your remote writers to end unexpectedly.

A 5- or 10-minute delay can be added to the start-up program source code using the following Delay Job (DLYJOB) command. For example:

QSYS/DLYJOB DLY(300)

QSYS/DLYJOB DLY(600)

This command should be added immediately before starting the QSPL subsystem, for example:

0021.00      PGM
0022.00      DCL VAR(&STRWTRS) TYPE(*CHAR) LEN(1)
0023.00      DCL VAR(&CTLSBSD) TYPE(*CHAR) LEN(20)
0024.00      DCL VAR(&CPYR) TYPE(*CHAR) LEN(90) VALUE('5722-SS1 (C) COPYRIGHT-
0025.00  IBM CORP 1980, 2000. LICENSED MATERIAL - PROGRAM PROPERTY OF IBM')
0026.00      QSYS/STRSBS SBSD(QSERVER)
0027.00      MONMSG MSGID(CPF0000)
0028.00      QSYS/STRSBS SBSD(QUSRWRK)
0029.00      MONMSG MSGID(CPF0000)
0030.00      QSYS/RLSJOBQ JOBQ(QGPL/QS36MRT)
0031.00      MONMSG MSGID(CPF0000)
0032.00      QSYS/RLSJOBQ JOBQ(QGPL/QS36EVOKE)
0033.00      MONMSG MSGID(CPF0000)
0034.00      QSYS/STRCLNUP
0035.00      MONMSG MSGID(CPF0000)
0036.00      QSYS/RTVSYSVAL SYSVAL(QCTLSBSD) RTNVAR(&CTLSBSD)
0037.00      IF COND((&CTLSBSD *NE 'QCTL      QSYS      ') *AND (&CTLSBSD *NE-
0038.00  'QCTL      QGPL      ')) THEN(GOTO CMDLBL(DONE))
0039.00      QSYS/STRSBS SBSD(QINTER)
0040.00      MONMSG MSGID(CPF0000)
0041.00      QSYS/STRSBS SBSD(QBATCH)
0042.00      MONMSG MSGID(CPF0000)
0043.00      QSYS/STRSBS SBSD(QCMN)
0044.00      MONMSG MSGID(CPF0000)
0045.00 DONE:
0045.01      QSYS/DLYJOB DLY(600) /* Delay 10 minutes before starting QSPL */
0046.00      QSYS/STRSBS SBSD(QSPL)
0047.00      MONMSG MSGID(CPF0000)
0048.00      QSYS/RTVSYSVAL SYSVAL(QSTRPRTWTR) RTNVAR(&STRWTRS)
0049.00      IF COND(&STRWTRS = '0') THEN(GOTO CMDLBL(NOWTRS))
0050.00      CALL PGM(QSYS/QWCSWTRS)
0051.00      MONMSG MSGID(CPF0000)
0052.00 NOWTRS:
0053.00      RETURN
0054.00      CHGVAR VAR(&CPYR) VALUE(&CPYR)
0055.00      ENDPGM

Note: In the above example, a comment was added to the end of the DLYJOB command to document that this command has been added to delay 5 minutes before starting the QSPL subsyste. This comment is optional.


Creating the QSTRUP Program

After the system startup program source code has been updated to run the Delay Job (DLYJOB) command before starting the QSPL subsystem, then the system startup program must be recompiled using the Create CL Program (CRTCLPGM) command, for example:

CRTCLPGM PGM(library-name/startup-program-name)
         SRCFILE(library-name/source-file-name) SRCMBR(member-name)

Press the Enter key.


For More Information

For detailed information on modifying the QSTRUP source code, refer to the following Rochester Support Center knowledgebase document:

N1019476: Changing the IPL Start-Up Program - V5R3M0 and Above

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Historical Number

477948699

Document Information

Modified date:
18 December 2019

UID

nas8N1018787