home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Subject: (no subject given)
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!howland.reston.ans.net!europa.asd.contel.com!paladin.american.edu!auvm!SUVM.BITNET!NAMP
- Message-ID: <SAS-L%93010617340203@UGA.CC.UGA.EDU>
- Newsgroups: bit.listserv.sas-l
- Date: Wed, 6 Jan 1993 17:16:21 EST
- Reply-To: "Rob Cymbala--N. Amer. Maple Project" <NAMP@SUVM.BITNET>
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: "Rob Cymbala--N. Amer. Maple Project" <NAMP@SUVM.BITNET>
- Lines: 32
-
- ----------------------------------------------------------------------
- CONTENT: Hint
- SUMMARY: Making LOG with macros easier to read when using MPRINT option
- REL/PLTF: 6.07.01 / VM/HPO 5.0
-
- E-ADDR: NAMP@suvm.bitnet
- NAME: Robert Cymbala / North American Maple Project
- ADDRESS: 133 Illick Hall; SUNY-ESF; 1 Forestry Dr; Syracuse NY 13210
- PHONE: 315) 470-6742
- ----------------------------------------------------------------------
-
- Here is a discovery I'd like to share. It concerns output to the LOG
- window (or SASLOG) when macros are involved and when OPTIONS MPRINT
- is in use.
-
- If there is an extra semicolon at the beginning and end of a macro
- definition, at least two lines will always be in the LOG, of the form
- MPRINT (macroname): ;
-
- If a macro does not generate SAS statements, there is usually no
- indication in the LOG window that the macro ever was invoked. This
- is the case where it is very handy to have the macro reveal itself in
- the LOG (especially when debugging becomes tedious).
-
- Example:
- %Macro Words(x); ;
- %Local wordsi; %Let wordsi=0;
- %Do %While (%scan(&x,&wordsi+1) ne );
- %let wordsi=%eval(&wordsi+1);
- %End;
- &wordsi
- ; %mend;
-