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


How to run your program with Language Environment

Application programming on z/OS

Language Environment® offers flexibility in how your program runs.

After compiling your program you can do the following:
  • Link-edit and run an existing object deck and accept the default Language Environment runtime options
  • Link-edit and run an existing object deck and specify new Language Environment runtime options
  • Call a Language Environment service.

Accepting the default run-time options

To run an existing object deck under batch and accept all of the default Language Environment runtime options, you can use a Language Environment-provided link-edit and run cataloged procedure, CEEWLG, which identifies the Language Environment libraries that your object deck needs to link-edit and run.

Runtime library services

The Language Environment libraries are located in data sets identified with a high-level qualifier specific to the installation. For example, SCEERUN contains the runtime library routines needed during execution of applications written in C/C++, PL/I, COBOL, and FORTRAN. SCEERUN2 contains the runtime library routines needed during execution of applications written in C/C++ and COBOL.

Applications that require the runtime library provided by Language Environment can access the SCEERUN and SCEERUN2 data sets using one or both of these methods:
  • LNKLST
  • STEPLIB
Important: Language Environment library routines are divided into two categories: resident routines and dynamic routines. The resident routines are linked with the application and include such things as initialization and termination routines and pointers to callable services. The dynamic routines are not part of the application and are dynamically loaded during run time.

There are certain considerations that you must be aware of before link-editing and running applications under Language Environment.

Language

will find Language Environment's consistent condition handling services especially useful. For all languages the same occurs with common math services, as well as the date and time services.

Language Environment callable services are divided into the following groups:
  • Communicating conditions services
  • Condition handling services
  • Date and time services
  • Dynamic storage services
  • General callable services
  • Initialization and termination services
  • Locale callable services
  • Math services
  • Message handling services
  • National language support services.

Language

can be invoked by HLL library routines, other Language Environment services, and user-written HLL calls. In many cases, services will be invoked by HLL library routines as a result of a user-specified function. Following are examples of the invocation of a callable math service from three of the languages we have described in this section.

Figure 1 shows how a COBOL program invokes the math callable services CEESDLG1 for log base 10.

Figure 1. Sample invocation of a math callable service from a COBOL program
            77   ARG1RL  COMP-2.
            77   FBCODE  PIC X(12).
            77   RESLTRL COMP-2.
                 CALL "CEESDLG1" USING ARG1RL , FBCODE ,
                 RESLTRL.

Related reading: The callable services are more fully described in the IBM® publication, z/OS® Language Environment Programming Reference, SA22-7562.





Copyright IBM Corporation 1990, 2010