Files

From MidrangeWiki
Jump to: navigation, search

In most cases, all files are defined using DDS.

Files on the iSeries can be broken down into various categories ...

Data Files

Reference Files

Reference files do not contain any data ... they are only used to establish appliation wide field definitions.

A physical file will define a reference file above the first record format specification. In the individual field definitions for the record format, the REFFLD keyword will used to define what field in the reference file the new field will be patterned after.

A                                      REF(REFFILE)                 
A          R FORMAT                    TEXT('Record format')     
A            NEWFIELD  R               REFFLD(REFFIELD)            
A                                      TEXT('Field description')     
A            OTHFIELD  R               REFFLD(REFFIELD1 OTHERREF)     

The REFFLD keyword can also specify a different reference file if the field is not defined in the primary reference file.

Any physical file can be used as a reference file ... but most applications establish a single file to be the reference.

Reference files can be used in any other file that defines new fields (physical files, display files, printer files, etc).

Physical Files

Physical files are represented on the system by *FILE objects with the PF-DTA attribute.

Physical files can be purely sequential or have access paths defined by keys in DDS.

Physical files are created using the CRTPF command.

Source Physical Files

Source physical files are represented on the system by *FILE objects with the PF-SRC attribute.

They are created using the CRTSRCPF command.

Logical Files

Logical files are alternate access paths to related physical files and contain no data directly.

Logical files are represented on the system by *FILE objects with the LF attribute.

Display Files

Display files have an attribute of DSPF and are used to display information on terminals. Generally the terminals are 5250 but multiple terminal types can be used.

Printer Files

Printer files files have an attribute of PRTF and are used to define printed output from programs.

Communication Files