This example defines all of the fields used in an application and refers to fields only within the field reference file itself.
COLHDG
EDTCDE(Z)
REFFLD
REFSHIFT
TEXT
The following field reference file (MLGREFP) describes all fields used by any program in the application. The other files use the fields in this file.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00010A** FLDREF MLGREFP MAILING LIST FIELD REFERENCE FILE 00020A (1)R MLGREFR TEXT('Mailing List Field Reference') 00030A ACTNUM 5 0 COLHDG('Account' 'Number') 00040A EDTCDE(Z) 00050A ACTTYP 1 0 COLHDG('Acct' 'Type') 00060A TEXT('Acct Type 1=Bus 2=Gvt + 00070A 3=Org 4=Sch 5=Pvt 9=Oth') 00080A NAME 18 COLHDG('Name') 00090A REFSHIFT(X)(4) 00100A ADDR R (2) (2)REFFLD(NAME) 00110A COLHDG('Address')(3) 00120A CITY R (2) (2)REFFLD(NAME) 00130A COLHDG('City') (3) 00140A STATE 2 COLHDG('State') 00150A ZIP 5 0 COLHDG('ZIP' 'Code') 00160A EDTCDE(X) 00170A BATNUM 6 0 COLHDG('Batch' 'Number') 00180A EDTCDE(Z) 00190A TRNTYP 1 COLHDG('Trans' 'Type') A
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 00200A TEXT('Trans Type A=Add + 00210A C=Change D=Delete') 00220A XACTNM R REFFLD(ACTNUM) 00230A XACTTTP R REFFLD(ACTTYP) 00240A XNAME R REFFLD(NAME) 00250A XADDR R REFFLD(ADDR) 00260A XCITY R REFFLD(CITY) 00270A XSTATE R REFFLD(STATE) 00280A XZIP R REFFLD(ZIP) 00290A TRNNUM 5 0 COLHDG('Transaction' 'Number') 00300A EDTCDE(Z) 00310A MLGLK1 3 0 COLHDG('Lock' 'Control') 00320A TEXT('Control Number Used for + 00330A record locking') A