Iseries have a system value, QSTRUPPGM that points the sbs QCTL to a program that is used to start subsystems. IBM supplies a generic version of this and is should already be in place. Look at QSTRUPPGM, determine the program name and library, retrieve the source, and add additional sbs as needed. It will be a CLP and the programming should be very simple.
There is no command to start *ALL subsystems because you <i>never</i> want all subsystems to start nor <i>can</i> they all be started at once. There are subsystem descriptions in multiple libraries that have the same name. You can only run one subsystem of any given name at a time.
Run WRKOBJ *ALL/*ALL *SBSD to see a list of all subsystem descriptions on your entire system. (You will need *ALLOBJ authority.) Note that you have at least two, and possibly three or more, subsystem descriptions named QCTL and QBASE. Those are the two default subsystem descriptions that IBM supplies to act as your “controlling” subsystem.
There are multiple copies because different ones are used under different circumstances. You can’t be using QCTL out of QSYS, for example, during the times when you are running upgrades of your operating system. IBM creates extra copies in order to have one that can be used when new ones are being restored during upgrades.
Rather than starting “all” subsystems, you would run a program that executed STRSBS once for each subsystem that you want started.
Further, the <i>order</i> that you start your subsystems in can be important. An example of that would be two subsystems that both allocated the same workstation devices — the <i>last</i> subsystem to allocate a device is the one that holds the device (if the device is not already in use.) If the two subsystems were started concurrently, it would be mostly unpredictable which subsystem any device would end up in.
So, instead of starting *ALL, your program runs through a list that you create and maintain. The list can be in a file or it can simply be a sequence of STRSBS commands coded in the order that you choose. By default, this “list” is handled by your “startup program”.
IBM supplies a default startup program named QSTRUP in library QGPL. Usually, sites will use RTVCLSRC to retrieve the CL source from that program into a source file, and then they’ll make any changes to it that are appropriate for that site. The changed program is compiled with a new name, or at least into a different library.
Once the custom startup program exists, the QSTRUPPGM system value is changed to point to the new program. The original program can be left in QGPL or copied into another library. That allows you to change the QSTRUPPGM system value to point back to the IBM version in case yours needs more work.
Because your startup program has all of the STRSBS commands that you chose, you don’t need to start “all” subsystems. All you need to do is cause your startup program to run.
However, you <i>almost never</i> want to CALL the startup program. Instead, it is intended to be run automatically whenever you start your controlling subsystem.
So, under most circumstances, you simply run STRSBS QCTL and all of your other subsystems get started for you. (Some sites use QBASE as their controlling sibsystem, so they would run STRSBS QBASE. A few sites create their own controlling subsystem; they would run STRSBS for whatever they created.)
A primary reason that you don’t CALL your startup program is that it <i>should not</i> contain a STRSBS command for your controlling subsystem. If you previously did ENDSBS *ALL, your controlling subsystem is one of “all” subsystems that ended. When you CALL your startup program, your controlling subsystem isn’t one of the ones that your program would start. Your controlling subsystem is left in a kind of ‘ended’ status.
The trouble, then, is that you can’t quite predict everything that will happen if you try to start your controlling subsystem and it tries to run your startup program automatically again after it already ran once.
If that’s all too confusing or I skipped necessary details, don’t hesitate to ask for clarification. Lots of people can add pieces to this.