IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to open/close CICS files using a JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kitts

New User


Joined: 29 Jan 2006
Posts: 19

PostPosted: Mon May 22, 2006 12:30 pm
Reply with quote

Hi,

Can anybody throw some light on closing the CICS files using the batch option?

I mean the equivalent of 'CEMT SET FILE(XXXX) OPE/DIS ENA/DIS'..
in the batch mode.

Which is the tool/utility to be used.

Thanks in anticipation of a quick reply,

Kitts
Back to top
View user's profile Send private message
Bharanidharan

New User


Joined: 20 Jun 2005
Posts: 86
Location: Chennai, India

PostPosted: Mon May 22, 2006 5:38 pm
Reply with quote

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.
Back to top
View user's profile Send private message
kitts

New User


Joined: 29 Jan 2006
Posts: 19

PostPosted: Tue May 23, 2006 10:32 am
Reply with quote

Hi Bharanidharan,

Thanks so much for the information i would like to have a sample jcl using CAFC utility so tht i can try it and see.

Thanks,
Kitts.
Back to top
View user's profile Send private message
Bharanidharan

New User


Joined: 20 Jun 2005
Posts: 86
Location: Chennai, India

PostPosted: Tue May 23, 2006 3:54 pm
Reply with quote

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.

Sample JCL for, say closing a file:

Code:

//PS01     EXEC  PGM=AFCP2016,                     
//             PARM='CICSPRD4,C,D,DEICFO07'       
//SYSPRINT DD  SYSOUT=*                           
//STEPLIB  DD  DSN=ACSNS.CAFC.AGUP.PRODLIB,       
//             DISP=SHR                           
//CICSPRD4 DD  DSN=X99VS.AGUC.CICSAGUD.AFCF4000,   
//             DISP=SHR                           


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.

Regards,
Bharani.
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Wed Jul 26, 2006 12:35 am
Reply with quote

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.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Using API Gateway from CICS program CICS 0
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Calling an Open C library function in... CICS 1
Search our Forums:

Back to Top