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 (August 2000, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 9 Aug 2000 15:55:32 +0100
Reply-To:     Peter Crawford <peter.crawford@DB.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Peter Crawford <peter.crawford@DB.COM>
Subject:      Antwort: Re: MVS - output to multiple members of a PDS
Comments: To: don_stanley@xtra.co.nz, Fabrizio1@usa.net
Content-type: text/plain; charset=us-ascii

Perhaps the example I posted before reading Don's points, appears to contradict Fabrizio, but filevar is a special feature. By using filevar, only one file handle is open at a time. When I returned to write to a member that was opened previously (like on a previous data step iteration), the file statement re-opened the member and started writing at the first line (not appending). Using filevar to specify the target member results in only one member being open for the pds/file statement at a time. If more than one file ref is used, then it might appear to the data step engines that two or more file handles are needed at the same time. 1760 data _null_; 1761 length file $44 ; 1762 retain pds "%sysfunc(pathname(tpds))"; 1763 file = pds !! '(A1234567)'; 1764 file dum filevar=file ; 1765 put 'in the first member'; 1766 1767 file = pds !! '(B1234)'; 1768 file dum filevar=file ; 1769 put 'in the next member'; 1770 1771 file = pds !! '(C1234)'; 1772 file dunce filevar=file ; 1773 put 'in the 3rd member'; 1774 stop; 1775 run;

NOTE: The file DUM is: Dsname=XTRNCRF.TEST.PDS.TEMP(A1234567), Unit=3390,Volume=TSO429,Disp=SHR,Blksize=27998, Lrecl=1000,Recfm=VB

NOTE: The file DUM is: Dsname=XTRNCRF.TEST.PDS.TEMP(B1234), Unit=3390,Volume=TSO429,Disp=SHR,Blksize=27998, Lrecl=1000,Recfm=VB

ERROR: OPEN failed for XTRNCRF.TEST.PDS.TEMP. Multiple members of a single cannot be open for output at the same time. FILE=XTRNCRF.TEST.PDS.TEMP(C1234) PDS=XTRNCRF.TEST.PDS.TEMP _ERROR_=1 _N_=1 NOTE: 1 record was written to the file DUM. The minimum record length was 19. The maximum record length was 19. NOTE: 1 record was written to the file DUM. The minimum record length was 18. The maximum record length was 18. NOTE: The SAS System stopped processing this step because of errors. NOTE: The DATA statement used 0.02 CPU seconds and 6402K.

Fabrizio The more I think about the issue of concurrent access, the more I agree with your statements about writing to multiple members

Datum: 09.08.2000 12:18 An: SAS-L@listserv.uga.edu

Antwort an: don_stanley@xtra.co.nz

Betreff: Re: MVS - output to multiple members of a PDS Nachrichtentext:

I agree that SAS says it cannot be done and would be interested to know if someone had successfully done it. I believe Fabrizio is correct in his assertion and the words "the very same time" are the important ones. The ISPF editor appears to allow multiple members to be opened at the same time. In fact, it only opens the members to write to when you exit or issue a SAVE command. To do these commands requires the directory of the PDS to be updated. The directory for all intents and purposes requires an exclusive hold to do an update, so at the "very same time" no two members can be written.

You can update multiple members as I recall using a separate view for each member and then setting both views in the same datastep. But don't quote me on that, I'm thinking back awhile.

Don

F a b r i z i o wrote:

> Mathur, Mukesh [IBM GSA] wrote in message > <7122E3C522C2D311B9C700508B02DCA3478FFF@NTMSG0099>... > >Hello MVS people, > > > >We have a job that updates multiple members of a PDS in one datastep. This > >has been running ok on one mainframe, but when we moved it to another > domain > >it failed. Error was' Open failed for pds - Multiple members of a single > PDS > >cannot be open for output at the same time'. > > Cannot imagine MVS would allow multiple members to be written to the > same PDS at the very same time. Maybe your first site has special > system software running to handle this type of problem? > > It is certainly not a virtue of SAS to facilitate techniques not supported > by > your operating system. > > HTH? Fabrizio

-- Don Stanley, B.SC, Dip O.R.S, MNZCS Director, Sysware Consulting Group Box 634, Wellington, NEW ZEALAND http://www.sysware.co.nz EMAIL:: don_stanley@xtra.co.nz

Author:: Beyond the obvious with SAS Screen Control Language. Author:: Solutions for your GUI Applications Development Using SAS/AF FRAME Technology

http://www.geocities.com/don_stanley_nz/don_home.htm Genealogy:: http://www.geocities.com/don_stanley_nz/family.htm SAS Tips:: http://www.geocities.com/don_stanley_nz/sastips.htm


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