It is tricky, if not impossible, to use the character = in environment variables used with the SET command. For example the command
SET test=myVar=myValue
leads to the OS/2 error SYS1003.
To get around this limitation, surround the value with double quotes:
SET test="myVar=myValue"
Or you can set the environment variable in the CONFIG.SYS. SET statements in the file CONFIG.SYS don't have this limitation (except that you cannot use the equal char in the name of an environment variable).
But be aware that you cannot use nested environment variables in the CONFIG.SYS. Example:
REM *** Example SET statements for REM the CONFIG.SYS REM SET varA=ValueA REM *** The next statement does not REM work as expected if used REM in the CONFIG.SYS! REM SET varB=%varA% ValueB REM *** The next statement will REM only work in the CONFIG.SYS REM REM ---name---- ----Value---- SET configEnvVar=myVar=myValue
By the way: The characters |, < and > don't have a special meaning if used in commands in the CONFIG.SYS.
In any case, in REXX programs you should use the REXX function VALUE to get or set the value of environment variables. The function VALUE does not have this limitation.
(see also Using meta chars)