ONSOURCE pseudovariable

The ONSOURCE pseudovariable sets the current value of the ONSOURCE built-in function. The element value assigned to the pseudovariable is converted to a character string and, if necessary, is padded on the right with blanks or truncated to match the length of the field that raised the CONVERSION condition. The string is used when the conversion is attempted again.
Read syntax diagramSkip visual syntax diagram
>>-ONSOURCE-+----+---------------------------------------------><
            '-()-'   

When conversion is retried, the string assigned to the pseudovariable is processed as a single data item. For this reason, the error correction process must not assign a string containing more than one data item when the conversion occurs during the execution of a GET LIST or GET DATA statement. The presence of blanks or commas in the string could raise CONVERSION again.

The pseudovariable must not be used out of context.

If ONSOURCE is not a binary constant, then the ONSOURCE pseudovariable must not set it to one. For example, if ONSOURCE() is ’ERR’, you must must not set ONSOURCE() to ’0’B.






Published: 23 December 2018