AS400 agent configured on EBCDIC_00037, but EBCDIC_01141 used to write special characters

Document ID : KB000087966
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Error Message :
N/A

Unable to write special characters.

When EBCDIC_00037 is used on the agent attribute, the special characters are wrong or are mangled on WRITE_PROCESS.

EBCDIC_01141 needs to be used to write to an AS400 system using EBCDIC_00037.


Investigation

In an AS400 job, type this command in the Process tab: 
:SET &RET# = WRITE_PROCESS(&XMLR#,"&TMPDIR#&XMLCNV#O",&$AGENT#,&$LOGIN#,OVERWRITE,EBCDIC_00037,"CCSID=37") 

Results 
In the second line the exclamation “!” gets converted to a pipe “|”. 
And this caused the program reading the file to fail. 

 
Environment:
OS Version: N/A
Cause:
Cause type:
By design
Root Cause: The AS400 agent is workig as intended and is translating the codepages correctly.
Resolution:
The AS400 agent is working as intended. It is translating the codepages correctly.
The reason why a different codepage is being used instead of the default, is because it depends on the operating system's current settings.
Thus, there is no fix for this since there are workarounds to bypass the issue.


Fix Status: No Fix

Fix Version(s):
N/A
Additional Information:
Workaround :
  1. Use EBCDIC_01141. 
Not sure why this worked because it still writes the exclamation incorrectly as a “Ü”. But the program reading the file does not have an issue with it. 
 
  1. In Client 0, copy EBCDIC_00037 to EBCDIC_TEST then switch the exclamation and the pipe.