IFFWOL (HLI function)

From m204wiki
Revision as of 22:07, 11 July 2016 by ELowell (talk | contribs)
Jump to navigation Jump to search

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

Summary

Description
The IFFWOL call (FIND WITHOUT LOCKS) selects records from a Model 204 file or group without obtaining record locks and creates a found set.
Thread type
multiple cursor IFSTRT, single cursor IFSTRT
IFCALL function number
87

Syntax

IFFWOL|IFFWO(RETCODE,FIND_SPEC,FWOL_NAME,%VARBUF,%VARSPEC)

Compile-only form
IFCALL function number: 88

IFFWOLC|IFFWOC(RETCODE,FIND_SPEC,FWOL_NAME)

Execute-only form
IFCALL function number: 89

IFFWOLE|IFFWOE(RETCODE,FWOL_NAME,%VARBUF,%VARSPEC)

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.
FIND_SPEC [I,c,r] The find specification is a required input parameter that is the selection criteria to be used for retrieving records. Specify the selection criteria as a character string.

See FIND_SPEC for a detailed description of the find specification used for IFFIND that is also valid for IFFWOL.

FWOL_NAME [I,s,r/o] The name of the IFFWOL compilation is an input parameter that is required for use with a multiple cursor IFSTRT thread. It is only required for a single cursor IFSTRT thread if using the Compiled IFAM facility (IFFWOLC and IFFWOLE). Model 204 saves the compilation using this name.

Specify the name as unique and as a short character string (maximum 32 characters).

  • On a single cursor IFSTRT thread, any characters except the following are valid in the name: blank, comma, parenthesis, equal sign, or semicolon.
  • On a multiple cursor IFSTRT thread, the first character in the name must be alphanumeric, and the name must begin with a letter (A-Z or a-z) which may be followed by a letter, a digit (0-9), a period (.), or underscore (_).

Note: A null value is equivalent to omitting the name parameter and is not valid for a multiple cursor thread.

%VARBUF [I,c,o] The variable buffer is an optional input parameter that addresses a data area, which accommodates up to 255 bytes of data per value. The buffer contains values that are defined by the %VARSPEC parameter, below, to be assigned to %variables. Specify a character string. For information about %variables, see Using variables and values in computation.
%VARSPEC [I,c,o] The variable specification describes the format of the data that is contained in the %VARBUF parameter and lists the %variables to be assigned. %VARSPEC specifies the contents of the variable buffer, described above. Specify a character string which follows a LIST, DATA, or EDIT syntax.

%VARSPEC is a required input parameter if %VARBUF is specified.

Usage notes

Use the IFFWOL call to retrieve records without locks. The find specification is based on a specified combination of retrieval conditions and is identical to the one that is used with the IFFIND call.

Completion return code (RETCODE)

A completion code of 4 indicates an IFFWOL error. If the IFFWOL call is unsuccessful, Model 204 returns a completion code of 4 for the following error conditions:

  • An error in an IFFWOL specification. Note that Model 204 does not save the compilation and does not define the compilation name.
  • A field name variable is replaced by a non-existent field. In this case, Model 204 does not execute the IFFWOL, but it does save the compilation if the name parameter is specified.
  • An error is encountered in a %variable parameter.

Coding example (COBOL)

WORKING-STORAGE SECTION. 01 CALL-ARGS. 05 RETCODE PIC 9(5) COMP SYNC. 05 QUAL-1 PIC X(75) VALUE 'SEX=FEMALE; OCCUPATION=DOCTOR OR DENTIST; CITY=BOSTON;NAME LIKE "PAT*";END;'. . . . PROCEDURE DIVISION. . . . CALL "IFFWOL" USING RETCODE, QUAL-1.