For this entry I thought I would discuss the use of the vast array of language environment callable services within LE-enabled HLASM routines.
Even though the manuals often only show examples of how to use these callable services with COBOL, C, or PL/1 - so long as the linkage and parameter configurations are honoured - these callable services can also be used by LE-enabled assembler routines.
Just as required with use of a callable service by a High Level Language (HLL) program, an LE-enabled assembler routine can setup the services parameters and then call the applicable service routine as described in the LE Programming Reference Guide.
This means all of the date/time, condition handling, memory management and messaging services can all be utilised within an LE-enabled assembler routine. The reason the services are restricted to LE-enabled assembler is that they require a language environment to be present to support the functions and services they use internally.
So what is an LE-enabled assembler routine? Simply put it is an HLASM routine that uses the provided LE macros to establish an environment, restricts use of general purpose registers 12 and 13 (for CAA and DSA addressability), sets up a dynamic storage area on the stack and identifies itself in an LE-conforming manner via the PPA macro. Each of the HLL compilers include a language-specific version of a PPA so any assembler routine needs to include one as well.
So by using the CEEENTRY/CEETERM/CEEDSA/CEECAA and CEEPPA macros in your assembler routine (which will provide all the required setup for your HLASM routine) you effectively make it LE-enabled. Then you can exploit any number of the available LE callable services within your assembler routine to provide date/time formatting, manipulation/calculations, storage management along with condition handling features. All without needing to use low-level operating system services. And each of these services would be very similar to how they would be used within an HLL program. Where it is documented as so and applicable to the service being invoked, the service can be utilised in either the BATCH or CICS environments.
By making your HLASM routines LE-enabled you then expand the capabilities of your HLL programs by now enabling your HLASM routines to be exploited and utilised from within a language environment HLL program.