E@DBFLTUPDRNG

Name

E@DBFLTUPDRNG

Description

This API extends the functionality of the E@DBUPDRNG API by providing filter capabilities.

You can use E@DBFLTUPDRNG to restrict the records beyond the range keys set for E@DBUPDRNG. A return field indicates whether any rows were updated. Also, an error code is returned.

Location

This API is generated by the compiler.

Input Values

The same working storage value can be used as the update value for more than one field. This is equivalent to using a MOVE or ADD function with the same value on multiple fields.

Field Description
You must specify the database index name that you want to create a record in.
Record retrieval variables (also known as D@ and D# fields) Define the beginning and ending values of the last key by moving the appropriate values to the record retrieval fields named D@<KeyFieldName> and D#END#<KeyFieldName>.
E@DBBEGRNG Move a number into E@DBBEGRNG in order to tell the interface which key is the last significant one defining the range. This number is equivalent to the position of the field in the index.
E@UPDATECMD You must specify the update string that will be used in updating the records.

Return Values

Field Description
E@UPDATECOUNT The working storage field that returns 1 or 0 depending on whether any records were updated.

Using the API in a Program

Programming Example

EVAL      D@CMPNY        = DPYMCMPNY
EVAL      D@EMPLY        = DPYMEMPLY
EVAL      D@CHCKID       = DPYMCHCKID
EVAL      E@FLTSTRING    = *BLANKS
EVAL      E@FLTSTRING    = '(PRD-STATUS = ?)'
CALLP     U@FLTCREATE
EVAL      E@FLTVNUMERIC  = *ZEROS
CALLP     U@FLTSNUMERIC
EVAL      E@DBBEGRNG     = 3
EVAL      E@UPDATECMD    = 'STATUS = ''1'''
CALLP     DN@DBPRPRD1(E@DBFLTUPDRNG)

EVAL      D@EMPLY        = DPYMEMPLY
ENDIF