Maint is a read-only built-in ispec attribute that is used for maintaining ispec records. It is only present in I/O usage ispecs with at least attribute defined as a key.
There are actually two Maint built-in ispec attributes that can be referred to in logic. These are:
A static, persistent public attribute (string of length 1) of the ispec. It is used to maintain the status of the ispec in the database. Valid values are "A", "C", and "D"; corresponding to "ADD", "CHG", and "DEL" respectively.
A non-static, non-persistent private attribute (string of length 3) of the ispec. It is used to enter an action for the ispec, from the user presentation. This is referred to in a presentation as UserMaint, and is the Maint value passed to the built-in framework methods. The following table lists valid values.
Maint Value | Shot Description |
---|---|
ADD | Adds a record to the database. This is the default Maint value. |
CHG | Alters an existing record. |
DEL | Logically deletes an existing record. |
PUR | Physically deletes an existing record. |
INQ | Retrieves a specified record (additional logic is required to recall it to the user interface). |
FIR | Recalls the first record in key order. |
LAS | Recalls the last record in key order. |
NEX | Recalls the next record in key order. If no key value is entered, the first record in key order is recalled. |
BAC | Recalls the previous record. |
REC | Recalls a specified record to the user interface. |
Use the Glb.Add, Glb.Chg, Glb.Del, Glb.Pur, and Glb.Inq built-in segment attributes, in preference over string literals such as "ADD", "CHG", "DEL", "PUR", or "INQ" to set the Maint built-in ispec attribute. These attributes might be translated.
Use the SetMaint built-in ispec method to translate and store in the database buffer the three-character Maint user presentation value as a one-character Maint database value.
Properties
Length = 3 in the user presentation, 1 in the database
Primitive = String