Date: Mon, 30 Oct 2006 04:02:05 -0500
Reply-To: Jim Groeneveld <jim2stat@YAHOO.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jim Groeneveld <jim2stat@YAHOO.CO.UK>
Subject: Re: help with a log warning
Hi Trune,
Apart from the comments on your "error" which isn't an error at all (but
only a NOTE) I have another comment/question:
What does the automatic variable _INFILE_ contain, that you want to use in
the generated INFILE statement? Is it present in the dataset Myset? I doubt
it is. It is my impression that you are thinking of something else with
_INFILE_ than it actually is or does. The SAS docs clearly say:
"_INFILE_ is an automatic variable that references the current INPUT
buffer."
So, in order to fill _INFILE_ you have to have an INPUT statement at least,
with or without any variables specification. And the variable will contain
the full contents of each record read, one record per iteration. So it won't
contain some filename or dataset name which I assume is what you want and
are expecting from _INFILE_ (unless a variable _INFILE_ in your dataset has
such values).
The generating code may run correct (though your INFILE statement, without
INPUT, is redundant), but your generated code probably will not.
So, if you want you may reissue this subject to SAS-L now indicating what
you would want exactly from _INFILE_ and your generated SAS code.
BTW, next to your method with PUTting code to a disk file there are more
ways to generate SAS code to run at a later stage:
- CALL EXECUTE
- macro variables and/or macros
Regards - Jim.
--
Jim Groeneveld, Netherlands
Statistician, SAS consultant
home.hccnet.nl/jim.groeneveld
On Fri, 27 Oct 2006 21:18:42 +0300, truno <trune@ZIDANE.NO> wrote:
>a small job writes an output file which is later %included and executed
>
>all that works fine but I get this error in the log which is probably easy
>to fix?
>
>
>data _null_;
>infile "the file that I read in";
>file "the file that contains the output sas statements and later included";
>set myset;
>x+1;* one time for each obs in myset;
>put "data a" x " ;"
> / ' infile "'_infile_'" truncover FIRSTOBS=2; '
>yada..yada..
>
>the log shows (while the job runs fine)
>
>227 put "data a" x " ;"
>228 / ' infile "'_infile_'" truncover FIRSTOBS=2; '
> ___________
> ___________
> ___________
> 49
> 49
> 49
>NOTE 49-169: The meaning of an identifier after a quoted string may change
>in a future SAS release. Inserting white space between
> a quoted string and the succeeding identifier is recommended.
|