You are here: Job and Form Set Rules Reference > JDT Rules Reference > ImportXMLFile

ImportXMLFile

Use this form set rule to import an XML file into GenData for processing. Using this file, the GenData program creates recipient batch, NAFile, POLFile, and NewTrn files that you can print, archive, or both using the GenPrint and GenArc programs.

The export file to be used as import was created using the Documaker Desktop XML Export function that produces a file in the Documaker Standard XML format.

Syntax

;ImportXMLFile;;option;

Option

Description

SP

Include the SP option to suppress the pagination portion of the import. This lets you run rules and other form set manipulations before calling a rule to paginate the form set, such as the PaginateAndPropogate rule.

You must place this option before the FILE option. Here is an example:

;ImportXMLFile;;SP,SCH=11,FILENAME 20,20;

This example suppresses the pagination of the import of the file designated by this search mask.

TF

Enter TF to truncate fields to the field length defined by the FAP file. Make sure you specify this parameter before FILE option.

FILE

Enter the name and path of the import file.

INI

Enter the INI control group and option in which the import file is defined. Separate the control group and option with a comma.

SCH

Enter the search criteria and the file name data, separated by a space.

The name of the file, including its path, that you want to import should be contained in the record in the file indicated by the ExtrFile option in the Data control group.

The search criteria are one or more comma delimited data pairs, offsets and character string, used as the search mask for finding the record in the specified file.

The file name data is a comma delimited data pair that defines the offset and length of the file name in the record defined by the search criteria parameter.

GVM

Enter the global variable name (GVM) that contains the file name and path information.

Keep in mind:

    < XMLTags2GVM >
    GVM = XMLTag, (Req/Opt)

where GVM is the name of the GVM variable and XMLTag is the tag name in the XML file. Include Req or Opt to specify whether it is required or optional. If it is required and is not present in the XML file, processing will terminate. Here is an example:

    < XMLTags2GVM >
      Key1 = Key1, Req
      Key2 = Key2, Req
      KeyID = TransactionID, Opt

Example

These examples show the different ways you can define the import file when you use this rule. Assume you have the following items defined in your master resource library. For an example of the standard XML file format, see XML File Format.

Here are sample INI settings in your FSISYS.INI file:

< Data >

AFGJOBFile = .\deflib\afgjob.jdt

ExtrFile = .\extract\dummy.dat

< ExtractKeyField >

SearchMask = 1,XML_FILE_NAME

< Key1Table >

XML = xml

< Key2Table >

XML = xml

< KeyIDTable >

XML = xml

< Trigger2Archive >

Key1 = Key1

Key2 = Key2

KeyID = KeyID

RunDate = RunDate

< TRN_Fields >

Key1 = 1,3,N

Key2 = 5,5,N

KeyID = 10,4,N

< TRN_File >

BinaryExt = N

MaxExtRecLen = 175

< XMLTags2GVM >

Key1 = Key1,Req

Key2 = Key2,Req

KeyID = TransactionID,Opt

Here is a sample of the DUMMY.DAT file, pointed to by the ExtrFile option in the Data control group in your FSISYS.INI file.

0 1

1 5

XML_FILE_NAME This is a dummy extract file.