# S Conversion

Updated: 10/14/2021, 2:20:00 PM
Created: 10/14/2021, 2:20:00 PM
Last Updated By: mikes
Read Time: 1 minute(s)

# Description

The S code substitutes one value for another. It is as:

S;Var1;Var2
1

where:

  • Var1 specifies the value to be substituted if the referenced value is not null or zero. Can be a quoted string, an FMC (field number), or an asterisk. An asterisk indicates that the value of the referenced field should be used.
  • Var2 specifies the value to be substituted if the referenced value is null or zero. Can be a quoted string, an FMC (field number), or an asterisk.

# Example 1

S;*;"NULL VALUE!"
1

If the referenced field is null, this example will return the string "NULL VALUE!". Otherwise it will return the referenced value.

# Example 2

S;*;3
1

If the referenced field is null, this example will return the content of field 3 of the data record. Otherwise it will return the referenced value.

# Example 3

S;4;5
1

If the referenced field is null, this example will return the content of field 5 of the data record. Otherwise it will return the content of field 4.

Back to Conversion Processing