Date: Wed, 8 Jul 1998 20:00:47 GMT
Reply-To: boston02@MY-DEJANEWS.COM
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: boston02@MY-DEJANEWS.COM
Organization: Deja News - The Leader in Internet Discussion
Subject: Re: Re[2]: macro variable for file name?
Here are some ideas:
step one, create a dataset FileName which only contains ROWID, FILENAME by
using statment like "FILE PIPE 'ls -l' ; " on your UNIX
step two: write macro which has following structure:
%MACRO GOODLUCK;
PROC SQL;
SELECT COUNT(*) INTO :Num_File
FROM FileName;
QUIT;
%DO I = 1 %TO &Num_file;
PROC SQL;
SELECT FILENAME INTO &FileName
FROM FileName
WHERE ROWID = &i;
QUIT;
DATA whatever;
INFILE "&FileName";
...
...
RUN;
...
...
%END;
%MEND GOODLUCK;
Good Luck,
John
In article <9807068997.AA899767475@jane.hccompare.com>,
Jack Hamilton <jack_hamilton@HCCOMPARE.COM> wrote:
>
> I wrote:
>
> >If you are running a batch submission under Windows, you could look at
> >the value of the system option SYSIN. It's available in SASHELP.VOPTION,
> >through data step information functions, and through macro functions.
>
> My mistake. SYSIN prints in PROC OPTIONS, so I assumed it would be
> available other places, but in fact it's not. I should have tested
> before posting. So that solution doesn't work, at least not directly.
> If you really wanted the value, you could reroute the output of PROC
> OPTIONS to a temporary file and then read it back in.
>
> I think there was a SASWare Ballot item about making host options
> available everywhere portable options are, so perhaps this feature will
> become available someday.
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
|