Command Level - CICS programming interface
Command Level is the standard application programming interface (API) for developing programs that run under CICS Transaction Server. It provides a high-level, language-independent way for application programs to request CICS services, such as accessing files, managing transactions, and communicating with other programs. It abstracts the complexities of the underlying CICS control blocks and system services, making CICS application development more straightforward and maintainable. CICS Command Level is the standard application programming interface (API) used to develop online transaction processing (OLTP) applications within the IBM CICS Transaction Server environment. It provides a high-level, language-independent set of commands that allow application programs to interact with CICS services and resources. This interface abstracts the complexities of CICS internals, making application development more straightforward and portable.
Key Characteristics
-
- High-Level API: Provides a set of structured commands (
EXEC CICS ... END-EXEC) that abstract the complexities of direct CICS system programming, simplifying application development. - Language Independence: Supported across various programming languages including COBOL, PL/I, C/C++, and Assembler, allowing developers to choose their preferred language while interacting with CICS.
- CICS Translator: Programs written with Command Level statements are first processed by the CICS translator (e.g.,
DFHECP1$), which converts theEXEC CICScommands into host language calls (e.g.,CALL 'DFHEI1' ...) before standard compilation. - Executive Interface Block (EIB): Each CICS program has an associated
DFHEIBLK(EIB) that contains information about the current task, such as transaction ID, terminal ID, and response codes from CICS commands. - Error Handling: Offers robust error handling mechanisms through
HANDLE CONDITIONstatements or, more commonly and efficiently, by checking theRESPoption on individual commands for specific return codes. - Replaced Macro Level: Largely superseded the older, more complex, and less portable Macro Level CICS programming interface, which required direct manipulation of CICS control blocks and was tightly coupled to Assembler.
- High-Level API: Provides a set of structured commands (
Use Cases
-
- Developing New CICS Applications: The primary method for building modern CICS online transaction processing (OLTP) applications that interact with users via 3270 terminals, web interfaces, or mobile front-ends.
- Modifying and Maintaining Existing CICS Programs: Enhancing or maintaining existing CICS applications, as virtually all modern and many legacy CICS programs utilize Command Level.
- Interacting with CICS Resources: Performing operations like reading/writing to VSAM KSDS files (
EXEC CICS READ FILE,WRITE FILE), accessing DB2 or IMS databases, or managing temporary storage queues (TSQ) and transient data queues (TDQ). - Program Control and Flow: Linking to other CICS programs (
EXEC CICS LINK), transferring control (EXEC CICS XCTL), or returning control to CICS (EXEC CICS RETURN) to manage application flow. - Terminal and User Interaction: Sending and receiving data from 3270 terminals (
EXEC CICS SEND,RECEIVE) using Basic Mapping Support (BMS) or interacting with web services via CICS Web Support.
Related Concepts
Command Level is intrinsically linked to CICS Transaction Server, acting as the primary interface through which application programs leverage CICS's capabilities as a high-performance transaction processing monitor. It works in conjunction with host programming languages (like COBOL) and the CICS Translator, which pre-processes the source code before standard compilation. The **Executive Interface Block (E