Using variables

You can define variables in the search pattern and use them in the AutoEx Destination URI or in the script parameters.

See Creating a search pattern.

When the definition is done, a variable is used as a placeholder in the search pattern.

Instead of the variable, any character can stand in the corresponding file name or path. If the pattern is not limited by a fixed value before or after the variable, the entire file or directory name is interpreted as a variable value.

During the execution of the script or when you create a send order, the variables are substituted accordingly.

Thus, you can use file or directory names as parameter, partner, or DSN name for execution.

To define variables, use this syntax:

${<Variable Name>}

These files are provided:

C:\EDI_OUT\PARTNER1_INVOIC_001.edi

C:\EDI_OUT\PARTNER1_DESADV_001.edi

C:\EDI_OUT\PARTNER2_INVOIC_001.edi

Search pattern:

C:\EDI_OUT\${PARTNER}_${DSN}_*.edi

AutoEx destination URI:

eurexc://${DSN}@${PARTNER}

When processing the first file, after a variable substitution the AutoEx destination URI would be as follows:

eurexc://INVOIC@PARTNER1

The second file would look as follows:

eurexc://DESADV@PARTNER1

The third file would look as follows:

eurexc://INVOIC@PARTNER2