Symbolic parameters used with COBOL generation

Symbolic parameters are variables that are replaced with values at generation time. They can be used in the following places:
There are three types of symbolic parameters:
Predefined symbolic parameters that are set automatically
These are substitution values for predefined symbols which are automatically set at generation, based on the part that is being generated or other information available during the generation process. The value for these symbols cannot be changed.
Predefined symbolic parameters that can be set by the user
There are certain predefined symbols that are used in the build scripts and templates, and you can set these at generation time. In addition, there are a few predefined symbols that you can set that affect the generated COBOL code. These symbolic parameters are used for information that is required for most customers, but that generally has a unique value for each customer. For example, the name of the data set that contains the COBOL compiler generally varies for each customer. For information about these types of parameters, see Predefined symbolic parameters that can be set by the user.
User-defined symbolic parameters
You might need to customize any of the following for your target runtime environment:
  • EGL-provided build scripts
  • EGL-provided runtime JCL templates for z/OS or runtime CL templates for iSeries
  • Bind control part to be used as a template for binding packages
  • Link edit part to be used as a template
When you customize any of the above, you might need to add additional steps or processing. Some of your additions might require variables that can be modified at generation time. To do this, you can create or modify user-defined symbolic parameters, by using the EGL Build Parts Editor to specify values for the symbolic parameters in your build descriptor. Then you can refer to these user-defined symbolic parameters in your build scripts or templates

Both predefined and user-defined symbolic parameters are available as substitution variables in the build scripts used to prepare COBOL output. At COBOL build time, EGL passes all symbolic parameters to the build server. The passed values provide the values for build-script substitution variables of the same name, overriding the default values (if any) for those substitution variables. For details, see Modifying EGL build scripts for z/OS, and the IBM® Rational® Business Developer EGL Server Guide for IBM i.

You can specify the values for some predefined symbolic parameters. You can also define your own symbolic parameters, in addition to the predefined symbolic parameters, and for each such parameter you define, you assign a value. For example, the MYDIR symbolic parameter might contain the name of a directory. You cannot define the same symbolic parameter (like MYDIR) twice in the same build descriptor.

If the build descriptor you are using for generation uses the nextBuildDescriptor option to chain multiple build descriptors, and you define the same-named symbolic parameter in multiple build descriptors that are chained together, the value in use at generation time is determined by the precedence rules described in Build Descriptor part. The value assigned to the MYDIR symbolic parameter in the master build descriptor, for example, takes precedence over the value assigned to MYDIR in any other build descriptor.

Setting a language code page for your zSeries COBOL environment

You can use EGL build descriptor symbolic parameters to set your language code page for the zSeries.

In addition to the STRING and UNICODE data types that you can define in EGL, the language has internal literals defined as STRING. All of these STRING and UNICODE values are implemented in COBOL as PIC N, with the USAGE NATIONAL qualifier. In order for the COBOL compiler to correctly translate these PIC N values to Unicode values, it must know the codepage to use for the transformation. If your system programmers have not configured the CODEPAGE option for the COBOL compiler, or if the wrong page is specified, you may need to set the correct value yourself.

To do this in EGL, locate and open the build plan you use for COBOL generation. On the right hand side of the panel, you can enter generation-specific symbolic parameters that are passed to the build server. Add CODEPAGE(####) to any preexisting values for the COBLISTPARMS parameter, as in the following example:
COBLISTPARMS	LIST,NOOPT,CODEPAGE(1147)

Refer to your COBOL manuals for the correct value for the CODEPAGE parameter. The following table contains a partial list:

Table 1. Sample CODEPAGE values for zSeries COBOL
Value Language
420 Arabic
274 Belgium (old)
275 Brazilian Portugese
935 Chinese (Simplified)
1371, 937 Chinese (Traditional)
277 Danish
437 English (Australian)
1146, 285 English (UK)
1140, 437 English (US)
278 Finnish
1147, 297 French
273 German
875 Greek
424, 803 Hebrew
1149, 871 Icelandic
1144, 280 Italian
1390, 290, 930, 939 Japanese
1364, 933 Korean
1153, 870, 1148, 500 Latin
277 Norwegian
1156 Russian (Baltic)
1025, 1158 Russian (Cyrillic)
1122, 1157 Russian (Estonian)
1112 Russian (Latvian)
1112 Russian (Lithuanian)
1123, 1158 Russian (Ukranian)
1145, 284 Spanish
278 Swedish
838 Thai
1026 or 1155 Turkish

Examples

You can use symbolic parameters in the values for the genDirectory and the destDirectory build descriptor options, in build scripts, in templates, or in the link edit or bind control parts.

When using symbolic parameters in the genDirectory and destDirectory build descriptor options, reference the value of a symbolic parameter by delimiting the parameter name with percentage signs (%). For example, if you want to refer to the time at which generation occurs, use the following code:
 %EZEGTIME%

You can also use more than one symbolic parameter to assign a value. For example, the following symbols represent date and time, separated by a space:

        %EZEGDATE% %EZEGTIME%

For example, if genDirectory is set to C:\MyProject\%EZEENV%, and the system build descriptor option is set to ZOSCICS, then generation output will be written to C:\MyProject\ZOSCICS.

When using symbolic parameters in build scripts, reference the value by preceding the symbolic parameter name with an ampersand (&) and appending a period (.) to the parameter name:
        &EZEGDATE.
For example, consider the situation in which a build script includes the following line:
//EZESRC   DD DSN=&MYHLQ..;&SYSTEM..EZESRC;,DISP=SHR
If you set the system build descriptor option to ZOSCICS and set the MYHQL user-defined symbolic parameter to the value MYQUAL, then the resulting line in the build script is the following:
//EZESRC   DD DSN=MYQUAL.ZOSCICS.EZESRC,DISP=SHR

Feedback