|
Ron, I'm sure you've probably come across my suggested technique, but for
the benefit of those that haven't I will document it herein:
%macro numobs(dsn);
%global numobs;
%if %upcase(&dsn)=%str(HELP) %then %do;
%put HELP: CODE YOUR MACRO DOCUMENTATION HERE E.G.
%put HELP: NUMOBS should be invoked with a valid SAS dataset;
%put HELP: name e.g. %nrstr(%NUMOBS(SASDATA.CHKFILE)).;
%put HELP: Note: The LIBNAME must already be assigned.;
%end;
%else %do;
%* Macro statements here;
%end;
%mend numobs;
Regards
Neil Simpson
UK
> ----------
> From: Fehd, Ronald J.[SMTP:rjf2@CDC.GOV]
> Sent: 17 November 1999 17:07
> To: SAS-L@LISTSERV.VT.EDU
> Subject: suggest: an option to include
>
> problem statement: how to review macro parameters or macro help file
>
> discussion: somewhere I thought I remember that there was an option to
> %include that specified how many lines of the file to bring in. No such
> luck.
>
> What I really want: I have a macro of more than 100 lines of SAS code,
> including the first page of the file with comments explaining suggestions
> for usage and description of the parameter usage.
> example:
> - - - - - mymacro.sas - - -
> /**********************
> use this macro in this fashion
> /**********************/
> %macro mymacro(<parameter list);
> *SAS statements;%MEND;
> - - - - - - endFile - - - -
>
> In order to write a new application using this macro I have to open
> mymacro.sas in either a text editor or SAS. Either way is unproductive,
> when
> what I want is just the help portion of the file.
>
> What I suggest is an option to %include:
> %include sasautos(mymacro) / lines = 3;
>
> However, I would be pleased if there were some other trick that would
> allow
> me to get the comments and macro definition, perhaps something like
> %arguments(mymacro)
> or %macro_comments(mymacro).
>
> Ron Fehd CDC Atlanta GA
>
---------------------------------------------------------------------------
The contents of this e-mail may be privileged and are confidential. It may not be disclosed to or used by anyone other than the addressee(s), nor copied in any way. If received in error, please advise the sender, then delete it from your system.
National Westminster Bank Plc is regulated by the Personal Investment Authority and IMRO for investment business. A member of the NatWest and Gartmore Marketing Group advising on the life assurance, pensions and unit trust products only of that Marketing Group.
Registered Office: 41 Lothbury London EC2P 2BP
Registered Number: 929027 England
---------------------------------------------------------------------------
|