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

How to forcefully free resources from JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 1287
Location: Chennai, India

PostPosted: Thu Sep 11, 2008 12:18 pm
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: 8797
Location: Welsh Wales

PostPosted: Thu Sep 11, 2008 12:22 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Thu Sep 11, 2008 12:27 pm
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

Moderator Emeritus


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

PostPosted: Thu Sep 11, 2008 7:39 pm
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
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: 1702
Location: Australia

PostPosted: Fri Sep 12, 2008 11:02 am
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
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

Moderator Emeritus


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

PostPosted: Sat Sep 13, 2008 1:36 am
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
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

Moderator Emeritus


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

PostPosted: Sun Sep 14, 2008 12:23 am
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
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

Moderator Emeritus


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

PostPosted: Mon Sep 15, 2008 11:56 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts LMDINIT/LIST/FREE Looping problem TSO/ISPF 12
No new posts Mainframe developer resources/communi... COBOL Programming 2
No new posts Am I missing something on "FREE ... CLIST & REXX 10
No new posts CICS exhausted FREE OSCOR CICS 0
No new posts How to free (unalloc) data sets and d... TSO/ISPF 4
Search our Forums:

Back to Top