Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 4 Defining Import Tables for Files with Multiple Record Formats : First Sample File – Personnel

First Sample File – Personnel
Types of Records in File
This example illustrates a sample file that has two record types. Each record contains sections of different formats (A and B), including a repeating group (B).
Table Definitions
Sample File Parent Table Definition for Record A
The following example illustrates an import table definition for record A (parent):

 
COMMAND==> TABLE DEFINITION

Table: EMPLOYEE_IMP_A Type: IMP Unit: USR40 IDgen: Y

File: USR40.EMPLOYEE.IMPORT
DDname: External Routine Name:
ServerID:

Parameter Name Typ Syn Len Dec Class Src ' Event Rule Typ Acc
---------------- - -- --- -- - - ' ---------------- - -
_ ' _
_ ' _
-------- IMP --------|--------- Metadata Definition ------
Field Name Xsyn Xlen Xdec Offset Key Typ Syn Len Dec Ord Rqd Default
---------------- ---- ---- -- ----- - - -- ---- -- - - ----------
_ DEPTNO B 4 0 0 C B 4 0
_ DEPTNAME C 9 0 4 S C 9 0
_
_
_

_ PFKEYS:3=END 12=CANCEL 22=DELETE 13=PRT 14=FIELDS 6=OFFSET 21=DATA 2=DOC

 
To use the Table Browser or read multiple record types or repeating groups, you must specify a primary key. This example does not specify a primary key; therefore, to access the information, you must use rules.
Sample File Table Definition for Record B
The following example illustrates an import table definition for record B (child):

 
COMMAND==> TABLE DEFINITION

Table: EMPLOYEE_IMP_B Type: IMP Unit: USR40 IDgen: Y

File: USR40.EMPLOYEE.IMPORT
DDname: External Routine Name:
ServerID:

Parameter Name Typ Syn Len Dec Class Src ' Event Rule Typ Acc
---------------- - -- --- -- - - ' ---------------- - -
_ RECORD_A I B 4 0 D ' _
_ ' _
-------- IMP --------|--------- Metadata Definition ------
Field Name Xsyn Xlen Xdec Offset Key Typ Syn Len Dec Ord Rqd Default
---------------- ---- ---- -- ----- - - -- ---- -- - - ----------
_ KEY B 4 0 0 P I B 4 0
_ LNAME C 22 0 4 S C 22 0
_ FNAME C 10 0 26 S C 10 0
_
_
_
_

_ PFKEYS: 3=END 12=CANCEL 22=DELETE 13=PRT 14=FIELDS 6=OFFSET 21=DATA 2=DOC

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved