f



Re: How does SAS handle multiple sessions accessing a same dataset #4

Thank you all for your replies.

I tested on windows SAS to read from a dataset, using a different libname
and access=readonly option, while it is being updated by another SAS
session. There is an error message:

 ERROR: A lock is not available for lib_2.testds.DATA, lock held by
another process.
0
tomquin99 (72)
4/9/2008 9:23:00 PM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

0 Replies
354 Views

Similar Articles

[PageSpeed] 33

Reply:

Similar Artilces:

Re: How does SAS handle multiple sessions accessing a same dataset
Hi Tom, Unless you are using a SAS SHARE server (very few sites seem to use this, it is an additional license and really oriented at transactional work in SAS): 1) If you are accessing and then I try to update, I will be denied update ability until you release access. ERROR: A lock is not available for lib.xxx 2) If you are updating and I want to read the dataset, I will be denied read ability. ERROR: File lib.xxx does not exist. ERROR: No data set open to look up variables. Bottom line, your analysis data and job scheduled should be controlled by a few people to ensure refresh/update of datasets is available when others are offline. If you see this as a common scenario, you are likely better off with a relational database like Oracle or the new features in SAS 9.2 might help, I am fuzzy on that possibility... I could be missing some other options here, others may know more about this... Regards, Stephen On Tue, Apr 8, 2008 at 2:32 PM, SUBSCRIBE SAS-L Tom Smith < tomquin99@gmail.com> wrote: > If there are several SAS sessions, and one dataset. One session is trying > to merge data to this dataset while another session is trying to read the > dataset. How SAS handle this situation? Will there be a kind error > generated ? > > Thanks a lot. > ...

Re: How does SAS handle multiple sessions accessing a same dataset #3
Andre, you are right. To add for the "only real OS, zOS": libname xx "aaa" disp=shr; And you are also right: the FSP-modules FSEDIT and FSVIEW have a record locking mechanism. In FSVIEW you can say "modify record" for that, in FSEDIT it's default. However there is a problem on zOS (and some others which work similar): you cannot open a dataset in edit-mode which is in a library, you allocated with disp=shr. So there the only way is SAS/SHARE to use the record-locking. In hierarchical file-systems, there is chance to get it to run. However, if a program is merging something into a dataset or opened a dataset with SET, I don't think that anybody is able to read there. The logic, even if you write to the same dataset with: data a; merge a b; by xx; run; for A a dummy dataset is created, if the step is successful, the original a is deleted and the new one is renamed to a. A DB like DB2 is working "in place" if you insert any records to a table. If you update something, you must first delete the records, change them and insert them again. That allows a record locking mechanism which is necessary for online DBs. In SAS only SAS/SHARE adds that ability. So if you have online applications, which are to be updated concurrently or updated while reading should be allowed, you should use SHARE. Gerhard On Wed, 9 Apr 2008 09:45:03 +0200, Andre Wielki <wielki@INED.FR> wrote: >Stephen >about your point 2) >I remember...

Re: How does SAS handle multiple sessions accessing a same dataset #2
Stephen about your point 2) I remember in the past that without sas share DEPENDING of the kind of libname you used libname a "..." ; is not equal to libname b "...." access=readonly; read possibility allowed you may have one person editing a Table through fsedit ( if i remember well) and the normal libname but the other viewing it only at the same time with the other kind of libname BUT never an access upon the same record! Andre Stephen McDaniel a �crit : > Hi Tom, > > Unless you are using a SAS SHARE server (very few sites seem to use this, it > is an additional license and really oriented at transactional work in SAS): > > 1) If you are accessing and then I try to update, I will be denied update > ability until you release access. > > ERROR: A lock is not available for lib.xxx > > 2) If you are updating and I want to read the dataset, I will be denied read > ability. > ERROR: File lib.xxx does not exist. > ERROR: No data set open to look up variables. > > Bottom line, your analysis data and job scheduled should be controlled by a > few people to ensure refresh/update of datasets is available when others are > offline. If you see this as a common scenario, you are likely better off > with a relational database like Oracle or the new features in SAS 9.2 might > help, I am fuzzy on that possibility... > > I could be missing some other options here, others may know more about &...

How does SAS handle multiple sessions accessing a same dataset
If there are several SAS sessions, and one dataset. One session is trying to merge data to this dataset while another session is trying to read the dataset. How SAS handle this situation? Will there be a kind error generated ? Thanks a lot. ...

Re: combine n SAS datasets in to one SAS dataset. #4
<html> <body> <br> Filename allfiles ('d:\conv\2008*.asc');&nbsp; * Filenames can use wildcards;<br><br> infile allfiles;<br><br> <br><br> <br> At 10:53 AM 1/14/2009, b.djaby@gmail.com wrote:<br> <blockquote type=cite class=cite cite="">Hi,<br> I have a similar problem in my SAS macro;<br> I have many ascii files where name are&nbsp; 2008011.asc to 2008123<br> &nbsp;year = 2008, month=01 to 12 and dekad = 1 to 3;<br> To import all my files, I have writed 2 similars&nbsp; macro contain with<br> those code:<br> %LET month=9;<br> %LET dekad=3;<br> <x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>%Do i= 1 %to &amp;month;<br> <x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>%DO j = 1 %to &amp;dekad;<br> %let dataname =&quot;d:\conv\20080&amp;i&amp;j.asc&quot;;<br> infile &amp;dataname;<br> ****<br> and for second<br><br> %LET month=12;<br> %LET dekad=3;<br> <x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>%Do i= 10 %to &amp;month;<br> <x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>%DO j = 1 %to &amp;dekad;...

Re: Deleting SAS Data from a SAS DATASET #4
Summary: PROC DATASETS; AGE statement. + VIEWs This won't help you delete data from your very big data set, but you may find this example interesting. You say you append data monthly to a big data set then when big gets too big you need to clean out the old. And that takes a very long time. However if you don't physically append but use a view to append/combine you may find it easier to get rid of the unwanted old data. Consider this code. it pushes MonthlyUpdate onto the stack of 24 data sets and the 24th data set is deleted. Then all the data sets get renamed to produce a new group of 24. You can see from the notes how the operation works. The data sets don't have to use a numbered range M01-M24 I did that for my convenience. proc datasets library=work; age MonthlyUpdate m01-m24; run; quit; NOTE: Deleting WORK.M24 (memtype=DATA). NOTE: Aging the name WORK.M23 to WORK.M24 (memtype=DATA). NOTE: Aging the name WORK.M22 to WORK.M23 (memtype=DATA). NOTE: Aging the name WORK.M21 to WORK.M22 (memtype=DATA). NOTE: Aging the name WORK.M20 to WORK.M21 (memtype=DATA). NOTE: Aging the name WORK.M19 to WORK.M20 (memtype=DATA). NOTE: Aging the name WORK.M18 to WORK.M19 (memtype=DATA). NOTE: Aging the name WORK.M17 to WORK.M18 (memtype=DATA). NOTE: Aging the name WORK.M16 to WORK.M17 (memtype=DATA). NOTE: Aging the name WORK.M15 to WORK.M16 (memtype=DATA). NOTE: Aging the name WORK.M14 to WORK.M15 (memtype=DATA). NOTE: Aging the name WORK.M13 to WORK.M14 (me...

Re: Using SAS with large datasets (linking SAS and Access)
I have very little experience with using this but I have found that if you have SAS Access for PC Products licensed, just as you can issue a libname statement pointing to an Excel workbook, you can also issue one for an Access database. Try doing this and then look at your SAS explorer window where you will see an icon for the Access file and will then be able to look at the Access tables as if they were SAS data sets. Nat Wooding Environmental Specialist III Dominion, Environmental Biology 4111 Castlewood Rd Richmond, VA 23234 Phone:804-271-5313, Fax: 804-271-2977 ben.powell@CLA.CO .UK Sent by: "SAS(r) To Discussion" SAS-L@LISTSERV.UGA.EDU <SAS-L@LISTSERV.U cc GA.EDU> Subject Re: Using SAS with large datasets 06/23/2008 06:01 AM Please respond to ben.powell@CLA.CO .UK If you haven't already, export the data out of Access asap as mdb operations tend to be several orders of magnitude slower than SAS. Export to tab or csv and import into SAS. The export procedure from Access is relatively painless. If you've already done that and are still facing problems you should provide more info on variabl...

Re: MS Access and SAS datasets #4
MS Access also has a CAPTION field that behaves more like a SAS variable label. However, I have not found a way to write to that field from SAS. Ed Edward Heaton, SAS Senior Systems Analyst, Westat (An Employee-Owned Research Corporation), 1600 Research Boulevard, RW-3541, Rockville, MD 20850-3195 Voice: (301) 610-4818 Fax: (301) 610-5128 mailto:EdHeaton@Westat.com http://www.Westat.com -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Howard Schreier <hs AT dc-sug DOT org> Sent: Tuesday, May 24, 2005 11:21 ...

Re: SAS/ACCESS
Does the DBMAX_TEXT option do what you want? http://support.sas.com/onlinedoc/913/getDoc/en/acreldb.hlp/a003113591.htm -- Jack Hamilton jfh@alumni.stanford.org Videtis illam spirare libertatis auram On Jan 22, 2009, at 8:57 am, Matthew Pettis wrote: > Hi, > > > > I have a CLOB coming back from an Oracle passthrough query that is > >1024 > in length. How do I specify that my receiving variable in a SAS > dataset > be longer than 1024 characters to accommodate this? By default, I get > SAS thinking that this is 1024 characters, when it is really a CLOB > and > I want to set some large default length on this variable length... > > > > Thanks, > Matt ...

Re: SAS/ACCESS
DBMAX_TEXT does the trick; thank you all who helped! Matt -----Original Message----- From: Jack Hamilton [mailto:jfh@stanfordalumni.org] Sent: Sat 1/24/2009 1:42 AM To: Pettis, Matthew (Prof II&RS) Cc: SAS-L@LISTSERV.UGA.EDU Subject: Re: [SAS-L] SAS/ACCESS - Oracle: setting field lengths in SAS datasets returned from passthrough Does the DBMAX_TEXT option do what you want? http://support.sas.com/onlinedoc/913/getDoc/en/acreldb.hlp/a003113591.htm -- Jack Hamilton jfh@alumni.stanford.org Videtis illam spirare libertatis auram On Jan 22, 2009, at 8:57 am, Matthew Pettis wrote: > Hi, > > > > I have a CLOB coming back from an Oracle passthrough query that is > >1024 > in length. How do I specify that my receiving variable in a SAS > dataset > be longer than 1024 characters to accommodate this? By default, I get > SAS thinking that this is 1024 characters, when it is really a CLOB > and > I want to set some large default length on this variable length... > > > > Thanks, > Matt ...

Re: Storing SAS-programs and -macros in SAS-datasets on a HOST-platform #4
SI provide an example of using a sas catalog as if it were a pds (as a "aggregate storage location"), in the onlinedoc at http://support.sas.com/onlinedoc/913/getDoc/en/lrdict.hlp/a000214504.htm#a00 0351123 (this is a 9.1.3 link, but the example is valid since before sas v8) However, sas catalogs don't (neccessarily) make cross/platform operations easier. A program is usually a lot smaller that the space it takes up in a sas catalog as a source entry. If you have a lot of programs, the proc upload or download time may become less welcome ;-) "Aggregate storage location&quo...

Re: How to combine multiple SAS dataset into 1 #4
More on green programming : Michael is completely right to recall the advantage of using views. Using view in general not only does reduce disk space but in some situation it can dramatically reduce computing time. (yes it does!). Typically when you have to write several intermediate data steps before the final one, you are likely to take advantage to using views in the intermediate steps to avoid disk read/writes. Here is a simplistic illustration : Instead of ... Data B; (1 write) Set A; (1 read) Run; Proc sort data=B;by x; (1 read, 1 write) Data C; (1 write) Set B; (1 read) Run; Total : 3 reads, 3 write (approx.) ... Try this: Data B/view=B; Set a;run;(0 read, 0 write so far) Proc sql; Create view B2 as Select * from B order by x; (still 0 read, 0 write) Data C; Set B2; Run; (Total : 1 read,1 write) These are obviously bare approximation since I do not consider the temporary hidden files created by the steps, but in a previous real situation, we reduced treatment time from a few hours to 20mn. Have fun.. -----Message d'origine----- De : SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] De la part de Michael Raithel Envoy� : jeudi 19 mars 2009 15:13 � : SAS-L@LISTSERV.UGA.EDU Objet : Re: How to combine multiple SAS dataset into 1 Dear SAS-L-ers, Shaheen posted the following: > I have bunch of FCOV sasdataset which I want to combine to > one big dataset. Please help... I am missing the last part > where I have to append the file. > &...

Re: updating a sas dataset by multiple jobs #4
Dear SAS-L-ers, Siva Rao posted the following interesting question: > Hi , I am trying to read/write a SAS dataset by multiple jobs > running concurrently. Here are some details on my task that I > am trying to achieve: > > 1. I will run my process on UNIX and using sas9.x > 2. I will create a sas dataset (permanent dataset) called > "control" with 2 > columns: > JOb_name and FLAG. > > 3. I have total 4 jobs, JOB1, JOB2, JOB3, JOB4 to run. > and I like to submit all 4 using SYSTASK COMMAND to run > consurrently. > At the very end of JOB1, JOB2, and JOB3, I will > insert/write a record to "control" > dataset to mark the completion of the job. For example as below: > > Proc sql; > insert into X.control values('JOB1','1'); > quit; > > > JOb4 should run only after the successful completion of > JOB1, JOB2, JOB3. > So, in JOB4 I am using sleep commmand so that It will be > active in the > background and will keep checking the "CONTROL" dataset (created in > step2) for the JOb_name and FLAG and if it finds that > JOB1, JOB2, JOB3 > are completed then Job should start processing. > > > My question is : How can I make the "CONTROL" dataset > available for JOB1/2/3 for wrting > and available to JOB4 for reading without > any deadlock or without failing the jobs an...

Re: combine n SAS datasets in to one SAS dataset.
If you use the dictionary tables try Proc SQL - it will run much more quickly than a datastep: %let lib=YourLib; %let mem=file2007; proc sql noprint; select MemName into :MemList separated by " &lib.." from dictionary.tables where LibName=upcase("&lib") and MemType='DATA' and MemName eqt upcase("&mem"); quit; data &lib.File_History; set &lib.&MemList; run; hth Paul Choate DDS Data Extraction (916) 654-2160 -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@L...

Re: R vs. SAS (was Replacement for SAS (SPSS vs. SAS, redux)) #4
No, sorry if I made it sound that way..... SAS and R are totally different in the way they work, how they are structured, what the statements look like, and so on. Not like French and Spanish, not even like English and Spanish. More like English and Swahilli. R has a lot in common with S Plus, both are based on the S language. But there is no hostility that I know of between S Plus and R (unlike the situation with Linux) Peter >>> <ben.powell@CLA.CO.UK> 2/5/2004 10:36:32 AM >>> wrote Sounds like R is the SAS equivalent of Linux .. who are incidentally in all sort...

Re: SAS Advanced Programming Exam for SAS 9: SAS Joke of the year. #4
Ed , I still contend and stick with they should both be able to program and know how SAS works. I prefer the intervewing company give a test, were the person being interviewed is sat in front a laptop or desktop and told to write code to solve some problems. No online help no books just the persona nd the computer. This weeds out those who can code and those who cant, from those who can you then talk to them about the code they wrote and you can deduce those who understand how SAS works and thos who dont. The pool you are left with are the qualified candidates atleast from a SAS perspecti...

Re: How to do table lookup in SAS when main dataset has multiple records with the same key #4
Susie: In a simple test the Data step merge does what I would expect it to do. It produces the same result as a SAS SQL inner join. I've also included an example of a SQL left join to a look-up table. The query creates a view of the data with the value attached: /* Suppose I have my MAIN dataset (with fields: employee_id table_id), and the lookup table in TABLE dataset (with fields: table_id value), and I want to read the value from TABLE into MAIN for every employee: */ data main; input employee_id table_id; cards; 111 221 111 221 111 221 222 322 333 433 ; run; data...

Re: SAS System Viewer 9.1 unable to open SAS datasets ( SAS 9.1.3)
A question in return: is your table from windows? compressed from another system? and specially with personnel formats hard coded inside? Andre msiddu2000 a �crit : > SAS System Viewer 9.1 was able to open datasets that were created by > V8 engine (SAS 8.2), but is unable to open datasets that are created > with V9 engine (SAS 9.1.3). > > Does this need SAS System Viewer to be upgraded ? > or > Something else needs to be done ? > > -- Andr� WIELKI INED (Institut National d'Etudes D�mographiques) Service Informatique 133 Boulevard Davout 75980 Paris Cedex 20 m�l : wielki@ined.fr t�l : 33 (0) 1 56 06 21 54 ...

Re: Connect spawner (was RE: [SAS-L] Multiple sessions on
> From: Jack Hamilton > Which brings up something I've been wondering: > > Does using the SAS/Connect spawner allow multiple > simultaneous sessions on > MVS? Do you have to provide a userid and password, and does > the CONNECTed > session then respect RACF settings for your userid? I had a TechSupport ticket open a while back trying to figure out how to run a PC batch program that did a remote submit -- the prompt for userid and password was still necessary -- but I could not get the mainframe session automatically closed at the end of the rsubmit so I could not ...

Re: Deleting SAS Data from a SAS DATASET
One thing you might do is to add an index on the snap_dt to the dataset; = if that's there then you should be able to delete the records in place: proc sql; delete from prod.master_date; where snap_dt =3D "&end_dt"d; quit; run; In both the ways you are trying now you are creating new data sets = rather than deleting records from the current data set; it would seem to = me that a SQL delete statement would be faster than creating new = datasets even if there isn't an index on the date.=20 -Mary ----- Original Message -----=20 From: SUBSCRIBE SAS-L Chandra Gadde=20 To: SAS-L@LISTSERV.UGA.EDU=20 Sent: Friday, August 15, 2008 12:14 PM Subject: Deleting SAS Data from a SAS DATASET Hi All I have several SAS datasets that are very very big. (50GB of size). = Every month, the data is being appended to these datasets. I need to deleted = the data which is greater than 24 months. What is the best method to do = this? Please help me. I tried PROC SQS and DATA STEP. But these two are taking very long = time. Data prod.Master_data; set prod.master_date; if snap_dt =3D "&end_dt"d then delete; run; proc sql; crete table prod.master_date from prod.master_date where snap_dt ne "&end_dt"d; quit; Hi You've got good ideas how to delete the old observations. My modify proposal was wrong. Sorry about that! I still think that changing the data model would be a good idea. Regards Patrick ...

Re: SAS
Chandu, You should be able to find some info in the SPD Engine section of the on-line documentation. HTH, Ken -----Original Message----- From: chandu.isi@GMAIL.COM To: SAS-L@LISTSERV.UGA.EDU Sent: Mon, 3 Jul 2006 09:03:00 -0700 Subject: SAS - 9; Partition of SAS Datasets. Hi All, Recently I heared from some of my friends...that SAS - 9 supports PARTITION of SAS datasets. I tried for getting syntax and some details, but couldn't able to get. Is anyone has any idea about the partitions of SAS datasets, if so can any one help me out on this? Thanks in advance. Chandu. _____...

Re: How to read a SAS log into a SAS dataset.
lazybone2k@GMAIL.COM wrote: > >Dear SAS-L listers, >This may be the millionth time somebody is asking this question " how to >read a SAS log into a SAS dataset?". I looked at previous posts and >gathered info from various SUGI papers and found a way to get the log and >read it. But i dont know for some reason its not working. Please help me. >I used a Proc printto procedure to print the log to a external file >location and try to read in the log and create a SAS dataset which will >contain info about Filename, Owner name, Group name, Elapsed time, CPU >t...

Re: Connect spawner (was RE: [SAS-L] Multiple sessions on #2
It's been a while since I've worked with SAS/Connect, but I believe the answers to your questions are "No", "Yes" and "Yes". One semi-workaround would be to remote submit code (which would have to include JCL) to the internal reader rather than directly to SAS. This would actually submit a batch job rather than interactive code and would allow multiple jobs to be submitted either in rapid succession or all at once. In such a case, PC SAS would not be aware of or have control over the mainframe code. If the submitted code does not produce something needed...

Re: Multiple Comparisons and Multiple Tests Using the SAS System #4
> Kerrville's a little far from SA for you to swing by, as Toby > suggests, but I think it's a fine book. It's fairly easy to > read, and does a good job of balancing applied approaches > with the underlying theory and mathematics. > > Warren Schlechte > HOH Fisheries Science Center > >> -----Original Message----- >> From: Kevin Viel [mailto:kviel@SFBRGENETICS.ORG] >> Sent: Thursday, April 03, 2008 5:16 PM >> Subject: Multiple Comparisons and Multiple Tests Using the SAS System >> >> Can anyone offer an opinion of the book "Multiple Comparisons >> and Multiple Tests Using the SAS System"? I appreciate the responses, which support my suspicion that this would be a good purchase. I have severely limited funds at the moment. Would it be worth buying this book or might I consider some text book? I figured that I could easily follow the calculation, even if not explicit, that any SAS code and STAT procedure might produce (or at least come back to the 'L with my tail between my legs and get the answer <g>). I am leaning towards this book. Genome-wide association studies are currently the fad in genetics :( 200,000-1,000,000 exposure variables and hundreds of potential outcome measurements-yeah, knowing the aspects of multiplicity become more valuable than actual knowing your disease/exposures :( Thanks, Kevin Kevin Viel, PhD Post-doctoral fellow Department of Genetics Southw...

Web resources about - Re: How does SAS handle multiple sessions accessing a same dataset #4 - comp.soft-sys.sas

Highest Percentage Of Opera Mini Users Accessing Facebook? Macau
If you were asked to guess which country had the highest percentage of users of Opera mobile Web browser Opera Mini users accessing Facebook ...

International Users Accessing Facebook Places Through US VPN Accounts
By using a virtual private network (VPN) hosted in the United States, Facebook users from around the world are accessing Facebook Places. The ...

What are some alternatives to Yodlee for accessing bank information?
Clay Loveless , Founder, Jexy. Co-founder, Mashery. Founder, Jexy. Co-founder, Mashery.

Cloud Console - Accessing files in cloud storage for iPad on the iTunes App Store
Get Cloud Console - Accessing files in cloud storage on the App Store. See screenshots and ratings, and read customer reviews.

Meryl Streep On Accessing The Characters Within - YouTube
Meryl Streep talks about the importance of an actors work representing their ability. CONNECT WITH AFI: http://facebook.com/AmericanFilmInstitute ...

Student pleads guilty to accessing records about Frances Abbott design scholarship
The Sydney student who leaked information about a fashion school scholarship controversially awarded to the daughter of the Prime Minister has ...

Accessing a headline opinion
Accessing a headline opinion

Sharp increase in authorities accessing private data
Australian law enforcement and government agencies have sharply increased their access without warrant to vast quantities of private telephone ...

Former librarian charged with accessing student records of Frances Abbott
A former part-time librarian at a Sydney design school has been charged after she allegedly accessed student records of Prime Minister Tony Abbott's ...

Frances Abbott scholarship: Sydney woman pleads guilty to accessing Whitehouse Institute records on PM's ...
A Sydney woman who leaked the student records of Tony Abbott's daughter pleads guilty. A Sydney woman who leaked the student records of Prime ...

Resources last updated: 3/17/2016 8:18:35 AM