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

When will the file be hold and released in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
william51
Warnings : 1

New User


Joined: 06 Jul 2006
Posts: 31

PostPosted: Tue Jan 04, 2011 1:05 pm
Reply with quote

I got a job JOBA which has 3 steps. File FILEA is used in the 3rd step with exclusion mode(OLD).
When the second step in JOBA is in processing, can another job JOBB use file FILEA at the same time?

Thanks.
Back to top
View user's profile Send private message
Dsingh29

Active User


Joined: 16 Dec 2008
Posts: 132
Location: IBM

PostPosted: Tue Jan 04, 2011 1:45 pm
Reply with quote

i think it depends on the JES system you are using....JES2 and JES3 have different methodology about dataset allocation. You can google more about their difference.

Suggestions welcome !!
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Jan 04, 2011 2:12 pm
Reply with quote

Hi,

it shouldn't be too difficult to test it out.

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

New User


Joined: 23 Dec 2010
Posts: 20
Location: USA

PostPosted: Tue Jan 04, 2011 4:31 pm
Reply with quote

The answer is *NO*... JCL will have exclusive use of that file while the job is running.
Back to top
View user's profile Send private message
mlp

New User


Joined: 23 Sep 2005
Posts: 91

PostPosted: Wed Jan 05, 2011 11:19 am
Reply with quote

This is from JCL reference.

If a dynamic allocation requests exclusive control of a data set then all subsequent DISP=SHR JCL references to that data set within that job will be upgraded to exclusive control. The job will retain exclusive control of that data set until the end of the last step of that job which references that data set in its JCL.

Code:

//STEP1 EXEC PGM=anypgm1
//DD1 DD DSN=A.B.C,DISP=SHR
//STEP2 EXEC PGM=IDCAMS
 DELETE A.B.C DEFINE A.B.C
//STEP3 EXEC PGM=anypgm3
//DD3 DD DSN=A.B.C,DISP=SHR


Before the start of STEP1, the job will request shared control of data set A.B.C. In STEP2, the DELETE/DEFINE of data set A.B.C will cause the shared control from STEP1 to be upgraded to exclusive control. In STEP3, control of data set A.B.C will remain exclusive, since it is not possible to downgrade an ENQ from EXCL to SHR.

For rest of the dispositions (MOD,OLD,NEW) there will be excusive lock on the dataset.

For further details refer the JCL reference.
Back to top
View user's profile Send private message
william51
Warnings : 1

New User


Joined: 06 Jul 2006
Posts: 31

PostPosted: Wed Jan 05, 2011 6:29 pm
Reply with quote

Thank you all for your kindly reply!
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 Unable to interpret a hex value to De... COBOL Programming 7
No new posts how to eliminate null indicator value... DB2 7
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
Search our Forums:

Back to Top