C Programming in z/OS
(a 5-day course)
The C programming language was developped in 1972 by Dennis Ritchie at Bell Laboratories.
One of its first uses was in the rewriting of the UNIX operating system.
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.
On completion of this course, the students will know how to master the standard related issues.
C/370 is the generic name for the various C compilers for MVS, OS/390 and z/OS.
Our course covers the latest IBM C/370 compilers, i.e. "C for MVS/ESA", "OS/390 C" and "z/OS C" .
The course contents includes C/370 extensions such as record I/O and the use of Language Environment (LE).
Open Edition (OE) is a highly-reliable UNIX shell under MVS and OS/390.
It is a MVS/SP4.3.0 feature that became an integral part of MVS beginning with MVS/SP5.1.0.
By the way: the official use of the name MVS ends with SP5.2.2 - the subsequent issue is known as OS/390 version 1
release 1 -, and the successor of OS/390 V1R10 is z/OS V1R1.
Beginning with OS/390 V2R6, OpenEdition is known as UNIX System Services ("USS").
USS allows UNIX programmers to develop new applications on the mainframe.
USS allows the porting of existing UNIX applications to the mainframe (server consolidation!).
USS is a prerequisite for Java, WebSphere Application Server, etc. in a OS/390 or z/OS environment.
The students will learn how to compile and execute C programs in MVS batch, under interactive TSO, and under the USS
So, this course is also an introduction to USS and its facilities.
The students will learn how to access standard MVS data sets as well as UNIX files stored in the MVS Hierarchical File
When transporting a C application from one platform to another one, a lot (!) of problems arise from environment
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)
Our course is both a C course for beginners and an advanced C course.
- OS/390-z/OS system programmers
- Senior programmers/analysts
You need a working knowledge of the OS/390 or z/OS environment and you should have mastered at least one other
programming language (e.g. COBOL or REXX).
The students must have access to an OS/390 or 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
- Arithmetic types: integers, floating-points, and characters
- Type conversion
- Arithmetic, comparison, bitwise, logical and other operators
- Signal handling
- Operator precedence
- Functions (including function prototyping)
- Interlanguage communication (ILC)
- 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
- Using the Language Environment (LE)
- Storage class specifiers
- External linkage
- Residency mode (RMODE) and Addressing mode (AMODE)
- Dynamic allocation
- C/MVS Multitasking Facility (MTF)
- System C Programming (SPC) facilty
- Dynamic Link Library (DLL) support
- Memory files
- Packed-decimal support
- Traps and pitfalls