Skip to main content

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

C/C++ Doesn't Allow Instream Compiles with CSECT option

 Technote (troubleshooting)
 
Problem(Abstract)
CBC3575 or CBC1742 Csect option is ignored due to naming error.
// EXEC PGM=CCNDRVR,PARM=CSECT
//SYSIN DD *
#pragma csect(CODE,"hello")
Before the pragma is used by the compiler, the compiler tries to assign a name by looking at the input data set name.
 
Cause
The compiler can't deduce a name from the SYSIN DD * so it gives that error and quits. There is no warning in the C/C++ Language reference book or in the C/C++ User's Guide against this. The CSECT compiler option is processed first and fails because of the absence of a qualifer, the #pragma does not have a chance to be processed and override. Therefore, the CSECT option should not be used without a qualifier when dealing with inline source. In this case, either an explicit qualifier should be used with the CSECT option or NOCSECT should be used for the #pragma to come into effect. As the order of CSECT processing is documented in the C/C++ User's Guide, this behaviour is correct.
 
Resolving the problem
Use compile option CSECT(hello), with or without the #pragma csect, or to use NOCSECT with the #pragma csect.
Do you need more help?

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

 
Related information
#prama csect
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Software DevelopmentOS/390 C/C++ OS/3902.10.0
 
Historical Number
BDC000027917
 
 

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++
 Operating system(s):
  z/OS
 Software version:
  1.6, 1.7, 1.8, 1.9
 Reference #:
  1143494
 IBM Group:
 Software Group
 Modified date:
 2003-10-29

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.