The Start-Up Program
The system runs a start-up program each time you IPL it. Although this program can be written in any language and can perform any task you want, in practice, the program is written in Control Language (CL) because CL has commands for operational activities such as starting subsystems, starting spool writers, and starting server jobs.
Marking a Program as the Start-Up Program
System value QSTRUPPGM contains the qualified name of the start-up program. (A qualified name consists of an object name and the name of the library that contains the object.) You can display the
of the start-up program using the Display System Value (DSPSYSVAL) command, as
If you change this system value, the system will execute a different program during IPL. For example, if you create a program called IPLPGM in library mylib, and you want to make it the start-up program, change system value QSTRUPPGM so that it contains the name of the new program:
CHGSYSVAL SYSVAL(QSTRUPPGM) VALUE('IPLPGM MYLIB')
Note that there is no slash (/) between the program and library name, and that the name of the program comes first. System values that accept qualified
usually require this syntax. You must make sure that the first 10
are the name of the program and that the
10 characters (or less) are the name of the library
It is easier to make these changes using the Work with System Values (WRKSYSVAL) command. The WRKSYSVAL command shows a list of all system values (or of those system values that belong to a certain type) and lets you select option 2 to change a system value or option 5 to display it. For example, use WRKSYSVAL to change system value QSTRUPPGM:
the panel shown in Figure 2.1.
Working with System Values (WRKSYSVAL) command.
When you select option 2 and press
, the system prompts you for the new value in a much friendlier manner than CHGSYSVAL could offer. The results are shown in Figure 2.2.
Changing the startup program system value.
Now, all you need to do is type over the current values and press
Changing IBM's Start-Up Program
If you do not want to write a new start-up program from scratch, you can just copy the source code of IBM's start-up program, make
modifications, and give it a different name.
To change IBM's start-up program, perform the following steps:
Decide in which library you will place the new program. The program can be placed in any library, but don't place it in any IBM-supplied library (those beginning with the letter Q), because you may lose the program the next time you upgrade to a new release. Choose one of your own libraries. Use a library that you use for normal "housekeeping"
, one that will never be deleted or cleared.
Determine a name for your start-up program. If inspiration fails you, use the name START_UP. The
character is valid.
Create source physical file QCLSRC in the library you chose in Step 1, or use a source physical file that already exists in the library. To create the source physical file, use the Create Source Physical File (CRTSRCPF) command. In the following command, replace
with the name of the library in which you wish to store your start-up program.
CRTSRCPF FILE(xxx/QCLSRC) TEXT('CL Source')
Run the DSPSYSVAL command to find out the name of IBM's start-up program and record it on a piece of paper:
Retrieve the source code of IBM's start-up program. Place it into the appropriate source physical file of your library. In the following command, replace the words
with the values of IBM's start-up program, which were displayed in the previous step. Replace
with the source physical file in which you will store the source code. Replace
with the name you choose for your startup program.
RTVCLSRC PGM(xxx/program) SRCFILE(zzz/file)
Edit the source with Source Entry Utility (SEU) by running the Start SEU (STRSEU) command. Make any necessary changes:
STRSEU SRCFILE(zzz/file) SRCMBR(new_program_name)
Compile your program using the Create CL Program (CRTCLPGM) command:
CRTCLPGM PGM(zzz/new_program_name) +SRCFILE(zzz/file)
Change system value QSTRUPPGM. Mention the name of your program. Use either the CHGSYSVAL or the WRKSYSVAL command as explained above.