ImportExtract
Use this form set level rule to import an extract file into GenData that is comprised of:
1. Typical transactions in an extract file which have one or more Documaker Desktop export files embedded in each transaction. This illustration shows transactions with embedded export files:
Transaction 1 <record1, field1>, <field 2>, <field 3>, <field4>, <field5> <record2, field1>, <field 2>, <field 3>, <field4>, <field5> |
---|
Export file 1 containing data associated with transaction 1. |
Transaction 1 (continued) <record3, field1>, <field 2>, <field 3>, <field4>, <field5> <record4, field1>, <field 2>, <field 3>, <field4>, <field5> |
Transaction 2 <record1, field1>, <field 2>, <field 3>, <field4>, <field5> <record2, field1>, <field 2>, <field 3>, <field4>, <field5> |
Export file 2 containing data associated with transaction 2. |
Transaction 2 (continued) <record3, field1>, <field 2>, <field 3>, <field4>, <field5> <record4, field1>, <field 2>, <field 3>, <field4>, <field5> |
2. One or more appended Documaker Desktop export files. This illustration shows an extract file comprised of export files appended to one another:
Export file 1 |
Export file 2 |
Export file 3 |
Export file 4 |
Export file 5 |
Syntax
Although there are no parameters for this rule. Keep in mind:
- Specify the extract file name to be imported via the Data control group using the ExtrFile option.
- In the Trn_File control group, set MaxExtRecLen option to the length of the longest record in extract file.
- Only use the SearchMask option in the ExtractKeyField control group; do not use the Key option.
- To create minimum information, such as Key1, Key2, Key ID, and so on, in the TRNFILE.DAT file for each transaction, you must define for each information item, the field name, offset, and length in the Trn_Fields control group. This definition associates the option fields in the Trn_Fields control group to the corresponding entries in the transaction DFD file (TRNDFDFL.DFD).
- For each field that comprises a section (whose data comes from the export data), you must create or have a DDT record whose field rule is set to one of the following field rules
- MapFromImportData
- NoOpFunc
- If you use the NoOpFunc rule for any field rule associated with the export data, you must insert the ReplaceNoOpFunc rule in the <Base Rules> section of the AFGJOB.JDT file.
- You must place the ImportExtract rule in the <Base Form Set Rules> section of the AFGJOB.JDT file after the BuildFormList rule or any custom rule that creates a form set.
- If the import extract file consists of only Documaker Desktop export files; do not include the LoadRcpTbl and RunSetRcpTbl or GetCo and GetLOB rules in your AFGJOB.JDT file.
- If the import extract file is comprised of normal transaction data records plus one or more embedded Documaker Desktop export files; you must include the LoadRcpTbl and RunSetRcpTbl or GetCo and GetLOB rules in your AFGJOB.JDT file.
Example
Here are some examples which show how this rule works:
Extract file made up of transactions with embedded export files
In this example, the extract file is made up of normal transactions with embedded export files. This example imports information from an extract file named IMPORT.DAT which is comprised of typical transactions and embedded export files. Using this information, the system creates GenData files which are input to GenPrint. The GenPrint program then creates the print output files. Keep in mind:
- The ReplaceNoOpFunc rule is not required in the AFGJOB.JDT file because no fields in the sample DDT file use the NoOpFunc rule
- The options in the Trn_Fields control group are based on items in the transaction data
- The LoadRcpTbl and RunSetRcpTbl rules are required to load and run the recipient table
Here is a sample extract file:
SCO1234567HEADERREC00000030198 SCOM1FP WAT1I1B119990223 804-345-87…
SCO1234567FRMLSTREC0000010110 SCO FP T1 89999987 041598… SCO1234567PRODNMREC00000David Miller 000666666600000444...
SCO1234567PRODADREC00000100 Main Street, Suite 1200 Miami, FL 30202…
…
;SAMPCO;LB1;EXPORT FILE # 1;NB;P ;associated w Transaction # 1;
\NA=\;SAMPCO;LB1;LETTER2;
\NA=q1snam\
\NA=q1fl2a\
DATE\October 12, 2000
LESSEE_NAME\Morris Sander
LESSEE_addr\3200 Windy Hill Road
LESSEE_city\Atlanta, GA 30339
\NA=q1b302\
\NA=q1ba36\
\NA=q1ba32\
\NA=q1sal1\
SCO1234567COVERGREC00000SPC 25000 250 Coverage Item 2…
SCO1234567GENRALREC000001 1 3 1 0 Liability1Liability2Liability3Libility4 …
…
;SAMPCO;LB1;EXPORT FILE # 2;NB;P ;associated w Transaction # 1;
\NA=\;SAMPCO;LB1;CHARTS;
\NA=q1cht\
…
SCO999567HEADERREC00000030198 SCOM1FP WAT1I1B119990223 804-345-87…
SCO9994567FRMLSTREC0000010110 SCO FP T1 89999987 041598…
…
Here is a sample DDT file:
<Image Field Rules Override>
;0;0;Date;0;0;Date;0;25;; MapFromImportData;;N;N;N;…
;0;0;Lessee_Name;0;9;Lessee_Name;0;25;; MapFromImportData;;N;N;N;…
;0;0;Lessee_addr;0;25;Lessee_addr;0;25;; MapFromImportData;;N;N;N;…
;0;0;Lessee_city;0;25;Lessee_city;0;25;; MapFromImportData;;N;N;N;…
Here is a sample AFGJOB.JDT file:
<Base Rules>
…
/* Every form set in this base uses these rules. */
<Base Form Set Rules>
;NoGenTrnTransactionProc;;;
;ResetOvFlw;;;
;BuildFormList;;;
;ImportExtract;;;
;LoadRcpTbl;;;
;RunSetRcpTbl;;;
…
Here is a sample INI file:
< Data >
ExtrFile = Import.dat
< ExtractKeyField >
SearchMask = 1,SCO
< Trn_Fields >
Key1 = 1,3,N
Key2 = 40,2,N
KeyID = 4,7,N
< Trn_File >
BinaryExt = N
MaxExtRecLen = 120
Extract file made up of appended export files
In this example, the extract file is made up of one or more appended export files. This example imports information from an extract file named IMPORT.DAT which is comprised of one or more appended export files. Using that information, the system then creates GenData files which are input to GenPrint. The GenPrint program then creates the print output files. Keep in mind:
- The ReplaceNoOpFunc rule is required in the AFGJOB.JDT file because one of the fields in the sample DDT uses the NoOpFunc rule
- The options in the Trn_Fields control group are based on items in the export data
- The LoadRcpTbl and RunSetRcpTbl rules not required
Here is a sample extract file:
;CWNG;CIS;1;NB;Export File # 1 ;;
\NA=\;CWNG;CIS;CWFBILL;
\NA=QAIBANCD\
BANNER CODE\001
BANNER CODE TXT\CWNG Company A
\NA=QAIGRAPH\
ACTUAL GJ 1\Nov
\NA=\;CWNG;CIS;CWFCRD3;
\NA=CWFCRD3\
…
;CWNG;CIS;1;NB;Export File # 2 ;;
\NA=\;CWNG;CIS;CWFBILL;
\NA=QAIBANCD\
BANNER CODE\002
BANNER CODE TXT\CWNG Company B
\NA=QAIGRAPH\
ACTUAL GJ 1\Nov
\NA=\;CWNG;CIS;CWFCRD3;
\NA=CWFCRD3\
…
Here is a sample DDT file:
<Image Field Rules Override>
;0;0;Banner Code;75;3;Banner Code;0;3;;MapFromImportData;31,ACCTNUM;…
;0;0;Banner Code Txt;0;11;Banner Code Txt;0;11;;noopfunc;31,Banner Code;…
Here is a sample AFGJOB.JDT file:
<Base Rules>
…
;ReplaceNoOpFunc;;;
/* Every form set in this base uses these rules. */
<Base Form Set Rules>
;NoGenTrnTransactionProc;;;
;ResetOvFlw;;;
;BuildFormList;;;
;ImportExtract;;;
…
Here is a sample INI file:
< Data >
ExtrFile = Import.dat
< ExtractKeyField >
SearchMask = 2,CWNG
< Trn_Fields >
Key1 = 2,4,N
Key2 = 7,3,N
KeyID = 16,20,N
< Trn_File >
BinaryExt = N
MaxExtRecLen = 120
See also
© Copyright 2020, Oracle and/or its affiliates. All rights reserved. Legal notices.