Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to forcefully free resources from JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
vatish

New User


Joined: 23 Jun 2007
Posts: 6
Location: Pune

PostPosted: Thu Sep 11, 2008 12:03 pm    Post subject: How to forcefully free resources from JCL
Reply with quote

Hi,

Can you guys please let me know if I there is some command which can forcefully release a dataset from one JCL and make it available for some other?

If this is not possible then can I code a step which releases all resources held by a Step once that step is complete?

Thanks,
Vatish
Back to top
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Thu Sep 11, 2008 12:18 pm    Post subject: Reply to: How to forcefully free resources from JCL
Reply with quote

Vatish,

Quote:
forcefully release a dataset from one JCL and make it available for some other?


What is the business reason?

If it is an existing dataset, You can very well code the DISP parameter as DISP=SHR to make it available in more than 1 JCL.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Sep 11, 2008 12:22 pm    Post subject:
Reply with quote

I would assume a dataset contention issue where one job updates a dataset and another then wwants to read it.

Split the job at end of update and then run parallel read jobs.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Sep 11, 2008 12:24 pm    Post subject:
Reply with quote

Quote:

If this is not possible then can I code a step which releases all resources held by a Step once that step is complete?


If you know after which step you want to release resources
split your jcl to two
Resources will get automatically released after completion of first jcl..
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu Sep 11, 2008 12:27 pm    Post subject:
Reply with quote

Would you care to explain the problem that you are experiencing, and perhaps us poor non psycics need not guess at your problem
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Sep 11, 2008 7:39 pm    Post subject:
Reply with quote

Hello,

As you've not posted your specifics, here's a generic consideration. . .

Why should "something" be able to free resources of an already running job? What whould happen to the partially complete work in the job that was rudely interrupted? Who gets to deal with that restart/recovery (yup, sequential files need integrity too).

What you have is a scheduling problem and i'd suggest you address it as such. There should be no consideration of forcefully "freeing" allocated resources while the job is running.

In some rare case, it may be necessary to cancel a production job so that some other can be run, but this should be very rare and is quite different than jerking the resource(s) away from the job on the fly.

As i mentioned, this is a scheduling problem and if you work with the scheduling people, it should not be too difficult to implement a satisfactory solution.
Back to top
View user's profile Send private message
vatish

New User


Joined: 23 Jun 2007
Posts: 6
Location: Pune

PostPosted: Fri Sep 12, 2008 10:36 am    Post subject: Reply to: How to forcefully free resources from JCL
Reply with quote

A step is writing to a data set and in the next step another program is reading this data set.

Actually it's a GDG and most of the time this is working fine but occasionally am getting abend with message "DATA SET RESERVATION UNSUCCESSFUL"

I believe this is contention error.

I could not find any other job which is accessing this GDG.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Sep 12, 2008 11:02 am    Post subject:
Reply with quote

Hi,

i think you will find its DFHSM.


Gerry
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Sep 12, 2008 6:35 pm    Post subject:
Reply with quote

H Vatish,

I'm assuming that you're asking if the job that has control of the DS can release that control.

Have you tried FREE=CLOSE? This dos just what you would think - frees the DS upon CLOSE of that DS.

There are some caveats - look in the JCL Ref Manual for details.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Sep 13, 2008 1:36 am    Post subject:
Reply with quote

Hello,

I recommend you work with your storage management or system support people to identify exactly what is causing this.
Quote:
I believe this is contention error.
It needs to be a verified fact, not some belief.

If your job is the only job that uses that particular gdg, there will be no contention going from one step to the next. . . . The job already "has" the resource and does not need to "get" it again.

Given that your problem is within the only job that references the dataset, i probably would not use FREE=CLOSE in the first step. . .
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Sep 13, 2008 6:53 pm    Post subject:
Reply with quote

I keyed on the OP's 1st post that seemed to indicate 2 jobs were involved.
Quote:
Can you guys please let me know if I there is some command which can forcefully release a dataset from one JCL and make it available for some other?
Missed his follow-up & the GDG reference.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Sep 14, 2008 12:23 am    Post subject:
Reply with quote

Hi Jack,

Quote:
I keyed on the OP's 1st post that seemed to indicate 2 jobs were involved.
Same here - isn't discovery great icon_wink.gif

As mentioned HSM might also be a candidate, but i wouldn't think HSM would interfere with an already running job icon_confused.gif

Maybe it would be useful if we could see the actual jcl and contention message(s).
Back to top
View user's profile Send private message
jaspal

New User


Joined: 22 May 2007
Posts: 68
Location: mumbai

PostPosted: Mon Sep 15, 2008 11:48 am    Post subject:
Reply with quote

Hi Vatish,

Yuu can try with control card in both the jobs that they should not run parallel , if one job is executing other should go on hold it usually solves contention problem , either you can apply exclusive parm through scheduling.

Ex- control card.

Consider Job- A is having control card as

/*CNTL NNTRLCRD,EXC

And Job- B is having control card as

/*CNTL NNTRLCRD,SHR

then only one job will execute other will go on hold.
if A is executing B will go on hold and vice-versa.

Regards,
Jaspal
+919833814470
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Sep 15, 2008 11:56 am    Post subject:
Reply with quote

Hello,

Please note that the situation does not involve 2 jobs - the problem happens within a single job.

Maybe Vatish will post the cause of the contention when it is identified.
Back to top
View user's profile Send private message
rahulbank

New User


Joined: 25 Sep 2008
Posts: 66
Location: Bengaluruuuuuu

PostPosted: Sun Oct 26, 2008 11:24 am    Post subject:
Reply with quote

Dear Vatish,

If you face this error again at that time try in log /D GRS,RES=(SYSDSN,DSNNAME)..this will tell you on who is holding it...
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Free FILE not working for specific users sankalp-goyal CLIST & REXX 12 Mon Apr 25, 2016 6:33 pm
No new posts Controlling usage of resources by tasks raja1128 CICS 3 Fri Nov 06, 2015 9:53 am
No new posts CICS learning resources for a beginner rey.joy CICS 3 Thu Mar 05, 2015 2:19 pm
No new posts JCL Context Free Grammar alumman JCL & VSAM 6 Mon Apr 28, 2014 6:14 pm
No new posts How to "FREE" the memory of... Soumick Sarkar TSO/ISPF 6 Fri Mar 28, 2014 10:33 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us