View previous topic :: View next topic |
Author |
Message |
TK Beginner

Joined: 31 Dec 2002 Posts: 4 Topics: 1
|
Posted: Mon Jan 20, 2003 12:44 am Post subject: Closing CICS files in batch job |
|
|
Hi all,
Is it possible to close the CICS files by submitting a batch job.
Thanks & Regards,
TK |
|
Back to top |
|
 |
Manas Biswal Intermediate

Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Mon Jan 20, 2003 1:15 am Post subject: |
|
|
I can think of an indirect way of doing that. Code a batch COBOL program which links to an online program using EXCI LINK. And in the online CICS program, you can close the files using EXEC CICS SET FILE command. So, now submit a job in batch which runs the batch program. The batch program in turn will invoke the CICS program which does the file closing.
Regards,
Manas |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
|
Posted: Mon Jan 20, 2003 5:09 am Post subject: |
|
|
TK,
I beleive there are many ways to do it ,but I am listing a few of them.
Method 1: This method will issue a command to close the file via INTRDR
Code: |
//STEPA EXEC PGM=IEBGENER
//*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD *
/*$TAPARM,T=00.00,'$VS,''F CICS-NAME,CEMT S FILE(FILENAME),CLO'''
//SYSUT2 DD SYSOUT=(A,INTRDR)
//SYSIN DD DUMMY
/*
|
Method 2:
Code: |
//IEFBR14 EXEC PGM=IEFBR14
// F CICS-NAME,'CEMT SET FIL(FILENAME) CLO DIS'
/*
|
Method 3: Programatically you can issue a SET command as manas explained
Code: |
EXEC CICS SET FILE('FILENAME')
CLOSED
ENABLED
NOHANDLE
RESP(WS-RESP-CODE)
END-EXEC
|
Hope this helps...
cheers
kolusu
Last edited by kolusu on Mon Jan 20, 2003 10:14 am; edited 1 time in total |
|
Back to top |
|
 |
TK Beginner

Joined: 31 Dec 2002 Posts: 4 Topics: 1
|
Posted: Mon Jan 20, 2003 9:27 am Post subject: |
|
|
Hi kolusu,
I tried all batch job methods what u have suggested to me. the job is running fine. but the file status in cics is showing still as open. what is the problem with it.
TK |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
|
Posted: Mon Jan 20, 2003 10:14 am Post subject: |
|
|
Tk,
Make sure that you have the right CICS region name and the right file name. or may be your shop has restricted the use of issue of these commands.I would suggest talking to your systems people of your shop.
Hope this helps...
cheers
Kolusu |
|
Back to top |
|
 |
TK Beginner

Joined: 31 Dec 2002 Posts: 4 Topics: 1
|
Posted: Tue Jan 21, 2003 12:30 am Post subject: |
|
|
Hi kolusu,
Where can i get information about this JCL?. Because before going to system people I need some evidance.
TK |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
|
Posted: Tue Jan 21, 2003 1:05 am Post subject: |
|
|
Tk,
The first jcl issues a console interface option command.The main drawback of that jcl is there is no easy error checking available (you can not tell if CICS was unable to close the dataset because it is in use.) But in many cases, it is quite sufficent.
Even the second job issues the console interface command. May be your shop has restricted the use of such commands.
So talk to your systems people, explain them that you need to close the file using batch Jcl and show them your JCL and ask them as to what needs to be changed in the jcl.
Hope this helps...
cheers
kolusu |
|
Back to top |
|
 |
TK Beginner

Joined: 31 Dec 2002 Posts: 4 Topics: 1
|
Posted: Wed Jan 22, 2003 6:13 am Post subject: |
|
|
Thanks Kolusu,
Thank u for ur inputs
TK |
|
Back to top |
|
 |
Dibakar Advanced

Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Mon Mar 24, 2003 7:47 am Post subject: |
|
|
Hi,
Is there any other way to close/open a file through a batch job without using CEMT. I don't have access to CEMT.
Diba. |
|
Back to top |
|
 |
Hockey-Dad Beginner
Joined: 27 Mar 2003 Posts: 1 Topics: 0
|
Posted: Thu Mar 27, 2003 2:38 pm Post subject: |
|
|
There are many ways to issue commands through batch jobs, but most of them share the same problem. You have closed a file or disabled a task and then the system is brought down for some reason. When it comes back up the files or tasks will not be in the correct status. Or the region is down when the request is made and then the region is brought back up again leaving the file status in the wrong status. That is why we purchased MacKinney Systems CEMT from Batch with File Status Tracking. It is a small utility that can be installed in a couple of hours and I believe we paid about $2000 for a site license (under 500 a year maintenance). Works great, and the file tracking feature stores desired file status even if the region is down when the command is issued. Issue the file close command while the region is down, CEMT Batch will keep it closed when the region is brought up (unless the open was also issued while the region was down. And you can issue ANY CEMT command this way. Our programing staff uses it for program newcopies.
That $2000 is money well spent to avoid headaches. We previously used CA-DADS Plus to perform this function but our maintenance fee for that product was over $20,000 a year and it did not have the file status tracking feature. And it was from CA which we were in the process of dumping.
(I am in no way associated with MacKinney other than the fact I am a user of this one product of theirs) |
|
Back to top |
|
 |
bob_buxton Beginner

Joined: 20 Dec 2002 Posts: 44 Topics: 0 Location: Hampshire, England
|
Posted: Fri Mar 28, 2003 5:19 am Post subject: |
|
|
CPSM, CICSPlex Systems Manager, is supplied as part of the CICS Transaction Server.
It provides, among other things, an API that can be used to monitor and control CICS regions. Ask your system support people whether they have installed it. _________________ Bob Buxton
Ex Websphere MQ for zOS development |
|
Back to top |
|
 |
srivat Beginner
Joined: 20 Dec 2002 Posts: 1 Topics: 0
|
Posted: Mon Apr 07, 2003 6:48 am Post subject: |
|
|
hi,
In our shop we use an utility called IPCPBTCH.
IPCP - Inter Program Command Processor.
Using this utility we can close or open a CICS file and i have used it to initiate a CICS transaction that runs in background.
Cheers,
Srivat |
|
Back to top |
|
 |
help_me Beginner
Joined: 03 Oct 2003 Posts: 11 Topics: 4
|
Posted: Sat Oct 04, 2003 11:02 am Post subject: |
|
|
Hi Kolusu,
If I use the Following JCL to Close the CICS File
//IEFBR14 EXEC PGM=IEFBR14
// F CICS-NAME,'CEMT SET FIL(FILENAME) CLO DIS'
/*
Please mention where to specify the CICS Region Name for this In order to Close the File in CICS Region.
Thank you |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
|
Posted: Sat Oct 04, 2003 4:10 pm Post subject: |
|
|
Helpme,
CICS-NAME is where you specify your CICS Region Name
Hope this helps...
cheers
kolusu |
|
Back to top |
|
 |
|
|