Detail View 2005

Datum

04.05.2005

MM/DD/YYYY

Keywords

Comparing application encoding CCSID to terminal emulator CCSID

Comparing application encoding CCSID to terminal emulator CCSID

Problem
This technote contains pseudocode for a local application to compare the application encoding CCSID to their terminal emulator CCSID.
Solution
1. Get the ZTERMCID from ISPF
A. Use ISPF ISPLINK to VDEFINE and VGET ZTERMICID to an application variable called TCCSID

DCL TCCSID CHAR(5);          /* TERMINAL CCSID */
            CALL ISPLINK('VDEFINE','ZTERMCID',TCCSID,'CHAR',
                   LENGTH(TCCSID));
            CALL ISPLINK('VGET   ','ZTERMCID','SHARED  ');
B. If TCCSID is blank, issue error message and quit routine

2. Get the current application encoding scheme of the application A. Use SQL to get the current application encoding scheme

DCL CAES CHAR(5); /* CURRENT APP ENCODING SCHEME */
          EXEC SQL SET :CAES = CURRENT APPLICATION ENCODING SCHEME; B. If SQLCODE ne 0, issue error message and quit routine

3. Compare the results
A. You need to compensate for the fact that TCCSID has leading zeros and CAES doesn't B. If they don't match, issue a warning or error message


P.S. Please pass my address to anyone interested in DB2 HOTLINE - thank you.

With kind regards
Michael Dewert, Software GroupTechnical Sales DB2

DB2 ist ein Produkt der
IBM Corporation. Bitte
Copyright-  und Trademark-Hinweise beachten!

© Gernot Ruban