C Programming in z/OS

(a 5-day course)

Course objectives
The C programming language was developed in 1972 by Dennis Ritchie at Bell Laboratories; one of its first uses was in the rewriting of the UNIX operating system.
So, strictly speaking, C is a system programming language. However, it is also useful for application programming.
On completion of this course, the students will know how to use all C functionalities, i.e. both the application and the system related ones.

Since C is implemented on a wide variety of systems, it is a multi-platform programming language available in UNIX as well as in non-UNIX environments.
Unfortunately, there are multiple C standards: Classic C (also known as Kernighan and Ritchie C), IBM's SAA C, Common Usage C (a.k.a. XPG3 C), ANSI C (a.k.a. ISO C), and POSIX.1 C.
C89 and C99 refer to the first and second versions of the ANSI C standard.
On completion of this course, the students will know how to master the standard related issues.

Our course covers the latest IBM C compilers for z/OS, i.e. "z/OS C" and "z/OS XL C".
So, the course includes detailed coverage of C99 versus C89 and 64-bit addressing.
The course contents also includes IBM extensions such as record I/O, and the use of Language Environment (LE).
z/OS UNIX is a highly-reliable UNIX shell under z/OS.
z/OS UNIX allows UNIX programmers to develop new applications on the mainframe.
z/OS UNIX allows the porting of existing UNIX applications to the mainframe (server consolidation!).
z/OS UNIX is a prerequisite for Java, WebSphere Application Server, etc. in a z/OS environment.
The students will learn how to compile and execute C programs in z/OS batch, under TSO, and in the z/OS UNIX shell.
So, this course is also a solid introduction to UNIX in general and z/OS UNIX in particular.

When transporting a C application from one platform to another one, a lot of problems arise from environment dependencies.
Our course covers the implementation of characters (EBCDIC versus ASCII), fixed-point integers, and floating-point numbers (S/370 "hexadecimal" floating-points versus IEEE "binary" formats), the differences between big-endian and little-endian computers, the maximum number of significant characters in an identifier, etc., etc.

C++ and JAVA are object oriented languages derived from C.
If you want to fully exploit all C++ and JAVA functionalities, you should master the fundamental (i.e. C language) concepts.

Our course is both a C course for beginners and an advanced C course.

Audience
- z/OS system programmers
- Senior programmers/analysts

Prerequisites
You need a working knowledge of the z/OS environment and you should have mastered at least one other programming language (e.g. COBOL or REXX).

Class infrastructure
The students must have access to a z/OS system and logon under TSO.

Course contents
Declaration versus definition
Trigraphs and escape sequences
Preprocessor directives
ASA files
The C compiler listing
The various C standards (including an exhaustive discussion of the differences between C89 and C99)
Arithmetic types: integers, floating-points, and characters
Enumerations
Type conversion
Arithmetic, comparison, bitwise, logical and other operators
Signal handling
Operator precedence
Functions (including function prototyping)
Interlanguage communication (ILC)
Macros
Arrays
Pointers (including accessing system control blocks)
Complicated declarations
C versus REXX
if-else, switch, while, do-while, and for constructs
Conditional expressions
Recursivity and reentrancy
String, mathematical, utility, and other standard library functions
Passing arguments to the main function
Program execution under MVS batch, TSO, and OE
Text streams, binary streams, and record I/O
Standard streams and I/O redirection
File and terminal I/O
Structures, bit-fields, and unions
Language Environment (LE)
Storage class specifiers
External linkage
Residency mode (RMODE) and Addressing mode (AMODE), including 64-bit addressing
Dynamic allocation
Multitasking Facility (MTF)
System C Programming (SPC) facilty
Dynamic Link Library (DLL) support
Memory files
Packed-decimal support
Traps and pitfalls

[Back to my home page]
Valid HTML 4.01 transitional