Joined: 20 Jun 2005 Posts: 86 Location: Chennai, India
There may be other utilities available as well, but in my shop we use CAFC (CICS application file control), marketed by NETEC Inc. This will facilitate user listings or of files & applications defined in CICS in batch mode; in addition, it would also facilitate initiation of CICS txns from batch stream, sending them as JES2 commands.
Joined: 20 Jun 2005 Posts: 86 Location: Chennai, India
If you CAFC installed in your system, you must have a PDS CICS.CAFC.INFO (or a similar one). You may find sample JCLs for obtaining list of applications or files mapped in CICS, manipulating files in online via batch jobs, and so on.
If you can't find them, here is a sample JCL for displaying the list of applications defined in the CICS region.
Code:
//JS020 EXEC PGM=AFCP2021,PARM='TRACE=N'
//* PLUG IN THE APPROPRIATE LOADLIB
//STEPLIB DD DISP=SHR,
// DSN=ACSNS.CAFC.AGUT.LOADLIB
//* PLUG IN THE APPROPRIATE CONTROL FILE OF THE CICS REGION
//INCAFC DD DISP=SHR,
// DSN=X99VS.AGUC.AGUCICSI.AFCF4000
//SYSPRINT DD SYSOUT=*,
// DCB=(RECFM=FBA,LRECL=133,BLKSIZE=133)
//REPORT DD SYSOUT=A,
// DCB=(RECFM=FBA,LRECL=133,BLKSIZE=133)
//CAFCTRAC DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
A
/*
You may have to find out the STEPLIB location since the one in the above job is not a standard one (you may start with the datasets CICS.CAFC.*; it may contain the steplib, may be separately for prod and test regions). INCAFC contains what is called 'CAFC control file' where we specify the CICS reqion and separate control files would be available for each CICS reqion you may have. The 'A' in SYSIN represents application; you can change it to 'DS' to list all the DDnames mapped in online.
In the parm to AFCP2016, CICSPRD4 is the CICS region name; 'C' represents close ('O' for open, 'D' for disable, 'OE' for open enable etc.); 'D' for DDname ('A' for application); DEICFO07 is the FCT entry (DDname) in the CICS region.
Again, the DDs STEPLIB and 'CICSPRD4' given here are my installation specific.
Sorry if you can't find any of these, in which case, you may need to go to your system guys.
You should consider looking at new software product from HostBridge Tecnology. Allows you to write your own BATCH COBOL programs to logically process any CICS resource, including transactions like CEMT. Product comes with working sample that closes/opens files from batch.