Date: Sun, 6 Apr 1997 17:14:52 -0500
Reply-To: drozd@ibm.net
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Bob Drozd <drozd@IBM.NET>
Subject: Re: MVS SAS Proc SOURCE ?
Content-Type: text/plain; charset=us-ascii
Jeff Kroll wrote:
>
> In a message dated 97-04-05 17:04:05 EST, you write:
>
> << Anybody have any documentation on this? I want to code a string search to
> go through a number of PDSs and their (SAS code, JCL, etc.) members looking
> for non-SAS-date date fields as part of a year-2000 project. I found a
> reference to using Proc Source which would go through PDSs and possibly
> write their members' contents out to a flat file which you could then scan
> with an INFILE statement. Alas, no recent documentation to be found
> anywhere!
> >>
> If youre working on an MVS system then you may have a product called File-Aid
> installed. There is a feature of File-Aid that can search entire PDS's for a
> given string and produce a report as a result.
>
> Jeff K
If you don't have FileAid or are a bigtime SAS fan like me then:
The documentation for PROC SOURCE is in the SAS Companion for MVS
(Version 6). We use this proc for searching all the time. Use the proc
to write the "flatfile" version of the selected PDS members to a
temporary flatfile with most likely RECFM=FB and LRECL=80. The use the
DATA step to read the file with something like INPUT @1 record $char80
@; and look for the member name from the IEBCOPY control card that PROC
SOURCE automatically inserts between each member. Do that first and
retain the member name so that you know where the selected date string
exists. Then reread using the INDEX function so that you find the date
string as the function will return a nonzero value if the string exists
in the 80 char var.
Hope this helps
Bob Drozd
drozd@ibm.net
Cincinnati Bell Information Systems, Comm. Solutions Group,
Itasca, IL
|