Use embedded help of the z/OS XL C/C++ compiler under z/OS UNIX
FangLu 2700058AGP Visits (6665)
When you use z/OS XL C/C++, can you always remember which option to use? Do you find it troublesome to browse hundreds of pages of a user manual in order to find the right option? Then, you might wonder if there is a way to get the compiler option or command information conveniently and quickly. The answer is yes, use the compiler embedded help!
What information can be found in XL compiler embedded help
There are two types of XL compiler embedded help information: utility reference and xlc help.
You can find reference information for the following utilities:
The xlc utility reference includes the following information:
You can find the following information in the xlc help:
What does z/OS XL compiler embedded help look like
The z/OS XL C/C++ compiler embedded help is in plain text format. Indentation is used to improve readability.
Example of xlc utility reference
Below is a portion of xlc utility reference.
Example of xlc help file
Below is an example of option description in the xlc help.
How to invoke embedded help
You can view the utility reference by the following command under z/OS UNIX:
where utility_name can be one of the following:
To view the xlc help for option information, you can run the following command under z/OS Unix:
Note: the same xlc help is displayed for all these compiler invocation commands.
How to enable embedded help for the xlc utility
You must enable the embedded help for the xlc utility first before viewing the information. You must add the full directory path to the NLSPATH environment variable to read the embedded help.
Different commands are used to set the environment variables depending on the shell you are using. The supported shells include:
To determine the current shell, use the following echo command:
Setting environment variables in sh shell
You can use the following commands to set environment variables in the sh shell:
export LANG NLSPATH PATH
To set the variables so that all users have access to them, add the commands to the file /etc/profile. To set them for a specific user only, add the commands to the .profile file in the user's home directory. The environment variables are set each time the user logs in.
Setting environment variables in tcsh shell
You can use the following commands to set environment variables in the tcsh shell:
setenv LANG En_US
setenv NLSPATH /usr
setenv PATH /bin
To set the variables so that all users have access to them, add the commands to the file /etc/csh.cshrc. To set them for a specific user only, add the commands to the .tcshrc file in the user's home directory. The environment variables are set each time the user logs in.
The LANG environment variable specifies the national language for message and help files and can be set to any of the locales provided on the system:
The national language code for United States English may be En_US or C. If the Japanese message catalog has been installed on your system, you can substitute Ja_JP for En_US.
The NLSPATH environment variable specifies the path name of the message and help files.
To determine the current setting of the national language on your system, see the output from both of the following echo commands:
The LANG and NLSPATH environment variables are initialized when the operating system is installed, and may differ from the ones you want to use.
How to find information in embedded help
The z/OS XL C/C++ embedded help is in plain text format, so you can search for any string and then locate the occurrences. Here are some useful commands:
When you are viewing embedded help with multiple pages, press “Enter” to display the next page, or enter “q” then “Enter” to quit viewing embedded help and return to the command line.
If you have not yet used the embedded help to look up the information about the XL compiler options and commands under z/OS® UNIX, we bet you would love to give it a try after you learn about it here. Let us know what you think of the embedded help after you use it!
z/OS XL C/C++ User's Guide: http