GDDM V3R2 Base Application Programming Guide
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


Coding a complete device definition on the DSOPEN call

GDDM V3R2 Base Application Programming Guide
SC33-0867-01



This is a typical call where nicknames are not used:


     DCL PROCOPT_LIST(10) FIXED BIN(31); /* Processing options list  */
     DCL NAME_LIST(1) CHAR(8);           /* Device-control name list */

PROCOPT_LIST(1)=28; /* Option code 28 specifies */ /* availability of User Control */ PROCOPT_LIST(2)=1; /* Option value 1 makes */ /* User Control available */

NAME_LIST(1)='062'; /* CMS device address */

/******************/ /* OPEN DEVICE 11 */ /******************/ /* DEVICE-ID FAMILY TOKEN PROCESSING-OPTIONS PHYSICAL-DEVICE*/ CALL DSOPEN(11, 1, 'L3472GM', 2,PROCOPT_LIST, 1,NAME_LIST);

This is the meaning of the seven parameters:

11
The device identifier. A number that you assign to the device, which you use for all subsequent references to that device in your program.

1
The output-family code, specifying the type of output.

The value 1 sends output to a device (display or printer) attached directly to the end user's virtual machine. Other permitted settings are:

2
Queued printing. Output to a print file, which can be printed using the GDDM Print Utility Program.
3
System printing. Output to a print file, which is passed to the subsystem's spooling program.
4
Advanced-function printing. Output to a print file, which is passed to a utility program for printing on advanced-function printers.

L3472GM
The device token, telling GDDM the properties of the device. The token L3472GM indicates that the device is a local 3472-G with a mouse attached. There are four sets of device tokens supplied with GDDM, called device definition tables. They are listed in the GDDM Base Application Programming Reference book.

A token parameter of * tells GDDM to discover the device's properties itself; usually by querying the device. This setting is recommended whenever possible. If you code an explicit device token, your program is dependent on that type of device.

2
The number of fullwords in the processing options list that is passed in the next (the fifth) parameter.

PROCOPT_LIST
The name of an array containing the processing options list. This list may contain one or more option groups, each requesting a particular processing option. Some of these options depend on the output family, others are valid only on a particular subsystem.

This example contains just one option group, a User Control option group. The first fullword in a group identifies the option type. Here 28 indicates "User-Control group." The remaining fullwords give the setting of the option. For this option type there is just one fullword following. It is set to 1 to request that User Control be enabled for the newly-opened device.

You can place several option groups in the processing options list, each with an option code in its first word. A list of the possible option groups is provided in the GDDM Base Application Programming Reference book.

1
The number of 8-byte names in the seventh and last parameter.

NAME_LIST
An array of 8-byte names, identifying the physical device to be opened. The naming scheme used in the name list depends on the output family and the subsystem being used.

In most cases the name list can have only one element in it. The exceptions are:

  1. Family-4 output under TSO.
    
    
  2. Family-2, -3, and -4 output under CMS, in which case second and third elements can be used to specify a filetype and a filemode.
    
    
  3. Auxiliary devices (usually plotters) for family-1 output under any subsystem. These have two-part names; the first part is the name of the family-1 terminal to which they are attached, the second part is the name of the auxiliary device itself.
    
    

The naming conventions for each subsystem and output family are described in the GDDM Base Application Programming Reference book.

In this example (on CMS), the single name in the name list has been set to "062." This name is known to the subsystem. It is the virtual address of the device in question. On IMS the single name may be set to an "LTERM name." On all the other subsystems (CICS, and TSO), you cannot open any display device other than the user's console. This restriction does not apply to printers.

On all subsystems the device name may be allowed to default to the user console. There are two ways of specifying this action. You may omit the name list (by giving a length of 0), or you may set the name to *. A further possibility is to request a dummy device. (See "Opening and using a dummy device" in topic 18.5.2.)

In the example, the call to DSOPEN makes known to GDDM a device with a subsystem name of 062 to be used for family-1 output. The DSOPEN call tells GDDM that the device is a local 3472-G graphics terminal with a mouse attached, and it assigns an identifier of 11 to the device for future reference in the program. It requests that the device be opened in a mode that accepts no input from the end user and processes only the program's output.

More examples using the DSOPEN call can be found in "Sending output from an application to a printer" in topic 20.0 and "Sending output from an application to a plotter" in topic 21.0. For a detailed description of the parameters of DSOPEN, refer to the GDDM Base Application Programming Reference book.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012