INPUT SPECIFICATION


Input specifications are used to describe program-described file formats; rename externally described file fields; and assign match field, level-break, and field-to-record relation indicators.

Program-described files require that their formats be defined through input specifications. These specifications are known as record identifying entries. They contain identifying codes that allow a record format to be associated with an indicator. For example, if position 6 of the database file record contains the letter H, and position 12 contains the number 1, then indicator 20 is set on.

Externally described files don't require input specifications. The RPG compiler generates the equivalent of input specifications based on the external definition of the file. However, each file format can be associated with a record-identifying indicator by specifying the format name and a record-identifying indicator.

Additionally, externally described files can have their fields renamed by specifying the external field name in the External Field positions of the input specification, and the new name in the Field Name position of the input specification. The PREFIX keyword is also used to change all field names to contain a prefix character set. See the PREFIX keyword in Table 2.6 for more information.

Because there are both program-described and externally described files, there are five different layouts for the input specification. Figures 2.8 through 2.12 illustrate the layouts of the various types of input specifications.

start figure

 .....INAME++++++NS1OINPos1+NCVPos2+NCVPos3+NCV.................................. 

end figure

Figure 2.8: Program-described file input specification ruler.

start figure

 .....I.........AND..INPos1+NCVPos2+NCVPos3+NCV.................................. 

end figure

Figure 2.9: Program-described file continuation input specification ruler.

start figure

 .....I........................Fmt+/TFRom+To+++D+Field+++++++++L1M1FRPLMNZB...... 

end figure

Figure 2.10: Program-described field input specification ruler

start figure

 .....IName++++++....IN.......................................................... 

end figure

Figure 2.11: Externally described file format input specification ruler.

start figure

 .....I..............ExternName..................Field+++++++++L1M1..PLMNZB...... 

end figure

Figure 2.12: Externally described field input specification ruler.




The Modern RPG IV Language
The Modern RPG IV Language
ISBN: 1583470646
EAN: 2147483647
Year: 2003
Pages: 156
Authors: Robert Cozzi

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net