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


APL

GDDM V3R2 Base Application Programming Reference
SC33-0868-02



GDDM supports APL2. The APL2 Programming: System Services Reference manual, describes AP 126 (the GDDM Auxiliary Processor).

In "The GDDM calls" in topic 3.0, the APL code that corresponds to the name of a GDDM call is given within the description of the syntax for that call. Also, the APL codes with the call names are listed in numerical order in "APL request codes module" in topic 5.0.

The GDDM Auxiliary Processor, AP 126, manages requests from an APL program. To use it, follow this procedure:

  1. Offer to share a pair of variables with AP 126 to be used as control and data variables. The control variable name must begin with CTL, and the data variable name must begin with DAT. If names longer than three characters are used for these variables, the names must be identical after the third character and must be no longer than 11 characters.
    
    
  2. Check that the degree of coupling returned is two for each variable.
    
    
  3. If the call requires any character data, use an APL specification statement to assign the data to the data variable.
    
    
  4. Assign to the control variable the request code for the GDDM call to be issued, along with any required numeric parameters.
    
    
  5. Ensure that the request has completed successfully by referencing the control variable; 0 is returned as the first element of the control variable if the request was successful. The second and third elements are the severity level and error codes for the GDDM call. These will also be 0 if the request was successful. The fourth and fifth elements are the lengths of the numeric and character data returned, respectively. Any numeric data returned by the call is given after the fifth element. Any character data returned is given in the data variable.
    
    

For example, to share a pair of variables called CTL126 and DAT126 with AP 126, then issue the GSCOL call to select color 4:


   PICTURE 1         


If you are using APL2, Version 1 Release 3 or later, you can use the GDMX function. This function allows the name of the GDDM call to be used directly, rather than the numeric code that AP 126 requires. It performs all the necessary return code checking. Here is the same example using GDMX:


   PICTURE 2         


Note: GDDM is automatically initialized and terminated by APL2. No explicit FSINIT or FSTERM calls are needed to start and stop usage of GDDM by AP 126.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012