Add Commands to iSeries Startup Program without modifying the same.

This tip explains the easiest way to add Commands to iSeries Startup Program without modifying the same.

This tip explains the easiest way to add Commands to iSeries Startup Program without modifying the same.

Many times, we may need to start the specific environment Or call the iSeries Program whenever we perform IPL for the iSeries System. For example, starting a user defined Subsystem or Calling a specific Program.

Generally we retrieve the CL source code of QSYS/QSTRUP program and modify the CL source code by adding the commands to Start the Subsystem or call the CL program at appropriate location.

Instead, the best way is to write a separate CL program, which first calls the QSYS/QSTRUP program and then specify the commands to start the user defined Subsystem or Call commands.

This tip I learned from my ex-Boss Mr. Shlomo Vanunu.


  For Example:

You want to start the Subsystem called SALESSBSD every time whenever you perform IPL. Perform the steps below to automate the procedure.

1) Write and compile the CL program with the code provided below and place MYSTRUPPGM under library QGPL.

*************** Beginning of data ************************************* 

0001.00  PGM                                                                    
0002.00              QSYS/CALL  PGM(QSYS/QSTRUP)                                
0003.00              QSYS/STRSBS SBSD(MYLIB/SALESSBSD)                           
0004.00              QSYS/CALL  PGM(MYLIB/CLEARSALES)                           
0005.00  ENDPGM                                                                 
0006.00                                                                         
        ****************** End of data *******************************

2) From the OS/400 command line, Change the OS/400 System Value QSTRUPPGM as shown below:

==> WRKSYSVAL QSTRUPPGM
Use Option 2 (Change) and specify the Startup program as MYSTRUPPGM and Library as QGPL.

3) Now whenever you perform the IPL of the iSeries System, first the IBM Supplied startup program (QSYS/QSTRUP) will be executed and then it will start  Subsystem SALESSBS and call the CLEARSALES Program. 
This was first published in February 2002

Dig deeper on Integrated File System (IFS)

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close