C and C++ can be compiled and executed using either JCL or Unix System Services shell. C and C++ in the z/OS environment can read, write, and update any of the z/OS data sources. Standards compliance with support for international C and C++ programming language standards and GNU C/C++ compatibility extensions for ease of application migration to z Systems.
The IBM z/OS XL C/C++ compiler exploits the latest z/Architecture, including the latest IBM z13 servers. It enables development of high-performing business applications and system programs on z/OS, while maximizing hardware use and improving application performance. It works in concert with z/OS problem determination tools.
C language source code, CPGM, will require corrections to write to the respective JCL DDNAME. CPGM will read a record from a Unix file and write the record to P3.OUTPUT(#06).
Edit CC#####.JCL(CPGM). The JCL to compile the source is the first 3 lines. At the bottom are the JCL statement to execute the compiled C program.
Several corrections are required. If you submit and review the output, the first problem is a compile failure. The SYSOUT DDNAME from C StepName explains that a name in the program was either not found or declared in the C program. Review the output. Study the "name" in the program. You will determine the problem is related to a misspelled name.
Upon successful compile, the execution fails. Review the EXECCPGM StepName output. Review the JCL DDNAME read by the program. Once the program source is corrected and successful executes, then a record from /u/public/message is written to P3.OUTPUT(#06).