Application programming on z/OS
Previous topic | Next topic | Contents | Glossary | Contact z/OS | PDF


Programming languages on the mainframe

Application programming on z/OS

A computer language is the way that a human communicates with a computer. It is needed because a computer works only with its machine language (bits and bytes). This is slow and cumbersome for humans to use. Therefore, we write programs in a computer language, which then gets converted into machine language for the computer to process.

There are many computer languages, and they have been evolving from machine language into a more natural way of writing. Some languages have been adapted to the kind of application that they intended to solve and to the kind of approach used in the design. The word generation has been used to indicate this evolution.

A classification of computer languages follows.

  1. Machine language, the 1st generation, direct machine code.
  2. Assembler, 2nd generation, using mnemonics to present the instructions to be translated later into machine language by an assembly program, such as Assembler language.
  3. Procedural languages, 3rd generation, also known as high-level languages (HLL), such as Pascal, FORTRAN, Algol, COBOL, PL/I, Basic, and C. The coded program, called a source program, has to be translated through a compilation step.
  4. Non-procedural languages, 4th generation, also known as 4GL, used for predefined functions in applications for databases, report generators, queries, such as RPG, CSP, QMF™.
  5. Visual Programming languages that use a mouse and icons, such as VisualBasic and VisualC++.
  6. HyperText Markup Language, used for writing of World Wide Web documents.
  7. Object-oriented language, OO technology, such as Smalltalk, Java™, and C++.
  8. Other languages, for example 3D applications.
Each computer language evolved separately, driven by the creation of and adaptation to new standards. In the following sections we describe several of the most widely used computer languages supported by z/OS®:
  • Assembler
  • COBOL
  • PL/I
  • C/C++
  • Java
  • CLIST
  • REXX™.

To this list, we can add the use of shell script and PERL in the z/OS UNIX® System Services environment.

For the computer languages under discussion, we have listed their evolution and classified them. There are procedural and non-procedural, compiled and interpreted, and machine-dependent and non-machine-dependent languages.

Assembler language programs are machine-dependent, because the language is a symbolic version of the machine's language on which the program is running. Assembler language instructions can differ from one machine to another, so an Assembler language program written for one machine might not be portable to another. Rather, it would most likely need to be rewritten to use the instruction set of the other machine. A program written in a high-level language (HLL) would run on other platforms, but it would need to be recompiled into the machine language of the target platform.

Most of the HLLs that we touch upon in this section are procedural languages. This type is well-suited to writing structured programs. The non-procedural languages, such as SQL and RPG, are more suited for special purposes, such as report generation.

Most HLLs are compiled into machine language, but some are interpreted. Those that are compiled result in machine code which is very efficient for repeated executions. Interpreted languages must be parsed, interpreted, and executed each time that the program is run. The trade-off for using interpreted languages is a decrease in programmer time, but an increase in machine resources.

The advantages of compiled and interpreted languages are further explored in this section.





Copyright IBM Corporation 1990, 2010