Module 16: Language Environment and LE callable services
Language Environment and LE callable services
- Language Environment(LE) is a set of standard callable routines and run-time options that can be used by all the high level applications written in C, COBOL or PL/I.
- LE enables development of mixed-language applications by facilitating easier and robust inter-language communication.
- Language Environment callable services make many types of programming tasks easier. You call them by using the CALL statement.
- LE callable services provides routines which can help you in following task:-
- Date and time calculation and conversion
- Current local date and time can be converted in several formats
- Making Math calculations
- Math functions such as logarithmic, exponential, trigonometric, square root etc. can be done using LE callable services. Intrinsic function also provides similar functions.
- Handling conditions
- Few LE services enable COBOL applications to react to unexpected errors
- You can use language constructs or runtime options to select the level at which to handle each condition
- Managing Dynamic storage
- These kind of services allows you to get, free, and reallocate storage. It also allows to create your own storage pools.
- Run-time message handling
- These kind of services allows getting, dispatching and formatting messages. Non-CICS messages can be directed to files/printers. CICS messages are directed to a CICS transient data queue
- Notional language support
- These kind of services makes it simpler for your applications to support the language that your application user needs
- Date and time calculation and conversion
- Some mostly used callable services are listed below:-
Service | Purpose |
---|---|
CEECBLDY | To convert a string that represents a date into COBOL integer date format, which represents a date as the number of days since 31 December 1600 |
CEEDATE | To convert a number representing a Lilian date to a date written in character format. It returns a character string, such as “1991/03/22”. |
CEEDATM | To convert a number representing the number of seconds since 00:00:00 14 October 1582 to a character string format. It returns a character string, such as “1992/07/26 14:23:00”. |
CEEDAYS | To convert a date to Lilian format. (number of days since 14-Oct-1582) |
CEEDYWK | To calculate the day of the week on which a Lilian date falls. The day of the week is returned to the calling routine as a number between 1 and 7. The number returned by CEEDYWK is useful for end-of-week calculations. |
CEEGMT | To get current Greenwich Mean Time (GMT) as both a Lilian date and as the number of seconds since 00:00:00 14 October 1582 |
CEEGMTO | To get difference between GMT and local time |
CEELOCT | To get the current local date and time in three formats:- § Lilian date (the number of days since 14 October 1582) § Lilian seconds (the number of seconds since 00:00:00 14 October 1582) § Gregorian character string (in the form YYYYMMDDHHMISS999) |
CEESCOL | To compare two character strings based on collating |
CEESIABS | To calculate the absolute value of an integer |
CEESSNWN | To calculate the nearest whole number for a single-precision floating-point number |