SQL Option allows you to create XDB locations that emulate all the various mainframe EBCDIC code pages. When you access these locations with SQL Wizard or a COBOL program, your data in these locations appears identical to the data on the mainframe.
The five steps necessary to ensure complete compatibility with the mainframe and/or your COBOL development system are as follows:
Typically, you would use the mainframe's code page. (If you do not know what it is, you may be able to use XDB Link to find out.) If you do not have a mainframe, you can choose whichever code page you prefer.
Use SQL Wizard's Create Location dialog box. Pick the EBCDIC code page you want in the Sort Sequence box.
When you compile a COBOL program with Studio Enterprise Edition, it can be associated with a particular EBCDIC code page.
Use the Gateway Profile utility to define your DB/2 locations to the PC software, then specify the single Workstation Code Page as 911 (in the local Workstation Configuration). Next, use SQL Wizard to access the DB/2 location on the mainframe. A file named cpg_info.txt is created in the %ProgramFiles(x86)%\Micro Focus\Studio Enterprise Edition x.x\base\bindirectory by default, identifying the EBCDIC code page of the DB/2 location on the mainframe. The following table defines this EBCDIC code page number:
If you have XDB Link for the mainframe, there are two ways to do this: using Migrate or using SQL Wizard.
If you don't have XDB Link for the mainframe, extract the data from the mainframe into a file with DSNTIAUL format, then import the data into your local EBCDIC location using SQL Wizard's import function, citing the appropriate EBCDIC to ANSI code page translation.
XDB EBCDIC databases are stored using the default OEM character set for your machine (typically, code page 437 in the United States, or code page 850 almost everywhere else). The names of database objects such as tables and indexes are also validated using this character set. You can optionally specify that database object-names should be validated using any of the following character sets if, for example, you want to use accented characters in the names:
To specify that an XDB Server should use one of the supported code pages for name validation, you must add two lines to the xdb.ini file in %ProgramFiles(x86)%\Micro Focus\Studio Enterprise Edition x.x\mfsql\cfg:
[SERVER] XDBCP=codepage
where codepage is the three-digit number of the code page you require.
Where a location has been created as an EBCDIC location (for example, the default location, MAINTAIN), data is automatically converted to EBCDIC before it is passed to the client application. Conversion between ASCII data on the PC and EBCDIC data on the mainframe is handled by the DB2 Link gateway if you are using the Migrate utility. If you are using the data import and export facilities in SQL Wizard, you can control the conversion used by choosing the DSNTIAUL data format and selecting an appropriate code page conversion. See the topics Import/Export NSL Considerations for more information.
For information about EBCDIC conversions and the Data File Converter, see the topic Converting Data Files.