Sign in

docs RPG Reference

Defining the File Usage in Free-Form

Defining the File Usage in Free-Form

Defining the File Usage in Free-Form

Table 1. USAGE keyword equivalents of Fixed-form Type, Designation and Addition entries

Fixed-form entriesDescriptionEquivalent USAGE keywordNotes on the free-form syntax
File TypeFile DesignationFile Addition
IFInput Full-proceduralUSAGE(*INPUT)USAGE(*INPUT) is the default for DISK, SEQ, SPECIAL
IFAInput Full-procedural with file additionUSAGE(*INPUT : *OUTPUT)
UFUpdate Full-proceduralUSAGE(*UPDATE : *DELETE)In fixed form, Update implies that the file is also Delete-capable. In free form, *DELETE must be explicitly specified for the file to be Delete-capable. If you do not want the file to be Delete-capable, omit *DELETE.
UFAUpdate Full-procedural with file additionUSAGE(*UPDATE : *DELETE : *OUTPUT)
OOutputUSAGE(*OUTPUT)USAGE(*OUTPUT) is the default for PRINTER
OAOutput with file additionNot supported in free-form
CFCombined Full-proceduralUSAGE(*INPUT : *OUTPUT)USAGE(*INPUT : *OUTPUT) is the default for WORKSTN
I or UPInput or Update Primary fileNot supported in free-form
I or USInput or Update Secondary fileNot supported in free-form
I or C®TInput or Combined Table fileNot supported in free-form