Please refer below for more details -
Versions:
---------
CICS Transaction Server Version: 4.2.0
z/OS version : 1.13
COBOL compiler : IBM Enterprise COBOL for z/OS 4.2.0
1. Used the IBM provided sample exit CICSTS42.CICS.SDFHSAMP(DFH$REQC) as model, and changed the references to 'DFH$REQC' as references to 'MYEXIT'.
2. Copied the above member into a private library and renamed it to MYEXIT
3. Assembled and linkedited MYEXIT using a proc modeled after DFHEITAL of CICSTS42.CICS.SDFHPROC
4. Wrote a driver program in COBOL named MYDRVR, relevant code is given below -
WORKING-STORAGE SECTION.
77 WS-GALEN PIC S9(8) COMP VALUE 168.
01 WS-GAREA PIC X(168) VALUE SPACES.
...
......
EXEC CICS
ENABLE PROGRAM('MYEXIT') EXIT('XFCSREQC')
GALENGTH(WS-GALEN) NOHANDLE
END-EXEC.
EXEC CICS
EXTRACT EXIT PROGRAM('MYEXIT')
GASET(WS-GAREA)
GALENGTH(WS-GALEN) NOHANDLE
END-EXEC.
EXEC CICS
ENABLE PROGRAM('MYEXIT')
START NOHANDLE
END-EXEC.
.....
...
EXEC CICS
SET FILE('MYFL') OPEN ENABLED
END-EXEC.
....
.....
EXEC CICS
SET FILE('MYFL') CLOSED DISABLED
END-EXEC.
....
.....
EXEC CICS
DISABLE PROGRAM('MYEXIT')
STOP NOHANDLE
END-EXEC.
....
......
77 WS-GALEN PIC S9(8) COMP VALUE 168.
01 WS-GAREA PIC X(168) VALUE SPACES.
...
......
EXEC CICS
ENABLE PROGRAM('MYEXIT') EXIT('XFCSREQC')
GALENGTH(WS-GALEN) NOHANDLE
END-EXEC.
EXEC CICS
EXTRACT EXIT PROGRAM('MYEXIT')
GASET(WS-GAREA)
GALENGTH(WS-GALEN) NOHANDLE
END-EXEC.
EXEC CICS
ENABLE PROGRAM('MYEXIT')
START NOHANDLE
END-EXEC.
.....
...
EXEC CICS
SET FILE('MYFL') OPEN ENABLED
END-EXEC.
....
.....
EXEC CICS
SET FILE('MYFL') CLOSED DISABLED
END-EXEC.
....
.....
EXEC CICS
DISABLE PROGRAM('MYEXIT')
STOP NOHANDLE
END-EXEC.
....
......
5. Compiled and linkedited the driver program using IBM Enterprise COBOL for z/OS 4.2.0. Pre-compile and compile steps are given below -
//TRANSL EXEC PGM=DFHECP1$,REGION=4096K,PARM='COBOL2,SP,DEBUG'
//COMPILE EXEC PGM=IGYCRCTL,REGION=4096K,
// PARM='NODYNAM,LIB,OBJECT,RENT,APOST,LIST,TEST(SYM),NOOFFSET,MAP'
//COMPILE EXEC PGM=IGYCRCTL,REGION=4096K,
// PARM='NODYNAM,LIB,OBJECT,RENT,APOST,LIST,TEST(SYM),NOOFFSET,MAP'
7. Both the driver program, and the exit are defined with CONCURRENCY(THREADSAFE) in the CICS region
8. Both the driver program, and the exit are defined with EXECKEY(CICS) in the CICS region and also made sure that there is no parameter value in the region startup, that overrides this.
9. The file used is a KSDS, and is defined in the FCT with all the possible access rights set to be true
10. MYEXIT is NOT assembled and linkedited using LE option.
11. Resource definitions on the CICS region are as follows -
Transaction:
------------
Tra(TRA1) Pri( 001 ) Pro(MYDRVR ) Tcl( DFHTCL00 ) Ena Sta
Prf(DFHCICST) Uda Any Iso Bac Wai
Prf(DFHCICST) Uda Any Iso Bac Wai
---------------
Prog(MYDRVR ) Leng(0000028464) Cob Pro Ena Pri Ced
Res(000) Use(0000000030) Any Cex Ful Thr Cic Len
Res(000) Use(0000000030) Any Cex Ful Thr Cic Len
-------------
Prog(MYEXIT) Leng(0000001696) Ass Pro Ena Pri Ced
Res(000) Use(0000000029) Any Cex Ful Thr Cic Nat
Res(000) Use(0000000029) Any Cex Ful Thr Cic Nat
-----
Fil(MYFL ) Vsa Clo Dis Rea Upd Add Bro Del Sha
Dsn( my.file )
Dsn( my.file )
DFHAP0701 CICS1 An abend (code ---/ASRA) has occurred in exit program MYEXIT at exit point XFCSREQC.
DFHFC0001 CICS1 An abend (code ---/ASRA) has occurred at offset X'B136' in module MYEXIT.
DFHME0116 CICS1
(Module:DFHMEME) CICS symptom string for message DFHFC0001 is
PIDS/5655S9700 LVLS/670 MS/DFHFC0001 RIDS/DFHFCFS PTFS/UK75119 AB/UASRA ADRS/0000B136
DFHFC0001 CICS1 An abend (code ---/ASRA) has occurred at offset X'B136' in module MYEXIT.
DFHME0116 CICS1
(Module:DFHMEME) CICS symptom string for message DFHFC0001 is
PIDS/5655S9700 LVLS/670 MS/DFHFC0001 RIDS/DFHFCFS PTFS/UK75119 AB/UASRA ADRS/0000B136