| More Information: |
An example would be the OCODE field, if the SSID code contains a space, then the first part would be interpreted as the SSID and the remainder will be seen as comments. This can be avoided by using quotes around SSID:
OCODE 'MY SSID' Your EDI code used in SSID
When using the various automatic file processing options in ODEXCC.PRM, the program and argument fields need to be enclosed in quotes if they contain spaces
FILERCVDPROG '/usr1/uktest/test.bat'
FILERCVDARGS 'File_received %SSIDORGCODE% '
Further problems may occur if a placeholder eg %SSIDORGCODE% (refering to the originator's SSID code) contains an embedded space character. In this example, it would appear to the batch script as two separate arguments instead of one.
This can be avoided by encasing the placeholder in double quotes (the double quote character, not two single quotes next to each other). This will ensure that it is treated as a single argument, whilst still resolving to the correct value.
FILERCVDPROG '/usr1/uktest/test.bat'
FILERCVDARGS 'File_received "%SSIDORGCODE%" '
Generally in UNIX scripting, using single quotes will treat a string as a literal, whereas double quotes allow a string to be resolved (if it is a variable). Both allow a string with embedded spaces to be treated as a single argument.
Eg:
echo ' $CCPATH '
Outputs the literal string: $CCPATH
echo " $CCPATH "
Outputs whatever this environment variable resolves to (the installation directory for ODEX)
|