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


Parameter syntax in ERXPROTO

GDDM V3R2 Base Application Programming Reference
SC33-0868-02



ERXPROTO produces output as a string consisting of the callname and the types of parameters in this form:

'callname type type .....'

Examples of the form that the type parameter may take are:

cntx
Counts used as array dimensions. The number x is the position of the parameter within the string. For example, cnt2 is the second parameter in the string.

lenx
Lengths of character strings. The number x is the position of the parameter within the string. For example, char3 is the third parameter in the string.

float
Floating point parameter.

.float
The dot that precedes it means that this floating point parameter is returned by GDDM.

intg
Integer parameter.

intg.cnt1.cnt2
An integer array of dimensions given by the cnt1 and cnt2 parameters - see below for rules to deduce dimensions and sizes.

float.x
A floating point array of constant dimension x.

char.lenx
Character string parameter of length given by the lenx parameter.

char.x
Character string parameter of constant length x.

For some examples of output of the ERXPROTO program, see below.

Here is a set of rules that let you produce valid calls from the ERXPROTO syntax.

  1. Look for cnt values that are array dimensions, and calculate the values you will need for them.
    
    
    
             /* two sets so two dimensions     */
             /* in example cnt1=2,cnt2=3       */
             'CHBAR cnt1 cnt2 float.cnt1.cnt2'
             /* none .len3 is a length         */
             'GSCHAR float float len3 char.len3'
             'ASREAD .intg .intg .intg'  /* none */
    

    For a by-name array you would enter values array.1.1=10 to array.2.3=60 (using the values you needed) and use the parameter .array. (with a closing dot).

  2. Look for any array parameters and work out the correct dimensions. Array parameters are followed by .cntx, for example float.cnt1. There is one dimension for each following .cntx. That means one set of brackets for each following dot if you are listing the array elements in the call.
    
    
    
             /* cnt1 and cnt2, two dimensions  */
             /* three (cnt2) elements in each  */
             /* inner parenthesis, two (cnt1)  */
             /* sets of inner parentheses. Two */
             /* levels of nested parentheses,  */
             /* one for each count             */
             'CHBAR  2  3  ((n n n) (n n n))'
             /* no arrays no action            */
             'GSCHAR float float len3 char.len3'
             'ASREAD .intg  .intg  .intg'  /* none */
    

  3. Look for the character strings and fill in the length values.
    
    
    
             /* Characters are ABCD so length is four */
             'GSCHAR float float 4  "ABCD"'
    

  4. Fill in the float or integer values or variable names. These are integers where the parameter says intg, any form of number where it says float, and character strings where it says char.
    
    
    
             /* put in array values            */
             'CHBAR 2  3 ((3 4 5) (5 6 7)) '
             /* fill in values                 */
             'GSCHAR 10.5  50    4  "ABCD"'
             /* fill in all values             */
             'ASREAD .type  .val   .count'
    

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012