IFPOINT (HLI function): Difference between revisions
(Created page with " ==Summary== <dl> <dt>Description</dt> <dd>The IFPOINT call (POINT) changes the current record number and, in group context, optionally changes the current file.</dd> <dt>Thre...") |
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]]. | |||
==Summary== | ==Summary== |
Revision as of 22:50, 11 July 2016
The conventions used on this page are described in Function call notation conventions.
Summary
- Description
- The IFPOINT call (POINT) changes the current record number and, in group context, optionally changes the current file.
- Thread type
- single cursor IFSTRT
- IFCALL function number
- 44
Syntax
IFPOINT|IFPNT(RETCODE,REC_NUM,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. |
REC_NUM | [I,c,r] The record number is a required input parameter that specifies the number of a record from a previously found set. Specify the number as a character string. Upon successful completion of IFPOINT, the record number specified becomes the current record number. |
FILE_SPEC | [I,s,r/o] The file specification is an input parameter that is required in group context to specify the name of a file that is a member of the open group. In individual file context, the file name is optional and, if specified, must specify the name of the current file.
You can specify the following $functions in the place of a known file name string constant: $CURFILE for the current file of the group, or $UPDATE for the group update file. |
Usage notes
Use IFPOINT to change the current record. Upon successful completion, the record number specified becomes the current record number and is the next record to be operated upon by an IFMORE or IFPUT function.
IFPOINT does not affect the current record set and does not enqueue the new current record. The new current record is enqueued when it is operated on by IFMORE and IFPUT. The old current record is dequeued by the next IFMORE, IFPUT, or IFGET.
In a group context, IFPOINT can change both the current record and the current file. Be sure that the record number and the file name are consistent.
In files that contain record security, IFPOINT does not allow you to retrieve records lacking an appropriate record security field value.
Coding examples (COBOL)
The COBOL example below, which takes place in an individual file context, sets CURREC to 175.
WORKING-STORAGE SECTION. 01 ARGS-FOR-CALL. 05 RETCODE PIC 9(5) COMP SYNC. 05 RECNO PIC X(4) VALUE `175;'. . . . PROCEDURE DIVISION. . . . CALL "IFPOINT" USING RETCODE, RECNO.
The COBOL example below, which takes place in a file group context, sets CURREC to 0 (first record) for file PAYROLL.
WORKING-STORAGE SECTION. 01 ARGS-FOR-CALL. 05 RETCODE PIC 9(5) COMP SYNC. 05 RECNO PIC XX VALUE `0;'. 05 FILE-NAM PIC X(8) VALUE `PAYROLL;'. . . . PROCEDURE DIVISION. . . . CALL "IFPOINT" USING RETCODE, RECNO, FILE-NAM.
The COBOL example below, which takes place in a group context, sets CURREC to 0, which is the first record.
WORKING-STORAGE SECTION. 01 ARGS-FOR-CALL. 05 RETCODE PIC 9(5) COMP SYNC. 05 RECNO PIC XX VALUE `0;'. 05 FILE-NAM PIC X(8) VALUE `$UPDATE;'. . . . PROCEDURE DIVISION. . . . CALL "IFPOINT" USING RETCODE, RECNO, FILE-NAM.