Note: Built-In Function Rules Usage Options
Deletes standard DICTIONARY or FILE level validation checks from a nominated field for subsequent replacement by PUT_XXXXXXX validation check Built-In Functions.
When deleting FILE level validation checks from a field, the file involved must have been previously placed into an edit session by the START_FILE_EDIT Built-In Function.
Normal authority and task tracking rules apply to the use of this Built-In Function.
This is a Specialized Built-In Function for use in a Development Environment only.
Arguments
|
* The deletion control sequence number and description are related by an "AND" relationship. So if you pass values of 500 and IEW, only checks that have a sequence number greater than or equal to 500 and a description that starts with IEW will be deleted.
Return Values
|
Example
A user wants to delete validation checks for a specific field, without going through the LANSA options provided on the Field Control Menu that enables the user to delete validation checks.
********* Define arguments and lists
DEFINE FIELD(#LEVEL) TYPE(*CHAR) LENGTH(1) LABEL('Level')
DEFINE FIELD(#FIELD) TYPE(*CHAR) LENGTH(10) LABEL('Field')
DEFINE FIELD(#SEQNUM) TYPE(*DEC) LENGTH(3) DECIMALS(0)
LABEL('Sequence #')
DEFINE FIELD(#DESCR) TYPE(*CHAR) LENGTH(30) LABEL('Description')
DEFINE FIELD(#RETCOD) TYPE(*CHAR) LENGTH(2) LABEL('Return code')
GROUP_BY NAME(#VALCHK) FIELDS((#LEVEL) (#FIELD) (#SEQNUM) (#DESCR))
********* Request Validation check details
BEGIN_LOOP
REQUEST FIELDS(#VALCHK)
********* Execute built-in-function - DELETE_CHECKS
USE BUILTIN(DELETE_CHECKS) WITH_ARGS(#LEVEL #FIELD #SEQNUM
#DESCR) TO_GET(#RETCOD)
********* Deletion of validation checks was successful
IF COND('#RETCOD *EQ ''OK''')
MESSAGE MSGTXT('Deletion of validation check(s) was successful')
********* Deletion of validation checks failed
ELSE
IF COND('#RETCOD *EQ ''ER''')
MESSAGE MSGTXT('Deletion of validation check(s) failed')
********* No records found eligible for deletion
ELSE
IF COND('#RETCOD *EQ ''NR''')
MESSAGE MSGTXT('No Records found eligible for deletion')
ENDIF
ENDIF
ENDIF
END_LOOP