Chapter 8. Using run-time options. IBM Version 8.5
Reklama
Reklama
Chapter 8. Using run-time options
Once you have prepared the executable form of your PL/I program, you need to test its execution behavior. The first step is to run the program and see what happens. Depending on the nature of your application, you might need to do some input and output setup (SET statements) before invoking the program.
Setting run-time environment variables
You can set the run-time environment for your program by using environment variables.
PATH
Use the PATH environment variable to specify the search path for EXE and CMD files not in the current directory.
set path=c:\ibm;d:\project
You can specify one or more directories with this variable. Given the preceding example, the current directory is searched first, followed by c:\ibm and then d:\project .
DPATH
Use DPATH to specify the search path for run-time messages. The program searches for them first in the current directory, then in the directory or directories specified by the DPATH variable. The following example would cause the program to search the current directory followed by c:\set1 and d:\set2 in that order.
set dpath=c:\set1;d:\set2
Specifying run-time options
Each time your application executes, a set of run-time options is established. These options determine some of the properties of the application's execution, such as allocation of storage and production of reports. IBM supplies defaults for each of the run-time options; however, you can change them as needed prior to running your application.
Where to specify run-time options
You can alter the default settings for run-time options in an environment variable and in the application source code. Alternatives, from lowest priority to highest priority, are: v
Using the IBM defaults
v
Setting run-time options in the CEE.OPTIONS environment variable
Use the SET command on the command line or define them in System
Properties to specify run-time options by means of the CEE.OPTIONS
environment variable. For example: set cee.options=natlang(enu)
As mentioned above, there are two methods for setting options in the
CEE.OPTIONS environment variable. The first method, setting CEE.OPTIONS in
System Properties has lower priority than the second, using the SET command.
© Copyright IBM Corp. 1998, 2012
207
Specifying run-time options
1.
Setting CEE.OPTIONS in System Properties
Run-time options specified in System Properties are the options in effect for every session you start. This is a good place to specify run-time options that you want to have in effect for every application you run.
If CEE.OPTIONS already exists in the System Properties, change or add to the existing variable.
2.
Run-time options specified in a SET command on the command line are in effect only for that session or window and override any run-time options specified in System Properties. This is the recommended method.
To change run-time option settings, use a SET command with the desired settings. Each SET command completely replaces any previous SET commands, including the definition in System Properties. Therefore, you must include the settings of all run-time options from any previous SET command if you still want them in effect in each subsequent SET command.
For example, assume you have the following in your System Properties: cee.options=natlang(jpn) and later enter this command from the command line: set cee.options=natlang(enu)
This means that NATLANG has returned to its default value, which is
NATLANG(ENU).
To return all run-time options to the IBM-supplied defaults, set
CEE.OPTIONS to a null argument: set cee.options=
With Windows, you can group several commands, including a SET command for CEE.OPTIONS, in a command file. Running such a command file is equivalent to issuing each of the commands individually on the command line.
Specifying multiple run-time options or suboptions
When specifying a string of run-time options, you must separate each option with a comma without any embedded spaces.
Use commas to separate suboptions of run-time options. If you do not specify a suboption, you must still specify the comma to indicate its omission. Trailing commas are not required. If you do not specify any suboptions, the defaults are used. For example, NATLANG() is valid syntax.
Default settings for the options are indicated in the options syntax diagrams or in the descriptions of suboptions, where applicable.
Run-time options
This section describes the run-time option NATLANG.
NATLANG
The NATLANG option specifies the national language to be used for run-time messages. Message translations are provided for Japanese and mixed-case U.S.
English. NATLANG also determines how the message facility formats messages.
208
PL/I for Windows Programming Guide
Run-time options
NATLANG (
ENU
JPN )
JPN
This is a 3-character id specifying Japanese. Message text can be a mixture of
SBCS (single-byte character set) and DBCS (double-byte character set) characters.
ENU
This is a 3-character id specifying mixed-case U.S. English. Message text is made up of SBCS characters and consists of both upper and lowercase letters.
USAGE: NATLANG(ENU)
Run-time option and storage reports, as well as dump output, are written only in mixed-case U.S. English.
If you specify a national language that is unavailable on your system, the default is used.
Shipping run-time DLLs
If you are shipping DLLs with your application, this list should help you determine which ones you need based on your application.
For Windows, the following files are needed for a non-multithreading application: v
BIN\HEPWS20.DLL
v
BIN\IBMWS20.DLL
v
BIN\IBMWSTB.DLL
v
BIN\IBMWS20F.DLL
v
BIN\IBMWS20G.DLL
v
BIN\IBMRTENU.DLL
These files are needed for multithreading applications on Windows: v BIN\HEPWM20.DLL
v BIN\IBMWM20.DLL
v BIN\IBMWMTB.DLL
v
BIN\IBMWM20F.DLL
v
BIN\IBMWM20G.DLL
v
BIN\IBMRTENU.DLL
In addition to those listed previously, if your Windows application uses BTRIEVE, you must also ship BIN\IBMPBTRV.DLL.
Your application containing a copy of any of these files or modules must be labeled as follows:
CONTAINS
IBM PL/I for Windows Version 8.5
Runtime Modules
(c) Copyright IBM Corporation 2012
All Rights Reserved
Chapter 8. Using run-time options
209
Shipping run-time DLLs
210
PL/I for Windows Programming Guide
Pobierz
Reklama