Workstation versus user based routing

After you have determined which program controls the routing step, you must determine if routing is to be based on the workstation from which the job was started, or on the user (user profile) who signed on.

Routing based on the workstation is accomplished using the routing data specified in the job description associated with the workstation entry or profile for the device. Routing based on a user can be done using the initial program specified in the user profile or the job description in the user profile mapping to a routing entry other than QCMD.

Initial program uses

Initial programs may interact with workstations to get input values from a workstation user. When an initial program is called, it cannot receive parameter values. An initial program can be used in one of two ways:
  • To establish an initial environment for the user entering commands. For example, the library list can be changed or print files and message files can be overridden. When an initial program completes its function and returns to QSYS/QCMD, the initial menu is displayed.
  • As the controlling program for the job. If the initial program does not return to QSYS/QCMD, it becomes the controlling program for the routing step. The initial menu is not displayed. The user can only request those functions available through the initial program.

    For example, a menu can be displayed with specific application options. The user can only perform the functions on the menu. One example of such an option is sign off. If the SIGNOFF command is run, the job ends and the system Main Menu is never displayed. If you use this approach, consider using the user profile option INLMNU to ensure that no menu is displayed.

An initial program can be written so that when a return is issued, it either does or does not return to QSYS/QCMD. If the initial program returns to QSYS/QCMD, the initial menu is displayed.
Related concepts
How an interactive job starts
Disconnect interactive jobs
I/O error for job requester device
Interactive jobs and routing steps
Programs that control the routing step
When jobs end at the same time