There are two methods for creating Master and Access Files.
FOCUS file descriptions can represent an entire table or part of a table. Also, several pairs of file descriptions can define different subsets of columns for the same table, or one pair of Master and Access Files can describe several tables. This chapter presents single-table Master and Access Files. For multi-table file descriptions, see Multi-Table Structures.
You can represent tables with repeating columns as FOCUS OCCURS segments. See The OCCURS Segment for an explanation of these virtual constructs.
FOCUS processes a request with the following steps.
This example is a Master File for the DB2 table EMPINFO.
FILENAME=EMPINFO ,SUFFIX=DB2,$ SEGNAME=EMPINFO ,SEGTYPE=S0,$ FIELD=EMP_ID ,ALIAS=EID ,USAGE=A9 ,ACTUAL=A9,$ FIELD=LAST_NAME ,ALIAS=LN ,USAGE=A15 ,ACTUAL=A15,$ FIELD=FIRST_NAME ,ALIAS=FN ,USAGE=A10 ,ACTUAL=A10,$ FIELD=HIRE_DATE ,ALIAS=HDT ,USAGE=YMD ,ACTUAL=DATE,$ FIELD=DEPARTMENT ,ALIAS=DPT ,USAGE=A10 ,ACTUAL=A10, MISSING=ON,$ FIELD=CURRENT_SALARY ,ALIAS=CSAL ,USAGE=P9.2 ,ACTUAL=P4,$ FIELD=CURR_JOBCODE ,ALIAS=CJC ,USAGE=A3 ,ACTUAL=A3,$ FIELD=ED_HRS ,ALIAS=OJT ,USAGE=F6.2 ,ACTUAL=F4, MISSING=ON,$ FIELD=BONUS_PLAN ,ALIAS=BONUS_PLAN ,USAGE=I4 ,ACTUAL=I4,$ FIELD=HIRE_DATE_TIME ,ALIAS=HDTT ,USAGE=HYYMDm ,ACTUAL=HYYMDm , MISSING=ON,$ FIELD=HIRE_TIME ,ALIAS=HT ,USAGE=HHIS ,ACTUAL=HHIS , MISSING=ON,$
The following is an Access File for the table EMPINFO.
SEGNAME = EMPINFO, TABLENAME = "USER1"."EMPINFO", KEYS = 1, WRITE = YES, DBSPACE = PUBLIC.SPACE0,$
File Descriptions and Tables contains a complete list of Master Files and Access Files for the examples cited in this manual.
Information Builders |