The <recio.h> include file defines the types and macros, and prototypes functions for all the ILE C record input and output (I/O) operations.
The following functions are defined in <recio.h>:
_Racquire | _Rclose | _Rcommit | _Rdelete |
_Rdevatr | _Rfeod | _Rfeov | _Rformat |
_Rindara | _Riofbk | _Rlocate | _Ropen |
_Ropnfbk | _Rpgmdev | _Rreadd | _Rreadf |
_Rreadindv | _Rreadk | _Rreadl | _Rreadn |
_Rreadnc | _Rreadp | _Rreads | _Rrelease |
_Rrlslck | _Rrollbck | _Rupdate | _Rupfb |
_Rwrite | _Rwrited | _Rwriterd | _Rwrread |
The following positioning macros are defined in recio.h:
__END | __END_FRC | __FIRST | __KEY_EQ |
__KEY_GE | __KEY_GT | __KEY_LE | __KEY_LT |
__KEY_NEXTEQ | __KEY_NEXTUNQ | __KEY_PREVEQ | __KEY_PREVUNQ |
__KEY_LAST | __KEY_NEXT | __NO_POSITION | __PREVIOUS |
__PRIOR | __RRN_EQ | __START | __START_FRC |
__LAST | __NEXT |
The following macros are defined in recio.h:
__DATA_ONLY | __DFT | __NO_LOCK | __NULL_KEY_MAP |
The following directional macros are defined in recio.h:
__READ_NEXT | __READ_PREV |
The following functions and macros support locate or move mode:
_Rreadd | _Rreadf | _Rreadindv | _Rreadk |
_Rreadl | _Rreadn | _Rreadnc | _Rreadp |
_Rreads | _Rupdate | _Rwrite | _Rwrited |
_Rwriterd | _Rwrread |
Any of the record I/O functions that include a buffer parameter may work in move mode or locate mode. In move mode, data is moved between the user-supplied buffer and the system buffer. In locate mode, the user must access the data in the system buffer. Pointers to the system buffers are exposed in the _RFILE structure. To specify that locate mode is being used, the buffer parameter of the record I/O function is coded as NULL.
A number of the functions include a size parameter. For move mode, this is the number of data bytes that are copied between the user-supplied buffer and the system buffer. All of the record I/O functions work with one record at a time regardless of the size that is specified. The size of this record is defined by the file description. It may not be equal to the size parameter that is specified by the user on the call to the record I/O functions. The amount of data that is moved between buffers is equal to the record length of the current record format or specified minimum size, whichever is smaller. The size parameter is ignored for locate mode.
The following types are defined in recio.h:
Information for controlling opened record I/O operations
typedef _Packed struct {
char reserved1[16];
volatile void *const *const in_buf;
volatile void *const *const out_buf;
char reserved2[48];
_RIOFB_T riofb;
char reserved3[32];
const unsigned int buf_length;
char reserved4[28];
volatile char *const in_null_map;
volatile char *const out_null_map;
volatile char *const null_key_map;
char reserved5[48];
const int min_length;
short null_map_len;
short null_key_map_len;
char reserved6[8];
}_RFILE;
Record I/O Feedback Information
typedef struct {
unsigned char *key;
_Sys_Struct_T *sysparm;
unsigned long rrn;
long num_bytes;
short blk_count;
char blk_filled_by;
int dup_key :1;
int icf_locate :1;
int reserved1 :6;
char reserved2[20];
}_RIOFB_T;
System-Specific Information
typedef struct {
void *sysparm_ext;
_Maj_Min_rc_T _Maj_Min;
char reserved1[12];
} _Sys_Struct_T;
Major and Minor Return Codes
typedef struct {
char major_rc[2];
char minor_rc[2];
} _Maj_Min_rc_T;
The following macros are defined in recio.h:
The following null field macros are defined in recio.h: