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

Load Contention in Mainframe Jobs


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
hermit_reloaded

New User


Joined: 23 Apr 2007
Posts: 26
Location: India

PostPosted: Tue Apr 24, 2007 10:24 am
Reply with quote

Hi

Is there some method by which we can make a mainframe job wait for the load while the same load is being used by another job? Once the other job releases the load the first job can start execution. Is this possible in production environment my modifying the Procedure/JCL in some way?
Back to top
View user's profile Send private message
hermit_reloaded

New User


Joined: 23 Apr 2007
Posts: 26
Location: India

PostPosted: Tue Apr 24, 2007 10:30 am
Reply with quote

Is there some method by which we can make a mainframe job wait for the load while the same load is being used by another job? Once the other job releases the load the first job can start execution. Is this possible in production environment my modifying the Procedure/JCL in some way?
Back to top
View user's profile Send private message
diwa_thilak

Active User


Joined: 13 Jul 2006
Posts: 205
Location: At my desk

PostPosted: Tue Apr 24, 2007 11:36 am
Reply with quote

Hi,

Can you rephrase your question ?

Did you mean to say, your job needs to wait for another job ?

If yes, you can make your job successor to the load job, so that your job will wait until the load job completes its operation.

Thanks,
Diwakar

-----------------------------------------------------
Nobody is Perfect. I am Nobody
Back to top
View user's profile Send private message
munikumar
Currently Banned

New User


Joined: 18 Apr 2007
Posts: 24
Location: India

PostPosted: Tue Apr 24, 2007 12:14 pm
Reply with quote

I believe you are using scheduler to schedule the jobs in your shop. We can define the jobs in such a way that depends mutually. I mean, you can schedule the triggered job of first job. So that second job will get triggered only when the first job completes.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Tue Apr 24, 2007 12:16 pm
Reply with quote

What do you mean by a load job ? A job loading a dataset, loading what ?

But if you have a schedule package, use that.
Back to top
View user's profile Send private message
vmj

New User


Joined: 16 May 2006
Posts: 16
Location: Philippines

PostPosted: Tue Apr 24, 2007 12:39 pm
Reply with quote

munikumar wrote:
I believe you are using scheduler to schedule the jobs in your shop. We can define the jobs in such a way that depends mutually. I mean, you can schedule the triggered job of first job. So that second job will get triggered only when the first job completes.


Yes this is possible, unless if he mean that the first program is already running and have to wait for the other program to finish before the first program can resume. I don't know if you can set a parameter within a program that could be check by another program so it would communicate with each other. The best option for communication is for it to check the return codes after the other program ended it's process....
Back to top
View user's profile Send private message
hermit_reloaded

New User


Joined: 23 Apr 2007
Posts: 26
Location: India

PostPosted: Tue Apr 24, 2007 1:59 pm
Reply with quote

I will paraphrase my concern

I have two jobs running in production. Job A is triggered by operator of the mainframe and is used to process Tapes and Job B is fully automated and is scheduled at a particular time of each day, it is used to process DASD files. Basically these two jobs are same the only difference is an additional REXX code in Job B, used to pick up files for the disks.

Load means the executables in the mainframe environment. Load is created when a Cobol source is compiled. Jcl using the various sources needs to be provided with a library containing all the loads.

Let me give an example of the problem being encountered
Lets say Job A is already running and is using the Load library. Then the Job B is initiated at its allotted time. Now when Job B will start processing it will encounter Load being held by Job A. So the Job B will not process the file.

We cannot create a different load for both jobs because both the jobs use the same resources.

What we need is the Job A to wait untill Job B have released the load library. This is what i am thinkin of. I havnt found anyway to do it. You can suggest any other soultion.
Back to top
View user's profile Send private message
hermit_reloaded

New User


Joined: 23 Apr 2007
Posts: 26
Location: India

PostPosted: Tue Apr 24, 2007 2:01 pm
Reply with quote

What we need is the Job B to wait untill Job A have released the load library.

Sorry for the typo
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Tue Apr 24, 2007 2:17 pm
Reply with quote

hermit_reloaded wrote:
What we need is the Job B to wait untill Job A have released the load library.
Won't disp=old give you that?
Back to top
View user's profile Send private message
hermit_reloaded

New User


Joined: 23 Apr 2007
Posts: 26
Location: India

PostPosted: Tue Apr 24, 2007 2:22 pm
Reply with quote

No
As we are not using a library as such. Or not even a PDS. The load is getting shared by both the Jobs. Therefore we cant give DISP=OLD.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Apr 24, 2007 7:14 pm
Reply with quote

Hello,

If you are concerned about the same library being used to fetch programs for execution concurrently, do not be concerned. This is a normal method of processing. Program libraries are nearly always used by multiple concnrrent processes.

In your joblib, steplib or link listed entries, the program libraries are allocated with DISP=SHR - this is so that they may be used concnrrently.

If this is not your concern, please let us know.
Back to top
View user's profile Send private message
hermit_reloaded

New User


Joined: 23 Apr 2007
Posts: 26
Location: India

PostPosted: Wed Apr 25, 2007 9:48 am
Reply with quote

No this is not the concern

Both the jobs cannot run simultaneously. As both use the same resources and various files are updated during the processing of the job.

What i want is that is there any way for the job to go in a wait state until the previous job has finished processing.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Apr 25, 2007 7:32 pm
Reply with quote

Hello,

Yes, just use DISP=OLD in one or all of the common resources DD statements.

If some of the common resources may be needed by other than these 2 jobs, allocate a "control" dataset that will never be read or deleted and specify DISP=OLD for that dataset only - when one of the jobs "has" it the other will wait. This is not a good solution as it ties up resources unnecessarily. It may also cause problems with time-outs or operator cancels.

Might it be possible to use the same JOBNAME for both jobs? If you name them the same, they will never execute at the same time - the system will not let the "second" job start until the "first" sompletes.

If your organization uses scheduling software, you should be able to control them via scheduling.

I've not yet seen a place that "locks" a load library to control jobs that should not run concurrently.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Wed Apr 25, 2007 7:45 pm
Reply with quote

Quote:
Might it be possible to use the same JOBNAME for both jobs? If you name them the same, they will never execute at the same time - the system will not let the "second" job start until the "first" sompletes.

If your organization uses scheduling software, you should be able to control them via scheduling.

Dick,

Although using the same jobname is a quick, and dirty solution, but it could cause problems should the first job abend.

I would say sans doubt that the scheduling package is THE way to go.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Apr 25, 2007 10:00 pm
Reply with quote

Yup, if they have a scheduling package and are willing to use it for this. . . .

I guess i'd rather see the duplicate job versus using some kind of resource wasting "locking" the-load-library mechanism.

Surely the scheduler is a better option.
Back to top
View user's profile Send private message
hermit_reloaded

New User


Joined: 23 Apr 2007
Posts: 26
Location: India

PostPosted: Tue Jun 05, 2007 1:27 pm
Reply with quote

No we cannot schedule the jobs.

One job runs for the whole day. Whenever a tape needs to be processed by it an operator(human resource) loads the tape and issues a command that processes the file, this is the time when the jobs locks the load library. The other job is fully automated and runs at a particular time of the day. If a file is getting processed by the former job therefore locking the load library then the load library cannot be used by the latter job.

What i am thinkin is that we will create a file (dummy) in the job that runs the whole day. As long as the file is running we will keep it under mutually exclusive control and whenever the job finishes it releases control on this dummy file.

The next job keep on trying to open this dummy file in OLD mode and will go in a wait state until the previous job releases control..

Plz let me know if there are any discrepancies in this approach.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Jun 05, 2007 5:32 pm
Reply with quote

Hello,

That approach was mentioned by
Quote:
If some of the common resources may be needed by other than these 2 jobs, allocate a "control" dataset that will never be read or deleted and specify DISP=OLD for that dataset only - when one of the jobs "has" it the other will wait. This is not a good solution as it ties up resources unnecessarily. It may also cause problems with time-outs or operator cancels.

Yes, you can do this, but it will waste resources and likely cause problems when things are canceled.

I still see no reason for locking the "loadlib".

I am also still not clear why this "cannot be scheduled". This
Quote:
One job runs for the whole day.
is misleading, i believe. I believe this job starts and stops many times a day, but does not "run the whole day". If it did, the "other" job could never be run.

What scheduling software does your location use? Most scheduling software i've seen supports defining jobs that may not be run concurrently. . . Have your scheduling people been included in talks about these jobs?

It sounds like there may be issues we are not yet aware of. Many sites have processes that are mutually exclussive and they do not cause problems like lockikng a loadlib.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Tue Jun 05, 2007 5:37 pm
Reply with quote

I have never come across a situation like this, where the LOADLIB is locked.

Is it specified anywhere in the JCL with DISP=OLD .... if so, why not replace the DISP with SHR

Why not copy the required modules to another library and STEPLIB if this is the case that LOADLIB is locked.

Is this an MVS or TPF system ???
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Email attachment from mainframe is empty PC Guides & IT News 9
No new posts Mainframe Dataset Binary or ASCII Mainframe Interview Questions 4
No new posts Need help In Mainframe Automation AF/... CLIST & REXX 14
No new posts Unload and Load ISPF Table TSO/ISPF 4
No new posts SPOOL to Mainframe dataset in batch mode JCL & VSAM 7
Search our Forums:

Back to Top