IFPROL (HLI function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
The conventions used on this page are described in [[HLI: Function call list#Function call notation conventions|Function call notation conventions]].
The conventions used on this page are described in [[HLI: Function summary#Function call notation conventions|Function call notation conventions]].


==Summary==
==Summary==

Latest revision as of 19:32, 13 July 2016

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

Summary

Description
The IFPROL call (PLACE RECORD ON LIST) places the current record on the specified list.
Thread type
multiple cursor IFSTRT, single cursor IFSTRT
IFCALL function number
33

Syntax

IFPROL(RETCODE,LIST_NAME,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.
LIST_NAME [I,c,r] The list name is a required input parameter that specifies the name of the list to be used. If the list does not already exist, Model 204 creates a new list using this name. Specify a character string variable that is the name of a list, existing or new.
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 current record to be placed on the list. Specify the cursor name as a short character string (maximum 32 characters), using the name previously assigned to the cursor in a corresponding IFOCUR call. See the description of 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 IFPROL call to add a record to a list if the record is not already on the list. You may use IFPROL to add records from a sorted set to a list.

The IFPROL call is valid on all types of IFSTRT threads. On a multiple cursor IFSTRT thread, you must specify the cursor whose current record is to be placed on the list. On a single cursor IFSTRT thread, IFPROL places the current record on the list.

Coding example (COBOL)

WORKING-STORAGE SECTION. 01 ARGS-FOR-CALL. 05 RETCODE PIC 9(5) COMP SYNC. 05 LISTNAME PIC X(11) VALUE "NEWEMPLOYS;". . . . PROCEDURE DIVISION. . . . CALL "IFPROL" USING RETCODE, LISTNAME.

In this example, processing is done on a single cursor IFSTRT thread, and the IFPROL call is preceded by IFFIND and IFGET calls (not shown).