Date: Thu, 6 Apr 2000 12:57:49 -0400
Reply-To: "L. Bertolini" <bertolini.1@OSU.EDU>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "L. Bertolini" <bertolini.1@OSU.EDU>
Organization: Ohio State University
Subject: Re: getting members of a pds
Content-Type: text/plain; charset=us-ascii
You can get the contents of a PDS directory.
This code glommed from the SAS Companion for MVS:
FILENAME PDS 'DEV396.ISPF.LIB'
DISP=SHR;
FILENAME TEMP
'&TEMP';
PROC SOURCE INDD=PDS NODATA NOPRINT
DIRDD=TEMP;
RUN;
DATA
PDSMBRS;
INFILE TEMP
END=EOF;
DO WHILE
(EOF=0);
INPUT
MEMBER
$CHAR8.
TTR
PIB3.
IND
PIB1.
@;
/* GET ISPF STATISTICS, IF THEY EXIST
*/
IF ((2*MOD(IND,32)) = 30) THEN
DO;
INPUT
VER
PIB1.
MOD
PIB1.
+2
CREATED
PD4.
CHANGED
PD4.
HH
PK1.
MM
PK1.
SIZE
PIB2.
INIT
PIB2.
MODL
PIB2.
USERID
$CHAR8.
;
END;
ELSE
DO;
INPUT;
VER =
.;
MOD =
.;
CREATED =
.;
CHANGED =
.;
HH =
.;
MM =
.;
SIZE =
.;
INIT =
.;
MODL =
.;
USERID = '
';
END;
OUTPUT;
END; /* END OF READ LOOP
*/
STOP;
RUN;
If you wanted to read all of the members (or particular
members), you could use the FILEVAR option of the
INFILE statement: set FILEVAR to the first member,
loop until EOF, the set FILEVAR To next member;
lather, rinse, repeat.
V8 is supposed to support wildcards for member names.
cortney wrote:
>
> Hello,
>
> I have used the pipe in conjunction with the filename command in
> UNIX to get the filenames in a specified directory into a SAS
> dataset. Is this possible to do under MVS (v6.09, but we have
> v8 to install)?
>
> Thanks,
> Cortney
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network *
> The fastest and easiest way to search and participate in Usenet - Free!
--
Larry Bertolini
University Technology Services
The Ohio State University
"The large print giveth, and the small print taketh away." - Tom Waits