S Code

Substituting Data. Substitutes for the contents of an attribute either the data in another attribute or a specified character string.

Format

S ; attr ; 'string'

Parameter(s)

attr

Attribute number of the attribute whose data is to replace the stored data (if any exists).

string

Character string that is to replace a zero.

Description

The attribute whose data is to be replaced is the one referenced by the attribute number in line 2 of the Attribute Definition item containing the S code.

To retain the original value of the referenced attribute (the attribute specified on line 2), use an asterisk (*) in place of the attr parameter.

For example, the Attribute Definition item for Attribute 6, PAYMENT, in the OVERDUE.ORDERS file contains the correlative:

S ; 3 ; 'NONE'

This correlative specifies that if the value in Attribute 6 is zero, the string NONE is substituted. If the value in Attribute 6 is not zero, then the data in Attribute 3, CHECK-AMOUNT, is substituted.

The S correlative thus makes it possible to bypass the original (out-of-date) data in the PAYMENT attribute.

See Also

Deriving Data from Attributes

B Code

C Code

Extracting Data

Testing Data

Manipulating Existing Data