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

to retain PS or VSAM dataset until the end of the job


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

New User


Joined: 04 Jan 2008
Posts: 42
Location: india

PostPosted: Fri Feb 13, 2009 12:51 am
Reply with quote

Hi,

I need a help. We use Control-m as the scheduler. Control-m expects all the dataset used by the job to be allocated to the job before the job starts its execution. Once all the dataset are allocated then the job is said to execute. After the completion of each step the datasets allocated to the particular steps are released (in detail, JOB1 has three steps. the //STEP1 uses datasets AAA.dataset1 and AAA.dataset2 and //STEP2 uses datasets AAA.dataset3 and AAA.dataset4. //STEP3 uses dataset AAA.dataset1 and AAA.dataset2 that is used by //STEP1. Control-m expects the four dataset to be allocated to the job. Once the //STEP1 is completed datasets AAA.dataset1 and AAA.dataset2 are set free. //STEP2 is completed datasets AAA.dataset3 and AAA.dataset4 are set free. For the execution of //STEP3 it expects dataset AAA.dataset1 and AAA.dataset2 to be re-allocated. After allocation of the datasets the //STEP3 starts its execution. Once execution is completed the datasets are set free)

Next, the JOB2 uses the datasets used by the JOB1 (AAA.dataset1 and AAA.dataset2)
Then JOB2 starts its execution only after the datasets used by the JOB1 are set free.

Problem:

For the execution of JOB1 all the four datasets
AAA.dataset1 and AAA.dataset2
AAA.dataset3 and AAA.dataset4 are allocated. Now JOB1 starts its execution. By this time JOB2 has been kicked. JOB2 will be waiting for the dataset AAA.dataset1 and AAA.dataset2. After the completion of //STEP1 of JOB1 the datasets AAA.dataset1 and AAA.dataset2 are set freed and JOB2 starts its execution (let us say JOB2 is quite long running).

Now //STEP3 of JOB1 will be waiting for the datasets AAA.dataset1 and AAA.dataset2 because it is hold by JOB2 and results in contention.


What I need?

The datasets AAA.dataset1 and AAA.dataset2 allocated to the JOB1 should be retained to JOB1 until it gets completed. The dataset may be TAPE, PS or VSAM. We need not worry about TAPE dataset because we use RETAIN in VOLUME parameter.

My question is how to retain PS or VSAM dataset until the end of the job if is used in subsequent steps.

Thanks
Prasannaa
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Feb 13, 2009 4:01 am
Reply with quote

Hi,

don't let job2 commence until job1 has completed, either by using an IN-CONDITION or use of a Control Resource which I'm assuming you are using when you say
Quote:
Control-m expects all the dataset used by the job to be allocated to the job before the job starts its execution


By the way Control-M does not allocate files to jobs, it acquires resources that have been defined in Control-M.

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

New User


Joined: 04 Jan 2008
Posts: 42
Location: india

PostPosted: Fri Feb 13, 2009 2:29 pm
Reply with quote

Quote:
My question is how to retain PS or VSAM dataset until the end of the job if is used in subsequent steps.


Hi Gerry,

Thanking you for your reply. Kindly give some answer for, how to retain PS or VSAM dataset until the end of the job if is used in subsequent steps.

Thanks
Prasannaa S
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Feb 13, 2009 2:33 pm
Reply with quote

Look at the DISP= parameter of the DD statement in THIS manual.
Back to top
View user's profile Send private message
sprasannapathy

New User


Joined: 04 Jan 2008
Posts: 42
Location: india

PostPosted: Sat Feb 14, 2009 2:45 pm
Reply with quote

Thanking you
Prasannaa
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 Access to non cataloged VSAM file JCL & VSAM 18
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top