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 (July 1998, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 29 Jul 1998 20:27:45 +0100
Reply-To:     Peter Crawford <Peter@CRAWFORDSOFTWARE.DEMON.CO.UK>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Peter Crawford <Peter@CRAWFORDSOFTWARE.DEMON.CO.UK>
Organization: Crawford Software Consultancy Limited
Subject:      Re: List the Contents of a Libref

In article <6pnh22$scs$1@nnrp1.dejanews.com>, Bruce Rogers <B.Rogers@virgin.net> writes >In article <6pn89u$98h$1@lnews.actcom.co.il>, > "Shulamit Edelstein" <shulamit@miac.com> wrote: >> Hello Everybody, >> >> What's the best way to make a list that contains the members of a libref, >> like the output of proc datasets (via SCL)? >> >> Thanks, >> Shulamit > >How about using SASHELP.VMEMBER, something like (untested): > >memlist = makelist() ; >id=open('sashelp.vmember') ; >call set(id) ; >rc = where(id,'libname = "MYLIB"') ; >do while(fetch(id)=0) ; > memlist = insertc(memlist,memname,-1) ; >end; >rc=close(id) ; > >-----== Posted via Deja News, The Leader in Internet Discussion ==----- >http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum

follow that route a little further - and use the lvarlevel function

>memlist = makelist() ; >id=open('sashelp.vmember') ; >call set(id) ;

rc = where(id, 'libname = || quote( upcase( lib )) || ' & memtype in( "DATA", "VIEW") ); n_levl = 0;

rc = lvarlevel( id, 'memname', n_levl, memlist ) ;

>rc=close(id) ;

seems like the lvarlevel function was invented for this task .. -- Peter Crawford


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