Have you ever wondered what happens in a subsystem? Find out about several of the most common subsystems and how to tailor a subsystem for specific uses.
All of us have things we like to tinker with. As a youngster, I ruined my uncles pocket watch while examining its many springs and gears. As I got older, my fascination turned to cars, and eventually, I became a pretty good, self-acclaimed Saturday afternoon mechanic. When I began working on the AS/400, that same love for tinkering continued: I want to understand just whats going on.
Understanding Begins Here
A subsystem is an AS/400 object that controls job queues, display stations, memory, how many jobs can run in that subsystem, and many other things. Throughout this article, I refer to the information you see when using the Work With Subsystem Description (WRKSBSD) command. To follow along, enter WRKSBSD SBS(QINTER) at a command line and press Enter. Then, select option 5. You should see the following subsystem attributes:
Operational attributes. This component tells what sign-on display file is being used. The default is QSYS/QDSIGNON. For those who want to know where to change a subsystems sign-on display file, it is here. It also tells how many jobs the subsystem can run simultaneously.
Pool definitions. Each subsystem needs memory to allocate to the jobs running in it. The pool definition tells the system which memory pool to grab memory from when the subsystem is active.
Autostart jobs. If you need to automatically start particular jobs when the subsystem is activated, you will see those jobs listed here.
Workstation name entries. You may want to allow only certain display stations to run in certain subsystems. With the Add Workstation Entry (ADDWSE) command, you can set up any workstation name to be allowed to run in this subsystem.
Workstation type. If you want to add certain types, such as ASCII workstations, add them through the ADDWSE command.
Job queue entries. This attribute specifies the name and library of the job queue attached to this subsystem.
Routing entries. This component tells the subsystem what to do with the jobs that pass through it.
Communications entries. If you work remotely with any device, you can add that communications device to the subsystem description by using the Add Communications Entry (ADDCMNE) command.
Prestart job entries. You start this type of job before any other type of job in the subsystem. You can initiate it with the Add Prestart Job Entry (ADDPJE) command.
Interactively Speaking
Now that you know the components of a subsystem, take a look at the subsystem IBM supplies for your interactive needs: QINTER. The interesting thing about QINTER is that you can assign specific workstation entries to it. Notice that there are two default entries, *ALL and *CONS. These reserved entries specify all workstation types, including the system console, that can be active in this subsystem. Basically, by starting subsystem QINTER, any user who is able to connect to your AS/400 will see a sign-on screen, although without a valid user profile and password, that user wont be able to log on.
Batch Me Up, Scotty
Now, lets explore the IBM-supplied default subsystem for batch work, QBATCH. When you submit a job by using the Submit Job (SBMJOB) command, it is submitted to a job queue. This job queue must be attached to an active subsystem for these jobs to actually begin running. If the subsystem is not active, the jobs wait until the subsystem that the job queue is assigned to becomes active. Some of the attributes you find when you view this subsystem description are Operational attributes, Pool definitions, Routing entries, and the thing that makes this subsystem unique, Job queue entries.
Take a look at the Job queue entries attribute. Three Job queue entries are listed: QBATCH, QS36EVOKE, and QTXTSRCH. Look closely, and youll notice that each entry has a Max Active value assigned to it. This value tells you the maximum number of jobs that can be active at the same time in this subsystem. Notice that the IBM-supplied and unmodified QBATCH allows only one job to be active, while the other two do not have a maximum number specified for them. The Max by Priority entries you see all contain asterisks. This means that multiple jobs can run at the Job Priority. (The Job Priority is specified on the JOBPTY parameter of the SBMJOB command.) Even though multiple jobs can be specified at any of these priorities, only one job can run at a time. Jobs submitted with a JOBPTY of 1 will run before jobs submitted with a JOBPTY of 5, for example. (See Figure 1 for a list of other subsystems youre likely to see and a short description of how each is used.)
Subsystems by Design
Now that you have a working understanding of subsystems, its time to take a look at how to customize them. In this example, you work with the interactive subsystem, QINTER.
In my shop, I dont normally start the QINTER subsystem when I IPL for a couple of reasons. First, I need to keep the work organized by department, so I set up departmental subsystems. I do this so that if I need to exclusively allocate a file or run a particular job without interference from certain users, I dont have to go to each user to request each one to sign-off. I can end that subsystem. Second, this approach allows me to target specific workstations to run only in specific subsystems. That way, no one can create a new display device without my knowing about it. This has the benefit of adding an extra layer of security.
To create the specific workstation entries needed, first copy the QINTER subsystem by using the following Create Duplicate Object (CRTDUPOBJ) command:
CRTDUPOBJ OBJ(QINTER) FROMLIB(QSYS) OBJTYPE(*SBSD) +
TOLIB(
Use this command so that anything you do here wont affect the IBM-supplied subsytem. (I place this new subsystem in a user library rather than in the system library QSYS.)
Because the new subsystem allows all workstations to attach themselves to it, you need to remove the attribute that controls this capability. To do so, use the Remove Workstation Entry (RMVWSE) command:
RMVWSE SBSD(
Before any changes can be made to the subsystem, it must be inactive. If you are changing a subsystem that is currently active, then use the End Subsystem (ENDSBS) command and allow it time to become inactive. The Add Workstation Entry (ADDWSE) command adds that new entry, which allows only a certain type of workstation entry (workstation name) to be attached to this subsystem:
ADDWSE SBSD(
Now, all the workstation devices that begin with the name SALES (for example, SALES01), automatically will attach themselves to this subsystem when you start the subsystem using the Start Subsystem (STRSBS) command.
Final Thoughts
Subsystems are to the AS/400 what your spine is to your body. Just like your spine is the framework that supports your entire body, subsystems are the framework that allows you to process all the jobs that run on your AS/400. To carry this analogy a bit further, keep in mind that when you are tinkering with your AS/400 subsystems, you want to give them the same consideration and care your chiropractor would while adjusting your spine: A little bit of fine-tuning at a time works wonders!
Reference
OS/400 Work Management (SC41-5306, CD-ROM QB3ALG01)
Subsystem Function
QBASE and QCTL Define which subsystem your AS/400 will start from and which contains the system console. The controlling subsystem is determined by what you place in the system value QCTLSBSD Controlling subsystem.
QCMN Handles communications-type jobs, such as Client Access and server jobs
QLPINSTALL Used when licensed programs are being installed
QPGMR Used for batch processing, it is similar to QBATCH
QSERVER Used for server functions for network connectivity
QSNADS Used to distribute network files, remote commands, and Distributed Database access between System Network Architecture (SNA)-connected networks
QSPL Used for spooled files
QSYSSBSD Used as a backup subsystem to QCTL, and can even have its own job queue
QSYSWRK Used to initiate system jobs such as
Performance Management/400, TCP/IP, and server jobs
QDSNX (Distributed Exchanges data between an AS/400 Systems Node eXchange) and one or more remote sites
QFNC Labeled as the finance subsystem, but can be used for another job queue
Figure 1:These are common IBM subsystems and their functions.
LATEST COMMENTS
MC Press Online