CDS557

Set View Field Maintenance Option

Last Revised: 02/25/14

This routine can be called to change a View Field Maintenance Option for the active View being processed by CDS550.  It is needed when you need to skip or not-skip a field when entering through all fields in the view.

It is preferred to call CDS557 to alter the View Field Maintenance Option as opposed to modifying the SMS_CDS550_MAINT global manually.  The primary advantage is using CDS557 is that it will continue to work if the sequence of fields in the view are changed, since you pass the field name to CDS557 and not the field number of the field in the view.

This change applies to the current record only and will be reset to default values for the next record processed.

Calling Format:

CALL "CDS557",FLDNAM$,VAL$

CDS557 Arguments
Argument Passed To/From Description
FLDNAM$  To Termplated field name excluding $ but including optional index indicator in format [IND].  Examples: CUSTNO, SALES, CODE[2].
VAL$ To Maintenance Option.  The value is typically taken from the View Properties, unless changed using CDS557.
OptionDescription
blankOperator will be prompted to make entry at this field
QData value will be displayed only, no entry made
SWhen S550.MAINT=2 indicating to make entry at each field in view, fields with a Maintenance Option of S will be skipped.
BSame as S, but the field is skipped only if non-blank or non-zero.
Error Messages Displayed
FLDNAM$ passed is not part of active view No message or error.  CDS557 quietly exits
CDS557: Missing Global Variable Name SMS_S550.GVN This variable is set by CDS550 so you might get this message if calling CDS557 when there is no view currently active, or if the global was deleted.
CDS557: Missing Global Variable Name SMS_CDS550_MAINT Same as above
CDS557: Length of SMS_CDS550_MAINT global is nn but should be yy. Some application changed the length of the global.
Example
IF CM040.NEW=0 THEN CALL "CDS557","ADDR2","S"