Monday, August 07, 2006

A new CEMT program in COBOL to start and stop CICS

CICS is more than 30 years old, but it now supports applications written in C++ and Java, and it allows a single application image to be spread over several computer systems. To achieve such youthful longevity, CICS has undergone many transformations. IBM mainframe products get three levels of version number within a distinct named product. CICS is on its third distinct product name, and its fifth high-level version number. It has been maintained at two different IBM facilities since first being marketed. An OLTP manages transactions that exhibit the following four ACID properties, as explained in Gray & Reuter’s book (1993): Atomicity, Consistency, Isolation, and Durability. Although CICS did not have functions like journalling to support all of these properties at first, it did have them very early in its life. Like any OLTP, CICS has to interact with telecommunications networks, database managers, different programming languages, and the features and constraints of operating systems. Another way to look at CICS is that it allows a large number of users to share a relatively small number of resources with data integrity. The first versions of CICS were developed in a former IBM facility near Chicago. In 1973, IBM moved CICS development to Hursley, a village near Winchester, UK, where it has remained ever since. Today, no on-line system could survive without some way to access the World Wide Web. IBM introduced the CICS Web Interface product in 1996. Since then, there have been various solutions and enhancements to CICS to allow applications to interact with Web browsers. The latest version, CICS Transaction Server for OS/390 Version 2.2, allows legacy application programs to interact with Web browsers as if they were 3270 terminals, and it allows new programs to present a modern interface on Web browsers. To help customers give legacy applications a new look on the World Wide Web, the CICS team created the Front End Programming Interface (FEPI) in CICS/ESA Version 3.3 in 1992. FEPI allows a CICS transaction to emulate a 3270 terminal. The idea is to write a new FEPI transaction to sit between a legacy CICS application and a Web server. That way, the legacy application, which was written for 3270 terminals, can continue to run unchanged. I wrote a simple COBOL program to start and to stop CICS.
HOW TO INSTALL XCEM CEMT Submit the following job to compile the source program: //SRSTXCEM JOB SRS1ØØ44,SYSTEMES,CLASS=G,MSGCLASS=T,NOTIFY=&SYSUID // EXEC DFHC3LCL, //* INDTG=ESS, //* DEBUG=OUI, // SP=',SP', // OUTC=T //LIBR.SYSIN DD * -OPT LIST -DLM SRSTXCEM -ADD SRSTXCEM,SEQ=/81,6,1,1/ IDENTIFICATION DIVISION. PROGRAM-ID. SRSTXCEM. ********************** F U N C T I O N ************************** * * * stop CICS * * * ***************************************************************** ****************************** ****************************** * *cics stop command ***************************************************************** ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. 77 W-DEBUT PIC X(8) VALUE 'SRSTXCEM'. 77 W-RETOUR-LIB PIC X(9) VALUE 'EIBRESP->'. 77 W-RETOUR PIC S9(8) COMP VALUE +Ø. 77 W-EIBFN-LIB PIC X(9) VALUE ' EIBFN ->'. 77 W-EIBFN PIC X(2) VALUE SPACES. Ø1 W-ANO-CN. Ø5 W-APPLID PIC X(8). Ø5 FILLER PIC X. Ø5 FILLER PIC X(5Ø) VALUE 'UTILIZATION OF XCEM FOR - ' NON AUTHORIZED USERS ('. Ø5 W-USERID PIC X(8). Ø5 FILLER PIC X(7) VALUE ') TERM('. Ø5 W-TERM PIC X(4). Ø5 FILLER PIC X VALUE ')'. Ø1 W-PARAM. Ø5 W-TRANS PIC X(4). Ø5 FILLER PIC X(76) VALUE SPACES. * PROCEDURE DIVISION. * *1- ANALYSE COMMAND ....... * 1ØØ-INIT. IF EIBTRMID(1:2) NOT = 'CN' MOVE EIBTRMID TO W-TERM EXEC CICS ASSIGN APPLID(W-APPLID) END-EXEC E XEC CICS ASSIGN USERID(W-USERID) END-EXEC EXEC CICS WRITE OPERATOR TEXT(W-ANO-CN) CRITICAL END-EXEC EXEC CICS RETURN END-EXEC END-IF EXEC CICS RECEIVE INTO(W-PARAM) RESP(W-RETOUR) END-EXEC MOVE 'CEMT' TO W-TRANS EXEC CICS XCTL PROGRAM('DFHEMTP') INPUTMSG(W-PARAM) INPUTMSGLEN(LENGTH OF W-PARAM) END-EXEC. -END /*
XCEM CEMT will run on any CICS from Version 4.1 upwards. Copy the member XCEM to a loadlib in the DFHRPL list of your desired CICS region. Enter the following commands, into either CEDA or the batch program DFHCSDUP:
DEFINE TRANSACTION(XCEM) GROUP(XCEM) DESCRIPTION(XCEM CEMT) PROGRAM(XCEM) TASKDATALOC(ANY) PRIORITY(255) DEFINE PROGRAM(XCEM) GROUP(XCEM) DESCRIPTION(XCEM CEMT) LANGUAGE(ASSEMBLER) DATALOCATION(ANY)
The transaction name can be changed, but should start with ‘C’ to allow it to run at Maxtasks. Use CEDA to install the group XCEM. Enter the transaction XCEM and enjoy! Claude Dunand Systems Programmer (France) This article was reprinted with permission.
©

0 Comments:

Post a Comment

<< Home