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                                                                 
        ****************** End of data *******************************

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

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

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

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:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.