home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / bit / listserv / sasl / 5540 < prev    next >
Encoding:
Text File  |  1993-01-06  |  1.7 KB  |  44 lines

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