DB2 Server for VSE & VM: Operation


Using Multiple User Mode and Single User Mode

The DB2 Server for VSE & VM application server can run in one of two modes:

Usually the DB2 Server for VSE system runs alone in its own partition. Users can use the application server from their own partitions. The system provides for the communications between the DB2 Server for VSE partition and user partitions. This standard mode of operation is multiple user mode. For information on starting the application server in multiple user mode, refer to Starting the Application Server in a VSE Environment, and Starting the Application Server in a VM Environment.

Starting the Application Server in Multiple User Mode

VM users can access the application server from their own virtual machines. The DB2 Server for VM system provides for the communications between the application server and the application requester. The standard mode of operation is multiple user mode. In the VM/ESA system, remote users as well as local users can access the application server in multiple user mode.

When you enter the SQLSTART command and do not specify any parameters, the system is in multiple user mode.

Starting the Application Server in Single User Mode

For some applications, there is an advantage to running in single user mode. In VM, single user mode means that users can access the application server from their own virtual machines; in VSE it means that applications run in the same partition as the application server. The system handles the data requests for only that one application and other users and applications cannot access the application server.

In single user mode, VSE guests in a VM system cannot access a VM database, nor can they use the DRDA protocol.

To start the application server in single user mode, you must specify the initialization parameter SYSMODE=S. You must also specify the PROGNAME parameter. This parameter indicates to the application server the name of the application to run. The format for the parameter is PROGNAME=name where name is the name of the user program.

Note:DB2 Server for VM ignores the PROTOCOL parameter when running single user mode.

If your application is running in VSE and the program requires its own job control statements (such as TLBL or DLBL statements), you should include those statements in the job control to start the application server.

Figure 5. Job Control to Start the Application Server in Single User Mode on VSE

 
// JOB SINGLE
// EXEC PROC=ARIS71PL
// EXEC PROC=DBNAME01
// EXEC PGM=ARISQLDS,SIZE=AUTO,PARM='SYSMODE=S,PROGNAME=name'
/*
/&

In VM, when the application server is started, it branches to the program specified in the PROGNAME parameter without first giving CMS control.

If the program has any special requirements, such as CMS FILEDEFs, you must do them before invoking SQLSTART.
Note:If you do not specify single user mode, the application server defaults to multiple user mode.

Figure 6 shows the options for starting the application server in single user mode.

Figure 6. Starting the Application Server in Single User Mode on VM

SQLSTART DBNAME(server_name) PARM(SYSMODE=S,PROGNAME=name)

When the user program ends, the application server ends.

Specifying Parameters for User Programs

Some programs require input parameters similar to those that the application server requires. In multiple user mode, users run their own programs and they provide whatever parameters the programs require. In single user mode, you must specify the user parameters when starting the application server.

The following is an example of starting the application server to run program PATSCAN. To run program PATSCAN, you must specify the following parameters.



COPY,CONT,KEEP

The person who writes the program determines the required parameters and their format.

You specify the user parameters in PARM; they must follow the DB2 Server for VSE & VM parameters as shown. The slash (/) separates the DB2 Server for VSE & VM parameters from the user parameters.

You can specify, at most, 100 characters for the PARM parameter (including blanks and commas). If you specify many parameters, and user parameters as well, there might not be enough room on the EXEC statement or command. If there is not enough room, place all the DB2 Server for VSE parameters in a source member and just specify PARMID on the command line.
Note:You cannot put user parameters in a source member. In the above example, the DB2 Server for VSE parameter PROGNAME cannot be put in a source member because it is passing user parameters COPY, CONT, and KEEP to the program.

To start the application server to run the program in VSE, enter:



// JOB SINGLE
// EXEC PROC=IMAGE
// EXEC PROC=ARIS71PL
// EXEC ARISQLDS,SIZE=AUTO,PARM='SYSMODE=S,PROGNAME=PATSCAN/COPY,CONT,KEEP'
/*
/&

To start the application server to run the program in VM, enter:



SQLSTART DB(IMAGE) PARM(SYSMODE=S,PROGNAME=PATSCAN/COPY,CONT,KEEP)

If there is not enough room in the CMS input area, place all the DB2 Server for VM parameters, except for PROGNAME, in a parameter file and specify PARMID and PROGNAME on the command line. Remember, you cannot put user parameters in that file.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]