IFDELF (HLI function)

From m204wiki
Jump to navigation Jump to search

The conventions used on this page are described in Function call notation conventions.

Summary

Description
The IFDELF call (DELETE FIELD) deletes a Model 204 field definition and all occurrences of data for that field. IFDELF requires Model 204 file manager privileges.
Thread type
multiple cursor IFSTRT, single cursor IFSTRT
IFCALL function number
62

Syntax

IFDELF(RETCODE,FIELD_NAME,FILE_SPEC)

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. Specify a character string variable.
FILE_SPEC [I,s,o] The file specification is an optional input parameter for use only with a multiple cursor IFSTRT thread for specifying the name of the Model 204 file containing the field that is to be deleted. Specify the name of the file as a short character string using the following format:

IN [FILE] filename

The specified file must be open on the thread, otherwise the call is unsuccessful and Model 204 returns a completion code of 4.

Usage notes

The IFDELF call is valid on all types of IFSTRT threads. Use the IFDELF call to delete field definitions except for the following types of fields:

  • Record security is defined using the field
  • The field is defined as a sort key
  • The field is used as a hash key

Note: The file context can change on a multiple cursor thread and, if the file specification parameter (FILE_SPEC) is omitted, IFDELF deletes the field definition for the default file on the thread (that is, the last file opened).

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

The IFDELF call requires Model 204 file manager privileges. Additional privileges are required for the following security conditions:

Type of security Required privileges
File defined with record security Record security override
Security level field definition Field level security (FLS) allows update access

For more information about Model 204 field security, see Field-level security.

Coding example (COBOL)

WORKING-STORAGE SECTION. 01 CALL-ARGS. 05 RETCODE PIC 9(5) COMP SYNC. 05 STATUS PIC X(7) VALUE "STATUS;". . . . PROCEDURE DIVISION. . . . CALL "IFDELF" USING RETCODE, STATUS.