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


Write, rewrite, and reject

GDDM V3R2 Base Application Programming Guide
SC33-0867-01



The MSPUT call updates the alphanumeric fields contained in a mapped field. In the simple case of an ADS without selector adjuncts, this means it moves the data from the ADS into the variable data fields.

When the ADS contains selector adjuncts, what happens depends on two things: the codes in the adjuncts, and the type of MSPUT operation.

There are three types of MSPUT operation. They are called write, rewrite, and reject. The operation is specified by the second parameter of the MSPUT. A 0 means write, 1 rewrite, and 2 reject.

In a write operation, MSPUT:

  1. Sets all variable data fields to their initial values. If you specified no initial data for a field when you created the map, it is set to blanks: blanks are the default initial data.
    
    
  2. Inspects the selector adjunct of each field, and makes changes according to its value:
    
    
    blank
    No further change to the field.
    
    
    1
    Update the field with variable data from the ADS.
    
    
    2
    Update the field with default data from the map (or with blanks if you specified no default data). For a write operation, a 2 has the same effect as a " ", as the field already has default data in it.
    
    
    3
    Means the same as a 1 character.
    
    

In a rewrite operation, MSPUT does the same as in a write, except that it omits the first step. The fields are not set to their defaults before the selector adjuncts are processed. In a rewrite, a 2 character is not the same as " ", because the field does not necessarily contain default data.

In a reject operation, MSPUT does the same as in a rewrite. The difference between rewrite and reject becomes apparent only on input. It is explained in "Effect of reject operation" in topic 16.3.1.

The differing applications of a write operation, compared with a rewrite (or reject), can be summarized as follows. You should use a write when you create a new display from scratch. You should use a rewrite (or reject) when you update some of the fields of an existing display; you indicate which fields are to be updated by setting their selector adjunct to a 1 or 2 character.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012