Maintaining Your Own Subsystems


i5/OS lets you create and maintain your own subsystems. For example, you can create duplicates of QINTER (call them INTER1, INTER2, and so on), so that you can subdivide interactive work in groups. For example, you could assign INTER1 to the Accounting department, INTER2 to the Production Control department, and so on.

This subdivision has one big benefit: You can quickly control which departments can use the system by ending all interactive subsystems except the one you want to allow. You also can fine tune each subsystem for better performance. For example, if the Production Control department usually performs more interactive activity than Accounting, you can give more memory resources to the Production Control subsystem to accommodate its heavier workload.

If you don't want to bother with the chore of allocating memory resources among the many interactive subsystems you create, you can assign them all a shared memory pool. Doing this gives you the best of both worlds: It lets you subdivide display stations into subsystems, and you don't have to worry about memory allocations or fine tuning the subsystems.

Programmers are another group of people who deserve a subsystem of their own. The IBM-supplied subsystem, QPGMR, can be used for batch jobs, such as compiles. Subsystem QPGMR is not started automatically at IPL because the start-up program supplied by IBM has no specific instruction to start QPGMR. You need to change IBM's program (or create your own) to start QPGMR at each IPL. Changing the start-up program is described in Chapter 2 and later in this chapter.

Creating a Subsystem

You can create a subsystem in two ways. You can run the Create Subsystem Description (CRTSBSD) command, or create a copy of an existing subsystem that more or less fits the bill.

The CRTSBSD command is simple to use, but subsystems are more than just a subsystem description. Subsystems also contain job queue entries, workstation entries, routing entries, and settings (such as memory pools) that you must get right. In most cases, you will want to create a subsystem that resembles an existing one because you will put the new subsystem to a similar use. For example, you can create a duplicate of QINTER to assign the new subsystem to interactive work for a certain group of users. Because QINTER already contains everything an interactive subsystem needs to work well, duplicating it is easier than creating a new subsystem from scratch. To copy QINTER, run the following command:

      CRTDUPOBJ OBJ(QINTER) FROMLIB(QSYS) OBJTYPE(*SBSD) +      TOLIB(MYLIB) NEWOBJ(DUPQINTER) 

The Create Duplicate Object (CRTDUPOBJ) command makes a replica of QINTER, gives it the name DUPQINTER, and places it in library MYLIB. Now that you have the new subsystem, you can adjust it as necessary using the Change Subsystem Description (CHGSBD) command. If you need to delete DUPQINTER at a later date, run the Delete Subsystem Description (DLTSBSD) command.

You also could create a duplicate of QBATCH, to have a separate batch subsystem in which you could run jobs from another division of your company.

Workstation Entries

Interactive subsystems (like QINTER) need workstation entries to determine what display stations are to work in each subsystem. Suppose you have a subsystem named ACGQINTER for your Accounting department. You want all display stations in the Accounting department to work in ACGQINTER and nowhere else.

Suppose the Accounting display stations are named DSP37, DSP42, and DSP68. ACGQINTER must have three workstation entries, which you can add to the subsystem using the Add Workstation Entry (ADDWSE) command, as follows:

      ADDWSE SBSD(ACGQINTER) WRKSTN(DSP37) AT(*SIGNON)      ADDWSE SBSD(ACGQINTER) WRKSTN(DSP42) AT(*SIGNON)      ADDWSE SBSD(ACGQINTER) WRKSTN(DSP68) AT(*SIGNON) 

AT(*SIGNON) indicates that subsystem ACGQINTER must acquire the display station at sign-on. As soon as you power on any of these display stations, they will be working in ACGQINTER already.

If you adopt the convention that workstation names begin with common characters, you can use generic workstation entries. Using generic entries reduces the number of commands you must enter. The following command allows QINTER to acquire any device whose name begins with the letters DSP.

      ADDWSE SBSD(QINTER) WRKSTN(DSP*) AT(*SIGNON) 

If you created ACGQINTER by duplicating QINTER, you still have a workstation entry you must get rid of: WRKSTNTYPE(*ALL) AT(*SIGNON). Because QINTER has the same workstation entry, the two subsystems will compete to grab workstations at sign-on. To remove the workstation entry, type:

      RMVWSE SBSD(ACGQINTER) WRKSTNTYPE(*ALL) 

However, subsystem QINTER still has the workstation entry with WRKSTNTYPE (*ALL) AT(*SIGNON), which means that the Accounting display stations might go to QINTER instead of ACGQINTER. To solve this problem, you must add three workstation entries to QINTER:

      ADDWSE SBSD(QINTER) WRKSTN(DSP37) AT(*ENTER)      ADDWSE SBSD(QINTER) WRKSTN(DSP42) AT(*ENTER)      ADDWSE SBSD(QINTER) WRKSTN(DSP68) AT(*ENTER) 

AT(*ENTER) means that subsystem QINTER will not attempt to attach these display stations unless the user who signs on to them (in ACGQINTER) runs the Transfer Job (TFRJOB) command and presses the Enter key. The TFRJOB command can be used to transfer a job from one subsystem to another.

Job Queue Entries

Just as workstation entries exist to identify the workstations that work with the subsystem, job queue entries also exist. A job queue can receive job requests from various sources. For example, when a user runs the Submit Job (SBMJOB) command, the system sends a request to a job queue. These jobs accumulate in the job queue and await their turns to run. Jobs that are sent to a job queue that is not attached to a subsystem will not execute.

A job queue can be attached to only one subsystem, but a subsystem can have any number of job queues attached to it. This attachment is performed by the Add Job Queue Entry (ADDJOBQE) command. You can also change job queue entries using the CHGJOBQE command, or remove them using the RMVJOBQE command. When you run RMVJOBQE, the job queue is no longer attached to the subsystem.

Changing the Start-Up Program

Subsystems must be started in order to perform any kind of work. When you IPL the system, only the controlling subsystem is brought up. This controlling subsystem can be either QBASE or QCTL, depending on system value QCTLSBSD. Actually, the subsystem can be any subsystem at all, even one you create.

At IPL, the system runs the start-up program named in system value QSTRUPPGM. This program starts printer writers and subsystems. Unless you change the start-up program to include a new Start Subsystem (STRSBS) command, the subsystems you have created will not start.

The following program starts four subsystems:

      PGM      STRSBS SBSD(QINTER)      MONMSG MSGID(CPF0000)      STRSBS SBSD(QBATCH)      MONMSG MSGID(CPF0000)      STRSBS SBSD(QCMN)      MONMSG MSGID(CPF0000)      STRSBS SBSD(QPGMR)      MONMSG MSGID(CPF0000)      ENDPGM 

For more information about the start-up program, refer to Chapter 2.



IBM i5/iSeries Primer(c) Concepts and Techniques for Programmers, Administrators, and Sys[... ]ators
IBM i5/iSeries Primer(c) Concepts and Techniques for Programmers, Administrators, and Sys[... ]ators
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 245

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net