Logo: TUG TORONTO USERS GROUP for Midrange Systems
TUG
e Server magazine

November 1997: Volume 13, Number 2


Tips from Jackie

QINTER or QPGMR: Where am I?

By Jackie Jansen

t is often desirable to separate out different groups of interactive users into separate subsystems. Examples of this might include separating out the programmers or a specific group of users who have unique requirements. A very common problem is controlling to which subsystem the user is allocated.

An interactive subsystem has two groups of devices defined to it. Devices that the subsystem wants to directly allocate are specified AT(*SIGNON). Devices that the subsystem does not want to allocate at startup are coded AT(*ENTER). A signon screen is only displayed on a device that is allocated AT(*SIGNON). A device can only transfer (TFRJOB) into the subsystem where it is allocated AT(*ENTER). An excellent example of this is QCTL. The console is allocated AT(*SIGNON) and all other devices are specified AT(*ENTER). This means that the console is the only device that will ever receive a signon display from QCTL. Every other device will need to sign on to another interactive subsystem such as QINTER.

Once signed on, any interactive device can transfer into QCTL. If a device is specified as AT(*SIGNON) in only one subsystem description and at(*ENTER) for all other subsystems then there is no question about which subsystem will allocate the terminal and put up the signon display. The confusion arises when you have two different subsystems trying to allocate the same device. For example, assume that you want the programmers terminal DSP10 allocated to QPGMR. You would add a work station entry (ADDWSE) to QPGMR specifying device DSP10 AT(*SIGNON). The problem is that QINTER has an entry that specifies *ALL workstation types are allocated at *SIGNON. DSP10 also falls into the *ALL workstation type category. You now have two subsystems, QINTER and QPGMR, both trying to allocate DSP10. The easiest option at this point is to add a specific work station entry into QINTER that states DSP10 AT(*ENTER). With this technique even if QPGMR is inactive DSP10 can no longer sign on to QINTER. This may not be what you want.

You may have more than one subsystem trying to allocate a device. The first thing you need to know is that subsystems can only allocate devices that are powered on and varied on. If you are using a PC which is often powered off when the interactive subsystems are started then the following logic does not apply. When a subsystem is started it tries to allocate every device that it is entitled to, if that device is powered on but NOT signed on. In other words assume that QINTER has allocated devices DSP11 and DSP12 and put the sign on screen up. Next assume that a user comes along and signs on to DSP12. QPGMR is then started and also wants to allocate DSP11 and DSP12. Since DSP11 is powered on and no-one is actually signed on, QPGMR will take the allocation away from QINTER, remove QINTER's signon screen and replace it with the QPGMR signon display. QPGMR will also look for DSP12 but since there is already a user job running in QINTER (i.e. a user has signed on to DSP12) then QPGMR will not succeed in stealing the device. The end result will be one device allocated to QINTER and the other device allocated to QPGMR. If both workstations were powered off when QINTER and QPGMR were started then "unpredictable results may occur"! In other words you don't know which subsystem will win the allocation battle.

Earlier I said that specifying DSP10 in QINTER with AT(*ENTER) would override the allocation parameter for ALL workstation types. Within a single subsystem, named device entries take precedence over workstation type entries. Specific names take priority over generic or special names. Between subsystem descriptions it makes no difference if a device was originally allocated based on a named or a type entry. Regardless of why a device was originally chosen, if a subsystem wants to allocate it then it will try and we are back in the scenario that started this column! T < G


Jackie Jansen is an AS/400 Specialist and Consulting SE, providing national technical and marketing support for the AS/400 in Canada. Jackie frequently speaks at AS/400 Technical Conferences and User Group meetings.