Sign in

docs RPG Guide

Data Management Operations and ILE RPG I/O Operations

Data Management Operations and ILE RPG I/O Operations

Data management is the part of the operating system that controls the storing and accessing of data by an application program. Table 1 shows the data management operations provided by the IBM i and their corresponding ILE RPG operation. It also shows which operations are allowed for which ILE RPG device type.

Table 1. Data Management Operations and the Corresponding RPG I/O Operation

Data Management OperationILE RPG I/O Operation
OpenOPEN
Read by relative record numberREAD, CHAIN
Read by keyREAD, READE, CHAIN, primary and secondary file
Read sequentialREAD
Read previousREADP, READPE
Read nextREAD, READE
Read invited deviceREAD
Write-ReadEXFMT
Write by relative record numberWRITE
Write by keyWRITE, EXCEPT, primary and secondary file
Write sequentialWRITE, EXCEPT
Force end of dataFEOD
Update by relative record numberUPDATE, primary and secondary file
Update by keyUPDATE, primary and secondary file
Delete by relative record numberDELETE, primary and secondary file
Delete by keyDELETE, primary and secondary file
AcquireACQ
ReleaseREL
CommitCOMMIT
RollbackROLBK
CloseCLOSE, LR RETURN