To establish a character set, you can do any of the following:
The character set is preserved for the duration of the session (until a QUIT), not just for the logon.
You can establish a character set in one of the following ways:
You do not need to issue the command when you log on to BTEQ. Issue the command before you run the operation that needs to be in a particular character set. This user‑specified character set will override all other character sets previously specified or placed in default.
For example:
.SET SESSION CHARSET 'KANJIEBCDIC5035_0I'
At logon, for example, if the logon string is normally in the form:
BTEQ .LOGON tdpid/user,password
you could modify it to use KanjiEBCDIC as follows:
BTEQ .SET SESSION CHARSET 'EBCDIC';
.LOGON tdpid/user,password
Note: The .SET string must precede the .LOGON string.
This takes second precedence.
If an application relies on the DBC.Hosts table for the default character set name, you must ensure that the initial logon from the mainframe-attached side is in KanjiEBCDIC; otherwise, the default character set cannot be known to the application before logon.