XPROCESS Utility
The XPROCESS utility is an external data processor used when sending or receiving data. You typically use the XPROCESS utility to prepare data for transmission to a Trading Partner or to prepare data that you received from a Trading Partner. You invoke the XPROCESS utility in the command line of a Delivery Rule.
About the XPROCESS Utility
The syntax of the XPROCESS utility is:
XPROCESS [option] [Parameter1] [Parameter2] [Parameter3]As an example:
The VAN that your Trading Partner uses expects each line of data to be terminated with a Carriage Return and Line Feed. Your data is terminated by tilde (~) characters. You use the XPROCESS utility to convert the tildes into Carriage Return/Line Feed characters.
XPROCESS Parameters
| Option | Description |
|---|---|
| -0 | Converts any specified hexadecimal character [hexValue1]
to another hexadecimal character [hexValue2]. |
| -1 | Appends the file you specify [filename] to the
beginning of the data. This option is often used as a preprocessor
when sending data to the AT&T GMS network. |
| -2 | Replaces the tilde, Carriage Return, and Line
Feed characters with a single Carriage Return. This option is often
used as a preprocessor when sending data to the GEIS network. |
| -3 | Replaces all Carriage Returns with tildes and
removes all Line Feeds. This option is often used as a preprocessor
when receiving data from the GEIS network. |
| -4 | Removes all Carriage Returns and Line Feeds. |
| -5 | Removes all Carriage Returns and Line Feeds and
adds one hexadecimal character (0x1A) at the end of the file. This
option is often used as a preprocessor for the TDSI network. |
| -6 | Removes all hexadecimal 0x1A characters. This
option is often used as a prepostprocessor for the TDSI network. |
| -7 | Adds GM header and trailer records and removes
all Carriage Returns and Line Feeds. This option is often used as
a preprocessor for GM. It creates a THS and THD segment for the header
and a TTR for the trailer. |
| -8 | Replaces all tilde, Carriage Returns, and Line
Feed characters with a single Carriage Return. This option is often
used as a preprocessor when sending data to the MCI network. |
| -9 | Replaces all Line Feed characters with a tilde.
This option is often used as a preprocessor when receiving data from
the MCI network. |
| -10 | Replaces all Carriage Returns with Carriage Return/Line
Feeds. This option is often used when receiving files from Commerce:Network. |
| -11 | Replaces a string of hexadecimal characters with
a second string of hexadecimal characters.Note: Each
hexadecimal string value contains the prefix 0x, followed by a 2-digit
hexadecimal value. Together, the prefix and the 2-digit hexadecimal
value are considered one hexadecimal character.
Example 1 The following is an example of a command line using option -11. When executed, this command converts each ~CRLF to ~ (tilde) In this example, the first string contains three hexadecimal characters(0x7e,0x0d, and 0x0a) and the second string contains one hexadecimal character (0x7e). Inputfile.txt designates the file name of the input. Example 2 The following is an example of a command line when executed using the EXE Delivery Agent. When executed, this command converts each ~CRLF to ~ (tilde) In this example, the first string contains three (3) hexadecimal characters(0x7e,0x0d, and 0x0a) and the second string contains one (1) hexadecimal character (0x7e). The $Input token designates the file name of the input. |
| -12 | Removes all occurrences of a hexadecimal string
from a file. |
| -13 | Inserts a hexadecimal string at the prescribed
increment (Nbr Bytes) in the input file. This option is typically
used (but not limited to) blocking streamed EDI data. |
Additional Parameters
The following table describes additional XPROCESS Utility parameters.
| Parameter | Description |
|---|---|
| hexValue1 | A hexadecimal value in the format 0x??.
Used with the -0 option (described in the table above) and is the
character you want to replace in the data. where: ?? is the hexadecimal value. |
| hexValue2 | A hexadecimal value in the format 0x??.
Used with the -0 option (described in the table above) and is the
new character you are exchanging for hexValue1. where: ?? is the hexadecimal value. |
| hexString1 | A hexadecimal string in the format 0x??0x??. Used
with option -11 (described in the table above). where: ?? is the hexadecimal value. Note: Each hexadecimal value contains the
prefix 0x, followed by a 2-digit hexadecimal value. Together, the
prefix and the 2-digit hexadecimal value are considered 1 hexadecimal
character.
Example This example describes a hexadecimal string containing three hexadecimal characters. |
| hexString2 | A hexadecimal string in the format 0x??0x??. Used
with option -11 (described in the table above). where: ?? is the hexadecimal value. Note: Each hexadecimal value contains the
prefix 0x, followed by a 2-digit hexadecimal value. Together, the
prefix and the 2-digit hexadecimal value are considered one hexadecimal
character.
Example This example describes a hexadecimal string containing three hexadecimal characters. |
| filename | The name of the file on which you want to run XPROCESS. Used only when you run XPROCESS from the command line. If you are using XPROCESS in a Delivery Rule, you do not need to include a filename. The filename is passed automatically by Mailbox Server. |
| NbrBytes | Specifies a predefined increment at which you want to insert a hexadecimal string value. Used with the -13 option (described in the table above). |
| HexString ToInsert | Specifies a hexadecimal string value that you want to insert at a pre-defined increment. Used with the -13 option (described in the table above). |
Example 1
In this example, a Trading Partner has sent a file that uses Null characters to terminate segments. Sterling Gentran:Server expects to see a tilde (~) character as the segment terminator.
Original Data
ISA*00* *00* *08*9275310000 *12*5088947000334
*970812*1133*U*00304*000000132*0*P*><null>GS*GP*001677954*5088947000334*9
70812*1133*83*T*003040UCS<null>ST*880*000830001<null>Delivery Rule command line
Use the following command line to replace the Null character (hexadecimal value 0x00) with a tilde character (hexadecimal value 0x7E):
/o $Input XPROCESS.EXE -0 0x00 0x7E $InputModified Data
ISA*00* *00* *08*9275310000 *12*5088947000334
*970812*1133*U*00304*000000132*0*P*>~GS*GP*001677954*5088947000334*9
70812*1133*83*T*003040UCS~ST*880*000830001~Example 2
In this example, a Trading Partner has sent a file that uses a forward slash (/) to separate elements. Sterling Gentran:Server expects to see an asterisk (*) character as the element separator.
Original Data
ISA/00/ /00/ /08/9275310000 /12/5088947000334 /970812/
1133/U/00304/000000132/0/P/>~GS/GP/001677954/5088947000334/9
70812/1133/83/T/003040UCS~ST/880/000830001~Delivery Rule command line
Use the following command line to replace the forward slash character (hexadecimal value 0x5C) with an asterisk character (hexadecimal value 0x2A):
/o $Input XPROCESS.EXE -0 0x5C 0x2A $InputModified Data
ISA*00* *00* *08*9275310000 *12*5088947000334
*970812*1133*U*00304*000000132*0*P*>~GS*GP*001677954*5088947000334*9
70812*1133*83*T*003040UCS~ST*880*000830001~