On this Page

    Processing Instructions

    (As of version 3.2.001.09)

    Merge supports Processing Instructions (PI) located in XML data file.

    It is a usability feature which may be used if at data generation time you know all the parameters Merge needs and do not want to specify them for Merge later.

    Merge PI are similar to FM PI but related to Merge, not FM. In FM world PI help to identify job name or run Merge directly without any scripts involved. In the Merge world, PI allow to run Merge without specifying additional parameters.

    For example, put this line right after tag of your data file and run Merge as "Merge -data yourData.xml" to get data merged with $F\Invoice1.xatw form, PCL output created and sent to OfficePrinter5.

    <?DocOrigin form="$F\Invoice1.xatw" config="Default-LJ4.prt" output="prt::OfficePrinter5"?>

    Note, that Merge PI have "medium" priority, they overpower properties from PRM files but user-specified CLO overpower PI.

    For example, process the same data file as "Merge -data yourData.xml -config Default-PDF.prt" and you will get PDF (instead of PCL) sent to OfficePrinter5.

    "Do PI always applied?", "How does Merge know when to use PI?" you may ask. Merge applies PI from data file only when:

    • User specified -data parameter but didn't specify -form.
    • All PI items are valid Merge parameters.

    Some options are more likely to be seen in Merge PI than others. For example, it is mandatory to have -form in PI but it makes almost no sense to specify something like -logfile there.

    Probably needless to say that you have to be careful with relative and absolute path used in PI. Your data file may be processed on a different computer than planned, computer config or file system may change over time and your data will have wrong PI hardcoded. There are pros and cons, it is up to you to decide if you need this feature and find a balance between flexibility and simplicity.

    See Also

    Job Name Discovery