LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (November 1996, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 12 Nov 1996 18:10:20 -0500
Reply-To:     MICHAEL.RAITHEL@RAITHM49.CUSTOMS.SPRINT.COM
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         "Michael A. Raithel" <MICHAEL.RAITHEL@RAITHM49.CUSTOMS.SPRINT.COM>
Subject:      Re: (MVS) DISP=SHR

Anthony Ayiomamitis posted the following:

>I read somewhere that DISP=SHR is not what it seems and can >indeed lock up a library. Unfortunately I cannot recall where I saw >that posting. I also managed to recreate the problem myself about two >years ago but I cannot recall how I did it (damn it!). > >I spoke to SAS Tech Support a while back and they did confirm >that SAS does open up a library in EXCLUSIVE mode in spite of the >DISP=SHR option and this was because of some SAS quirk behind the >scenes. > >Does anyone have any example(s) of the above being accomplished >and/or any reference to printed material for the same? > >WIth flat files, I have easily modified a file using a data >step even though the JCL had a DISP=SHR option. I an now trying to >recreate the same problem with a SAS library. As noted above, I have >done it before but cannot recollect how I pulled it off. > >Due to a business trip lasting twelve days, I will not be able >to reply immediately to any questions or comments. > >Many thanks in advance for any help/assistance! >

Welcome back, Anthony. Assuming that you are running SAS in the MVS Environment, and that you have version 6.08, I have good news from you: DISP=SHR *DOES NOT* open up a SAS data library in EXCLUSIVE mode. Indeed, multiple MVS tasks (TSO sessions, batch jobs) can simultaneously access the same SAS data set in the same SAS data library if they all declare a DISP=SHR on the SAS data library's data set name. This is true whether you allocate the SAS data library in the JCL or in the SAS code via a LIBNAME statement.

Allocation problems can arise when an MVS task attempts to allocate a SAS data library with DISP=OLD or DISP=MOD. If other tasks already have the SAS data library allocated with DISP=OLD, the new task will have to wait. It may abend, depending on how your MVS system is set up. If a task declares DISP=OLD or DISP=MOD in allocating a SAS data library, and gains exclusive control of it (eg. no other tasks had it allocated), new tasks attempting access with DISP=SHR will have to wait. They may abend, depending on how your MVS system is set up.

The above paragraph can be summarized in the following table:

Access Your Program Access Another Program Data Set Requires Requires Contention ------------------- ---------------------- ---------- SHR SHR No OLD or MOD SHR Yes SHR OLD or MOD Yes OLD or MOD OLD or MOD Yes

Anthony, if you are intent on experimenting, consider trying the following:

1. Enter SAS Display Manager and allocate a SAS data library with DISP=SHR. Use SAS/FSP to browse a particular data set within the library.

2. Submit (or have a friend submit) a batch job that allocates the same SAS data library with a DISP=SHR either in the JCL or in the SAS code. Have the SAS program access the same SAS data set that you are browsing, via a PROC or DATA step.

3. Repeat #2, above, with DISP=OLD, and then with DISP=MOD.

By doing the above, you should prove to yourself the true nature of DISP= "rules of engagement". Perhaps this information will help you to better research your problem...

I hope that this suggestion proves helpful now, and in the future!

Of course, all of these opinions and insights are my own, and do not reflect those of my organization or my associates.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Michael A. Raithel E-mail: maraithel@mcimail.com Author: Tuning SAS Applications in the MVS Environment ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ...I just had to let it go... ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


Back to: Top of message | Previous page | Main SAS-L page