Sample Program Log:
NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1B0)
Licensed to SAS Institute Inc., Site 1.
NOTE: This session is executing on the W32_7PRO platform.
NOTE: SAS initialization used:
real time 0.45 seconds
cpu time 0.20 seconds
1 options source source2;
2
3 options mcoverage mcoverageloc='./foo.dat';
4
5 /* 1 */ %macro
6 /* 2 */ foo (
7 /* 3 */ arg,
8 /* 4 */
9 /* 5 */
10 /* 6 */ arg2
11 /* 7 */
12 /* 8 */
13 /* 9 */ =
14 /* 10 */
15 /* 11 */ This is the default value of arg2)
16 /* 12 */ ;
17 /* 13 */ /* This is a number of lines of comments */
18 /* 14 */ /* which presumably will help the maintainer */
19 /* 15 */ /* of this macro to know what to do to keep */
20 /* 16 */ /* this silly piece of code current */
21 /* 17 */ %if &arg %then %do;
22 /* 18 */ data _null_;
23 /* 19 */ x=1;
24 /* 20 */ %end;
25 /* 21 */ %* this is a macro comment statement
26 /* 22 */ that also can be used to document features
27 /* 23 */ and other stuff about the macro;
28 /* 24 */ %else
29 /* 25 */ %do;
30 /* 26 */ DATA _NULL_;
31 /* 27 */ y=1;
32 /* 28 */ %end;
33 /* 29 */ run;
34 /* 30 */
35 /* 31 */
36 /* 32 */
37 /* 33 */
38 /* 34 */
39 /* 35 */ %mend
40 /* 36 */
41 /* 37 */
42 /* 38 */
43 /* 39 */
44 /* 40 */
45 /* 41 */
46 /* 42 */
47 /* 43 */ foo This is text which should generate a warning! ;
WARNING: Extraneous information on %MEND statement ignored for macro
definition FOO.
364 Chapter 20 System Options for Macros
MCOVERAGELOC= System Option
Specifies the location of the coverage analysis data file.
Valid in: Configuration file, OPTIONS window, OPTIONS statement, SAS invocation
Category: Macro
PROC OPTIONS
GROUP=
Macro
Type: System option
Requirement: Use with MCOVERAGE system option
See: “MCOVERAGE System Options” on page 361
Syntax
MCOVERAGELOC=fileref | file-specification
Required Argument
fileref | file-specification
a SAS fileref or an external file specification enclosed in quotation marks.
Details
This MCOVERAGELOC = system option specifies where the coverage analysis is to be
written. The option takes either an external file specification enclosed in quotation marks
or a SAS fileref.
MERROR System Option
Specifies whether the macro processor issues a warning message when a macro reference cannot be
resolved.
Valid in: Configuration file, OPTIONS window, OPTIONS statement, SAS invocation
Category: Macro
PROC OPTIONS
GROUP=
MACRO
Type: System option
Default: MERROR
Syntax
MERROR | NOMERROR
MERROR System Option 365
Required Arguments
MERROR
issues the following warning message when the macro processor cannot match a
macro reference to a compiled macro:
WARNING: Apparent invocation of macro %text not resolved.
NOMERROR
issues no warning messages when the macro processor cannot match a macro
reference to a compiled macro.
Details
Several conditions can prevent a macro reference from resolving. These conditions
appear when
a macro name is misspelled
a macro is called before being defined
strings containing percent signs are encountered. For example:
TITLE Cost Expressed as %Sales;
If your program contains a percent sign in a string that could be mistaken for a macro
keyword, specify NOMERROR.
MERROR System Option
Specifies whether the macro processor issues a warning message when a macro reference cannot be
resolved.
Valid in: Configuration file, OPTIONS window, OPTIONS statement, SAS invocation
Category: Macro
PROC OPTIONS
GROUP=
MACRO
Type: System option
Default: MERROR
Syntax
MERROR | NOMERROR
Required Arguments
MERROR
issues the following warning message when the macro processor cannot match a
macro reference to a compiled macro:
WARNING: Apparent invocation of macro %text not resolved.
NOMERROR
issues no warning messages when the macro processor cannot match a macro
reference to a compiled macro.
366 Chapter 20 System Options for Macros
Details
Several conditions can prevent a macro reference from resolving. These conditions
appear when
a macro name is misspelled
a macro is called before being defined
strings containing percent signs are encountered. For example:
TITLE Cost Expressed as %Sales;
If your program contains a percent sign in a string that could be mistaken for a macro
keyword, specify NOMERROR.
MEXECNOTE System Option
Specifies whether to display macro execution information in the SAS log at macro invocation.
Valid in: Configuration file, OPTIONS window, OPTIONS statement, SAS invocation
Category: Macro
PROC OPTIONS
GROUP=
MACRO
Type: System option
Default: NOMEXECNOTE
See: MEXECSIZE on page 367
Syntax
MEXECNOTE | NOMEXECNOTE
Required Arguments
MEXECNOTE
displays the macro execution information in the log when the macro is invoked.
NOMEXECNOTE
does not display the macro execution information in the log when the macro is
invoked.
Details
The MEXECNOTE option controls the generation of a NOTE in the SAS log that
indicates the macro execution mode.
MEXECSIZE System Option
Specifies the maximum macro size that can be executed in memory.
Valid in: Configuration file, OPTIONS window, OPTIONS statement, SAS invocation
Category: Macro
MEXECSIZE System Option 367
PROC OPTIONS
GROUP=
MACRO
Type: System option
Default: 65536
See: MEXECNOTE on page 367 and MCOMPILENOTE on page 360
Syntax
MEXECSIZE=n | nK | nM | nG | nT | hexX | MIN | MAX
Required Arguments
n
specifies the maximum size macro to be executed in memory available in bytes.
nK
specifies the maximum size macro to be executed in memory available in kilobytes.
nM
specifies the maximum size macro to be executed in memory available in megabytes.
nG
specifies the maximum size macro to be executed in memory available in gigabytes.
nT
specifies the maximum size macro to be executed in memory available in terabytes.
MIN
specifies the minimum size macro to be executed in memory. Minimum value is 0.
MAX
specifies the maximum size macro to be executed in memory. Maximum value is
2,147,483,647.
hexX
specifies the maximum size macro to be executed in memory by a hexadecimal
number followed by an X.
Details
Use the MEXECSIZE option to control the maximum size macro that will be executed
in memory as opposed to being executed from a file. The MEXECSIZE option value is
the compiled size of the macro. Memory is allocated only when the macro is executed.
After the macro completes, the memory is released. If memory is not available to
execute the macro, an out-of-memory message is written to the SAS log. Use the
MCOMPILENOTE option to write to the SAS log the size of the compiled macro. The
MEMSIZE option does not affect the MEXECSIZE option.
MFILE System Option
Specifies whether MPRINT output is routed to an external file.
Valid in: Configuration file, OPTIONS window, OPTIONS statement, SAS invocation
Category: Macro
368 Chapter 20 System Options for Macros
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset