Running the Demonstration [ Micro Focus COBOL for UNIX COBOL User Guide ] MPE/iX 5.0 Documentation
Micro Focus COBOL for UNIX COBOL User Guide
Running the Demonstration
This section describes how to run the NLS demonstration on DOS, Windows
and OS/2 environments and on UNIX environments.
1. Determine the appropriate extended character set for your
environment:
DOS, Windows and OS/2:
You must use the IBM PC character set.
UNIX:
Choose the character supported by your terminal display: ISO
8859-1 or IBM PC.
2. Edit the sortsub.cpy file to uncomment the level 78 item for the
character set you are using and comment out the line for the other
character set. For example if you are using the IBM PC character
set, comment out the level 78 item for ISO as follows:
*78 charset value "ISO".
78 charset value "IBMPC".
3. Compile the nlsdemo.cbl and nlssort.cbl source files.
DOS and OS/2:
On DOS and OS/2, enter the command lines:
cobol nlsdemo.cbl;
cobol nlssort.cbl;
Windows:
On Windows, enter the command lines:
cobolw nlsdemo.cbl;
cobolw nlssort.cbl;
If you have the add-on product Toolset, to compile nlsdemo and
nlssort, enter the following command lines:
cobol nlsdemo omf(gnt);
cobol nlssort omf(gnt);
then you don't need to link (that is, go to step 5).
UNIX
On UNIX, enter the command line:
cob nlsdemo.cbl nlssort.cbl
4. Link the compiled nlsdemo and nlssort files to either the shared
run-time system (coblib) or the static linked run-time system
(lcobol).
DOS:
To link nlsdemo and nlssort with coblib on DOS enter the following
command lines:
cob -x:r nlsdemo asciisrt
cob -x:r nlssort
To link nlsdemo and nlssort with lcobol on DOS, substitute -x:lr
for -x:r in the command lines above.
Windows:
To link nlsdemo and nlssort with coblib on Windows, enter the
following command lines:
cob -x:w nlsdemo asciisrt
cob -x:w nlssort
To linknlsdemo and nlssort with lcobol on Windows, enter the
following command lines:
cob -x:lw nlsdemo asciisrt
cob -x:lw nlssort
OS/2:
To linknlsdemo and nlssort with coblib on OS/2, enter the
following command lines:
cob -x:p nlsdemo asciisrt
cob -x:p nlssort
To link nlsdemo and nlssort with lcobol on OS/2, substitute -x:lp
for -x:p in the command lines above.
5. Set the LANG environment variable to the appropriate value for the
desired language, territory and codepage (on DOS, Windows and
OS/2) or to the NLS subsystem (on UNIX).
DOS, Windows and OS/2:
On DOS, Windows and OS/2, to specify a language of French, using
the default operating system values for territory and codepage,
enter the command line:
set lang=7
UNIX
On SCO UNIX, to specify a language of French, enter the command
line:
LANG=french_france.8859
export LANG
AIX:
On AIX, to use the ISO 8859-1 codeset for French, enter the
command line:
LANG=Fr_FR
export LANG
or to use the IBM PC codeset for French on AIX, enter the command
line:
LANG=fr_FR
export LANG
6. Run nlsdemo.
DOS, Windows and OS/2:
On DOS, Windows and OS/2, enter the command line:
nlsdemo
or if you have the add-on product Toolset, enter the command line:
run nlsdemo
\UNIX\On UNIX, enter the command line: <\
cobrun nlsdemo
The results of the sorts are displayed on the screen. The left-hand side
shows the sort done with the NONLS Compiler directive set; that is, the
ASCII collating sequence. The right-hand side shows the sort done with
the NLS Compiler directive set; that is, the NLS collating sequence. See
the section Typical Results for a sample of expected output from this
demonstration.
UNIX If your results do not match those shown in the
section Typical Results, then the UNIX system files
defining the collating sequence for that LANG
environment variable setting might be non-standard.
Your system administrator can modify these so that
they give the expected results.
MPE/iX 5.0 Documentation