Change the IPL start-up program

Create a startup program that will change the system resources, and the resources and attributes assigned to them, that are started during an IPL. Typically, subsystems, writers, and the Operational Assistant are launched by this program.

The autostart job in the controlling subsystem transfers control to the program that is specified in the start-up program to set up system (QSTRUPPGM) system value. You can tailor this program.

You can create your own program and change the Start-up program to set up system (QSTRUPPGM) system value to that program name. Or, you can use the shipped program QSTRUP in QSYS as a base to create your own program. To do this:

  1. Retrieve the source of the shipped program by using the RTVCLSRC command (for example, RTVCLSRC PGM(QSYS/QSTRUP) SRCFILE(YOURLIB/YOURFILE)).
  2. Change the program.
  3. Create the program by using the CRTCLPGM command, putting it into your own library.
  4. Test the program to ensure that it works.
  5. Change the Start-up program to set up system (QSTRUPPGM) system value to the program name and library you specified on the CRTCLPGM command.

Code example disclaimer

IBM grants you a nonexclusive copyright license to use all programming code examples from which you can generate similar function tailored to your own specific needs.

Start of changeSUBJECT TO ANY STATUTORY WARRANTIES WHICH CANNOT BE EXCLUDED, IBM, ITS PROGRAM DEVELOPERS AND SUPPLIERS MAKE NO WARRANTIES OR CONDITIONS EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT, REGARDING THE PROGRAM OR TECHNICAL SUPPORT, IF ANY. End of change

Start of changeUNDER NO CIRCUMSTANCES IS IBM, ITS PROGRAM DEVELOPERS OR SUPPLIERS LIABLE FOR ANY OF THE FOLLOWING, EVEN IF INFORMED OF THEIR POSSIBILITY: End of change

Start of change
  1. LOSS OF, OR DAMAGE TO, DATA;
  2. DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES, OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES; OR
  3. LOST PROFITS, BUSINESS, REVENUE, GOODWILL, OR ANTICIPATED SAVINGS.
End of change

Start of changeSOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF DIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, SO SOME OR ALL OF THE ABOVE LIMITATIONS OR EXCLUSIONS MAY NOT APPLY TO YOU.End of change

Source for CL Start-up Program

Object Command CL Program Source
QSTRUP CRTCLPGM
PGM
DCL VAR(&STRWTRS) TYPE(*CHAR) LEN(1)
DCL VAR(&CTLSBSD) TYPE(*CHAR) LEN(20)
DCL VAR(&CPYR) TYPE(*CHAR) LEN(90) VALUE('+
5722-SS1 (C) COPYRIGHT IBM CORP 1980, 2000. +
LICENSED MATERIAL - PROGRAM PROPERTY OF IBM')

QSYS/STRSBS SBSD(QSERVER)
MONMSG MSGID(CPF0000)

QSYS/STRSBS SBSD(QUSRWRK)
MONMSG MSGID(CPF0000)

QSYS/RLSJOBQ JOBQ(QGPL/QS36MRT)
MONMSG MSGID(CPF0000)

QSYS/RLSJOBQ JOBQ(QGPL/QS36EVOKE)
MONMSG MSGID(CPF0000)

QSYS/STRCLNUP
MONMSG MSGID(CPF0000)

QSYS/RTVSYSVAL SYSVAL(QCTLSBSD) RTNVAR(&CTLSBSD)
IF ((&CTLSBSD *NE 'QCTL QSYS ') +
*AND (&CTLSBSD *NE 'QCTL QGPL ')) GOTO DONE

QSYS/STRSBS SBSD(QINTER)
MONMSG MSGID(CPF0000)

QSYS/STRSBS SBSD(QBATCH)
MONMSG MSGID(CPF0000)

QSYS/STRSBS SBSD(QCMN)
MONMSG MSGID(CPF0000)

DONE:

QSYS/STRSBS SBSD(QSPL)
MONMSG MSGID(CPF0000)

QSYS/RTVSYSVAL SYSVAL(QSTRPRTWTR) RTNVAR(&STRWTRS)
IF (&STRWTRS = '0') GOTO NOWTRS

CALL PGM(QSYS/QWCSWTRS)
MONMSG MSGID(CPF0000)

NOWTRS:

RETURN
CHGVAR VAR(&CPYR) VALUE(&CPYR)
ENDPGM

Start-up program to set up system (QSTRUPPGM) system value

Start-up program to set up system (QSTRUPPGM) is the start-up program. This value specifies the name of the program that is called from an autostart job when the controlling subsystem is started. This program performs setup functions, such as starting subsystems and printers. This system value can only be changed by the security officer or by someone with security officer authority. A change to this system value takes effect the next time an IPL is performed. QSTRUPPGM can have the values:

  • 'QSTRUP QSYS': The program that is specified is run as a result of a transfer of control to it from the autostart job in the controlling subsystem.
  • '*NONE': The autostart job ends normally without calling a program.

The default start up program QSYS/QSTRUP does the following:

  • Starts the QSPL subsystem for spooled work
  • Starts the QSERVER subsystem for file server work
  • Starts the QUSRWRK subsystem for user work
  • Releases the QS36MRT and QS36EVOKE job queues if they were held (these are used by the System/36™ environment)
  • Starts Operational Assistant cleanup, if allowed
  • Starts all printer writers unless user specified not to on the IPL Options display
  • If the controlling subsystem is QCTL, it starts the QINTER, QBATCH, and QCMN subsystems
Type Length Shipped Value CL
Character 20 'QSTRUP QSYS'

See the Start-up program to set up system (QSTRUPPGM) system value for more detailed information.