Top
NetCOBOL V11.0 COBOL File Access RoutinesUser's Guide
FUJITSU Software

Chapter 3 API Functions

This chapter explains the File Access functions, calling parameters and returned values. Using this application programming interface (API) allows applications to access the features of the COBOL file system.

The File Access API consists of the following functional categories:

Category

Function

Description

Access

File Oriented

cobfa_close

Close a file

-

cobfa_indexinfo

Get the file attributes or key structure of an indexed file

-

cobfa_open

Open a file

-

cobfa_openW

Open a file

-

cobfa_reclen

Get the length of the current record

-

cobfa_recnum

Get the relative record number of the positioned record

-

cobfa_release

Release all record locks

-

LOCK_cobfa

Set an exclusive lock

-

UNLOCK_cobfa

Release an exclusive lock

-

File Positioning

cobfa_stkey

Position to the record indicated by the value of an arbitrary key

SD

cobfa_strec

Position to the record indicated by the relative record number

SD

Record Oriented

cobfa_delcurr

Delete the current record after a sequential read

S

cobfa_delkey

Delete the record indicated by the value of the primary record key

RD

cobfa_delrec

Delete the record indicated by a relative record number

RD

cobfa_rdkey

Reads the record indicated by the value of an arbitrary key

RD

cobfa_rdnext

Reads a record sequentially

S

cobfa_rdrec

Read the record indicated by the relative record number

RD

cobfa_rewcurr

Rewrite the current record after a sequential read

SD

cobfa_rewkey

Rewrite the record indicated by the value of the primary key

RD

cobfa_rewrec

Rewrite the record indicated by a relative record number

RD

cobfa_wrkey

Write a record indicated by the value of the primary record key

RD

cobfa_wrnext

Write a record sequentially

S

cobfa_wrrec

Write the record indicated by the relative record number

RD

Status Oriented

cobfa_errno

Get the last error number

-

cobfa_stat

Get the last I-O status

-

RD: function that is usable when the open mode is random access or dynamic access

SD: function that is usable when the open mode is sequential access or dynamic access

S: function that is usable only when the open mode is sequential access