QSTRUP is the program that runs at IPL and starts up the system (subsystems, spooler jobs, etc).

 

The first thing we need to know is the location of the STRUP program in your system. You can do this with the command:

WRKSYSVAL SYSVAL(QSTRUPPGM)

If you have not changed it previously you should find it in library QSYS with the name QSTRUP.

                             Display System Value          

                                                           

System value . . . . . :   QSTRUPPGM                       

Description  . . . . . :   Startup program                 

                                                           

                                                           

Startup program  . . . . . . :   QSTRUP         Name, *NONE

  Library  . . . . . . . . . :     QSYS         Name       

 

There are too many ways to change the QSTRUP program but one safe one is to retrieve the source code from the existing one and create a new one once compiled with the QSECOFR user. This new one can be located anywhere in your system. In our example I am going to choose a library called STRUPLIB.

The first thing you need to do is to create a new source physical file object called, i.e, QSTRUPIBM in your new created library STRUPLIB. You can do it this way:

CRTSRCPF FILE(STRUPLIB /QSTRUPIBM) RCDLEN(112) 

Tip: take into account we have considered the length for the register set to 112 in order not to have problems with any editor.

Now we must retrieve the source code as mentioned above. We can do this using the command:

RTVCLSRC PGM(QSYS/QSTRUP) SRCFILE(STRUPLIB /QSTRUPIBM)

This is time to access to the code. Launch the command WRKOBJPDM LIB(STRUPLIB) OBJ(QSTRUPIBM) and press option ‘12 = Work with’ and option ‘2 = Edit’.

This way you will be using the SEU utility and here it is the code. You should have some knowledge about Command Line Programming and iSeries operating system to work with this. The following code corresponds to a non-changed V5RM30 operating system startup program. Basically the program launches several subsystems and check a few things about the control subsystem QCTL and manage system printers. The command MONMSG MSGID(CPF0000) is used to avoid possible errors when executing the previous command.

The subsystem T4NICELINK can be started once the rest of the subsystems have been started properly. This is the safer way. However we do not recommend anyone from Tango/04 to do these actions in any system. Those are matters related to system administrators. The idea of this document is having the knowledge to guide the customer if it is necessary.

/********************************************************************/

/*                                                                  */

/* 5722SS1 V5R3M0 040528     RTVCLSRC Output     12/03/16 20:57:45  */

/*                                                                  */

/* Program name . . . . . . . . . . . . . . :   QSTRUP            PN*/

/* Library name . . . . . . . . . . . . . . :   QSYS              PL*/

/* Original source file . . . . . . . . . . :   S000039122        SN*/

/* Library name . . . . . . . . . . . . . . :   $BLDSS1           SL*/

/* Original source member . . . . . . . . . :   S000039122        SM*/

/* Source file change                                               */

/*   date/time  . . . . . . . . . . . . . . :   03/11/30 20:06:43 SC*/

/* Patch option . . . . . . . . . . . . . . :   *NOPATCH          PO*/

/* User profile . . . . . . . . . . . . . . :   *USER             UP*/

/* Text . . . :                                                   TX*/

/* Owner  . . . . . . . . . . . . . . . . . :   QSYS              OW*/

/* Patch change ID  . . . . . . . . . . . . :                     PC*/

/* Patch APAR ID  . . . . . . . . . . . . . :                     PA*/

/* User mod flag  . . . . . . . . . . . . . :   *NO               UM*/

/*                                                                ED*/

/********************************************************************/  

     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 COND((&CTLSBSD *NE 'QCTL      QSYS      ') *AND (&CTLSBSD *NE-  

 'QCTL      QGPL      ')) THEN(GOTO CMDLBL(DONE))                        

     QSYS/STRSBS SBSD(QINTER)                                           

     MONMSG MSGID(CPF0000)                            

     QSYS/STRSBS SBSD(QBATCH)                         

     MONMSG MSGID(CPF0000)                            

 STRSBS SBSD(T4NICELINK/T4NICELINK)

     MONMSG MSGID(CPF0000)                        

NOWTRS:                                                

     RETURN                                           

     CHGVAR VAR(&CPYR) VALUE(&CPYR)                   

     ENDPGM                                           

 

To insert a new line using SEU you should use the option I=Insert in the left side of the editor just before the line you want to start to write the new one. Once you typed the new lines you should compile the code. In order to do it you must first save it.

Type the function ‘save’ in the SEU command line in the top of the screen.

SEU==>   SAVE                                                                                          

Then, press F3=Exit and return.

This is now time to create the program. Use the following command:

CRTCLPGM PGM(STRUPLIB /QSTRUP) SRCFILE(STRUPLIB /QSTRUPIBM) USRPRF(*OWNER) REPLACE(*YES) TGTRLS(*CURRENT)                                                      

You should have a new program called QSTRUP in library STRUPLIB.

Edit the object authority by using the command QSYS/EDTOBJAUT OBJ(STRUPLIB/QSTRUP) OBJTYPE(*PGM).

And change the authority to be exactly the same as the original program is as it is shown further.

By default the authorization of this program in your system should be:

                            Edit Object Authority                         

                                                                          

Object . . . . . . . :   QSTRUP          Owner  . . . . . . . :   QSYS    

  Library  . . . . . :     QSYS          Primary group  . . . :   *NONE    

Object type  . . . . :   *PGM            ASP device . . . . . :   *SYSBAS 

                                                                          

Type changes to current authorities, press Enter.                         

                                                                           

  Object secured by authorization list  . . . . . . . . . . . .   *NONE   

                                                                          

                         Object                                            

User        Group       Authority                                         

*PUBLIC                 USER DEF                                          

QSYS                    *ALL                                              

We have reached the point to indicate to the system the QSTRUP program we want to use. 

This must be done by changing the system value CHGSYSVAL SYSVAL(QSTRUPPGM) VALUE('QSTRUP    STRUPLIB   ')

And now your system is prepared to start the subsystem T4NICELINK from the QSTRUP program in next IPL.


Still have questions? We can help. Submit a case to Technical Support.

Last Modified On: October 22, 2018