IFDVAL (HLI function)

From m204wiki
Revision as of 21:55, 6 July 2016 by ELowell (talk | contribs) (Created page with " ==Summary== <dl> <dt>Description</dt> <dd>The IFDVAL call (DELETE VALUE) deletes from the current record the first occurrence of a Model 204 field that matches the specified...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Summary

Description
The IFDVAL call (DELETE VALUE) deletes from the current record the first occurrence of a Model 204 field that matches the specified name=value pair.
Thread type
multiple cursor IFSTRT, single cursor IFSTRT
IFCALL function number
32

Syntax

IFDVAL(RETCODE,FIELD_NAME,VALUE,CURSOR_NAME)

Compile-only form
Not available
Execute-only form
Not available

Specify the parameters in the syntax order shown above.

Parameter Description
RETCODE [O,i,r] The Model 204 return code is the required first parameter. The code is a binary integer value.
FIELD_NAME [I,c,r] The field name is a required input parameter that specifies the name of the Model 204 field to be deleted. You can specify only one field to be deleted per call. Specify a character string variable followed by a semicolon (;).
VALUE [I,c,r] The value is a required input parameter that specifies the field value corresponding to the specified field name. Taken together, the field name and value form a pair for matching against the record. You can specify only one value for the field. Specify a character string variable followed by a semicolon (;).
CURSOR_NAME [I,s,r] The name of the cursor is an input parameter that is available only for use with a multiple cursor IFSTRT thread and is required for specifying the record to be deleted. Specify the cursor name as a short character string, using the name previously assigned to the cursor in a corresponding IFOCUR call. See CURSOR_NAME for a description of the cursor name for the IFOCUR call.

Note: The cursor name is not a valid parameter for use with a single cursor IFSTRT thread.

Usage notes

Use the IFDVAL call to delete a Model 204 field that has been defined as having an INVISIBLE or VISIBLE attribute. Note the following rules:

  • If a VISIBLE field is multiply occurring and the same field name = value pair occurs more than once, IFDVAL deletes only the first occurrence of the identical pairs.
  • Use IFDVAL to delete any INVISIBLE fields for a record before using the IFDREC call to delete the record. This allows record numbers to be reused in the current file. For information about reusing record numbers, see Reuse Record Number.

Note: You cannot use IFDVAL on a sorted record set.

The IFDVAL call is valid on all types of IFSTRT threads. On a multiple cursor IFSTRT thread, you must specify the cursor name for the record that is to be deleted. On a single cursor IFSTRT thread, IFDVAL deletes a field from the current record using the current record set.

When FOPT=X'10' and the date/time stamp feature is installed, the IFDVAL function is not supported for DTS files.

Coding example (PL/1)

The following PL/1 call deletes from the current record the field name = value pair COLOR = BLUE.

. . . CALL IFDVAL (RETCODE, 'COLOR;','BLUE;');