| Date: | Fri, 24 Jan 2003 15:16:15 -0500 |
| Reply-To: | Ian Whitlock <WHITLOI1@WESTAT.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Ian Whitlock <WHITLOI1@WESTAT.COM> |
| Subject: | Re: How to automatically include sas source to output |
|
| Content-Type: | text/plain; charset="iso-8859-1" |
|---|
Ron,
You are missing the point here. No simple file copying macro can write all
the input code to a print file in a language where the code can be a
consequence of the data. For example.
data _null_ ;
infile "this_run.sas" truncover ;
input line $char90. ;
call execute ( line ) ;
run ;
%include fileref1 / source2 ;
The code can run fine from my machine, but you cannot even tell me how many
lines of code are involved, what files are involved, or even what computer
systems for that matter.
Nothing less than execution and a **good** log can tell what code was
processed, even when your are guaranteed that no macro is involved. (I was
just hoping to get line numbers line numbers in your platform.)
Well you have a happy customer anyway, and no doubt many votes will be
coming. Just be careful about what you promise. You aren't running from or
for a political office, you know. Can you make that pear review?
IanWhitlock@westat.com
-----Original Message-----
From: Fehd, Ronald J. (PHPPO) [mailto:rjf2@CDC.GOV]
Sent: Thursday, January 23, 2003 4:20 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: How to automatically include sas source to output
> From: ulagappan [mailto:ulagappan@HOTMAIL.COM]
> Thanks Fehd, Ronald J. PHPPO,
>
> It worked well. I saved your file and used %include to
> suppress unwanted codes.
> From: Ian Whitlock [mailto:WHITLOI1@WESTAT.com]
> Well, Ron, now you have your work cut out for you. You need
> an INCLUDE option to indicate whether the include files
> should go into the print or not. and maybe a MACRO option to
> indicate where macro calls should be expanded in a good
> format, say with line numbers.
%LET SOURCE2 = SOURCE2;
%LET SOURCE2 = NOSOURCE2;
%ECHO(FILEREF="&PATH.PGM\PROGRAM1.SAS");
%INCLUDE PGM(PROGRAM1)/&SOURCE2.;
As always the question is:
"How much detail is too much detail?"
expand the macros?
I'll stick with the simple tasks!
> That reminds me. On your platform, how do you intend to
> enforce the usage of your Writing for Reading or Reuse SAS
> Style Sheet? I need to know before I vote. :>
I haven't decided whether to recommend
peer or pair
review.
At any rate not everyone has passed
the Certified Reading/Reuse Program Writers Exam,
I'll be teaching a prep course for that at SUGI,
... one of these years.
Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov
Bureaucracy at its worst is better than bureaucracy at its best
-- Plato, in Beetle Bailey comic strip, 1985Mar01
|