Skip to main content

Software  >  Software Development  >  C and C++ Compilers  >  

Customizing C/C++ Default Compiler Options

 Technote (troubleshooting)
 
Problem(Abstract)
Documentation in Program Directory or Users Guide is not clear on exactly how to update C Default Compiler options.
 
Cause
The comments are wrong. A trailing blank is required.
 
Resolving the problem
The following information is to clarify how to customize the C compiler options.

CUSTOMIZING DEFAULT OPTIONS FOR C/C++ COMPILER

This is for customers who want to change the default options for the C/C++ Compilers shipped with z/OSĀ®. Usermods CCNHOPT in CBC.SCCNJCL(CCNJHOPT), CCNHOPX within CBC.SCCNJCL(CCNJHOPX), CCNJOPT within CBC.SCCNJCL, and CCNJOPX within CBC.SCCNJCL contain misleading comments as in the following example:

CCNEO0HC CSECT                                                        
CCNEO0HC RMODE ANY                                                    
CCNEO0HC AMODE ANY                                                    
* YOU CAN EITHER CODE THE LENGTH IN THE FULLWORD BELOW, OR            
* NULL TERMINATE THE STRING WITH AN X'00' AS SHOWN                    
       DC    F'0'                                                      
       DC    C'HALT(16) '                                              
       DC    C'SEARCH(/USR/INCLUDE/) '                                
       DC    X'00'  (NULL-TERMINATE THE STRING)                
       END

The comments are incorrect. The compiler does not use the DC F'0' as the length of the option string. Do not remove the DC F'0' as it is required for the compiler to process the options correctly.The DC X'00' at the end of the options string is also required.

Options can be added by inserting a DC C'option ' anywhere between the DC F'0' and the DC X'00'. Note that the space after the option is required as a separator. The C/C++ Users Guide (SC09-4767) contains a detailed description of the options available. Members CBCHJOPT, CBCHJOPX, within CBC.SCBCJCL also contain the same comments and in addition do not have a space after the HALT option:
Wrong: DC  C'HALT(16)'

Right:  DC  C'HALT(16) '

See the related information to locate the online manuals and program directories for your release of the z/OS or OS390.

Do you need more help?

For additional assistance, contact IBM Rational Client Support:
Submit a Service Request (SR)

 
Related information
Bookshelves for C/C++ Manuals
z/OS 1.7 Users Guide Entry
z/OS 1.8 Users Guide Entry
z/OS 1.9 Users Guide Entry
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Software DevelopmentOS/390 C/C++InstallOS/390, z/OS2.10.0, 2.9.0
 
 

Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.
Rate this page
Please take a moment to complete this form to help us better serve you.
This material provides me with the information I need.




This material is clear and easy to understand.




Did the information help you to achieve your goal?
What updates, improvements, or related information would you like to see in this document?
Your response will be used to improve our document content. Requests for assistance, if applicable, should be submitted through your normal support channel as we cannot respond from this site.
Input the verification number to submit feedback:
Document information
 Product categories:
 Software
 Software Development
 Traditional Progamming Language & Compilers
 OS/390 C/C++
 Install
 Operating system(s):
  z/OS
 Software version:
  1.6, 1.7, 1.8, 1.9
 Reference #:
  1054035
 IBM Group:
 Software Group
 Modified date:
 2004-06-22

Translate My Page
 
 

Rate this page

Help us improve this page. Your response will be used to improve our document content. Requests for assistance, if applicable, should be submitted through your normal support channel as we cannot respond from this site.