IBM AS/400 Frozen Dessert Maker User Manual


 
Using Externally Described Disk Files
*.. 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ..*
A..........T.Name++++++RLen++TDpB......Functions++++++++++++++++++++*
A**FLDRED DSTREF DISTRIBUTION APPLICATION FIELD REFERENCE
A R DSTREF TEXT('Distribution Field Ref')
A* COMMON FIELDS USED AS REFERENCE
A BASDAT 6 0 EDTCDE(Y) 1
A TEXT('Base Date Field')
A* FIELDS USED BY CUSTOMER MASTER FILE
A CUST 5 CHECK(MF) 2
A COLHDG('Customer' 'Number')
A NAME 20 COLHDG('Customer Name')
A ADDR R REFFLD(NAME) 3
A COLHDG('Customer Address')
A CITY R REFFLD(NAME) 3
A COLHDG('Customer City')
A STATE 2 CHECK(MF) 2
A COLHDG('State')
A SRHCOD 6 CHECK(MF) 2
A COLHDG('Search' 'Code')
A TEXT('Customer Number Search +
A Code')
A ZIP 5 0 CHECK(MF) 2
A COLHDG('Zip' 'Code')
A CUSTYP 1 0 RANGE(1 5) 4
A COLHDG('Cust' 'Type')
A TEXT('Customer Type 1=Gov 2=Sch+
A 3=Bus 4=Pvt 5=Oth')
A ARBAL 8 2 COLHDG('Accts Rec' 'Balance') 5
A EDTCDE(J) 6
A ORDBAL R REFFLD(ARBAL)
A COLHDG('A/R Amt in' 'Order +
A File')
A LSTAMT R REFFLD(ARBAL)
A COLHDG('Last' 'Amount' 'Paid')
A TEXT('Last Amount Paid in A/R')
A LSTDAT R REFFLD(BASDAT)
A COLHDG('Last' 'Date' 'Paid')
A TEXT('Last Date Paid in A/R')
A CRDLMT R REFFLD(ARBAL)
A COLHDG('Credit' 'Limit')
A TEXT('Customer Credit Limit')
A SLSYR R+ 2 REFFLD(ARBAL)
A COLHDG('Sales' 'This' 'Year')
A TEXT('Customer Sales This Year')
A SLSLYR R+ 2 REFFLD(ARBAL)
A COLHDG('Sales' 'Last' 'Year')
A TEXT('Customer Sales Last Year') 7
Figure 140. Example of a field Reference File
This example of a field-reference file shows the definitions of the fields that are
used by the CUSMSTL (customer master logical) file as shown in Figure 139 on
page 283. The field-reference file normally contains the definitions of fields that are
used by other files. The following text describes some of the entries for this field-
reference file.
1 The BASDAT field is edited by the Y edit code, as indicated by the
keyword EDTCDE(Y). If this field is used in an externally described
output file for an ILE RPG program, the edit code used is the one speci-
fied in this field-reference file; it cannot be overridden in the ILE RPG
program. If the field is used in a program-described output file for an ILE
284 ILE RPG for AS/400 Programmer's Guide