c*****s 发帖数: 180 | 1 What system options must you specify in order to store a compiled macro
permanently?
MAUTOSOURCE and MSTORED
MSTORED and SASAUTOS
MSTORED and SASMSTORE
MAUTOSOURCE and SASAUTOS |
|
x****t 发帖数: 1729 | 2 是不是要
options mstored sasmstore = (..., ..., sasautos);
是漏了mstored么?
不过我菜鸟,也不懂 |
|
|
|
h******n 发帖数: 3989 | 5 WHY on earth would you try and sell me a "Backup Disc" version of Office
Home and Business 2010 with NO PRODUCT KEY. I expect you contact me ASAP and
correct this order or you WILL BE REPORTED TO MICROSOFT.
I bought this download version (KEY) software from mstore and asked them to
sent a dvd later. Is the key printed on the the DVD they sent? |
|
D*******0 发帖数: 4476 | 6 7% is unknown and cannot be counted because mstore has a history of it. Most
people also paid tax. lz wants shipping included in the $700. I'd like buy
from you for the same conditions. |
|
|
|
|
|
|
|
|
|
|
|
|
h******n 发帖数: 3989 | 18 "WHY on earth would you try and sell me a "Backup Disc" version of Office
Home and Business 2010 with NO PRODUCT KEY. I expect you contact me ASAP and
correct this order or you WILL BE REPORTED TO MICROSOFT."
I bought this download version (KEY) software from mstore and asked them to
sent a dvd later. Is the key printed on the the DVD they sent? |
|
c*****s 发帖数: 180 | 19 Using Stored Compiled Macros (continued)
Creating a Stored Compiled Macro
To create a permanently stored compiled macro, you must
1. assign a libref to the SAS library in which the compiled macro will be
stored
2. set the system options MSTORED and SASMSTORE=libref
3. use the STORE option in the %MACRO statement when you submit the macro
definition.
General form, macro definition with STORE option:
%MACRO macro-name <(parameter-list)> /STORE
;
|
|
c*****s 发帖数: 180 | 20 Example
Suppose you want to store the Words macro in compiled form in a SAS library.
This example shows the macro definition for Words. The macro takes a text
string, divides it into words, and creates a series of macro variables to
store each word.
Notice that the STORE option is used in the macro definition so that Words
will be permanently stored as a compiled macro, as follows:
libname macrolib 'c:\storedlib';
options mstored sasmstore=macrolib;
%macro words(text,root=w,delim= |
|
c*****s 发帖数: 180 | 21 Complete the following code so that the macro Prtlast will be compiled and
stored in Macrolib.
libname macrolib 'c:\storedlib';
options mstored sasmstore=macrolib;
%macro
%if &syslast ne _NULL_%then %do;
proc print data=&syslast(obs=5);
title "Listing of &syslast data set";
run;
%end;
%else
%put No data set has been created yet.;
%mend; |
|
c*****s 发帖数: 180 | 22
Using Stored Compiled Macros (continued)
Accessing Stored Compiled Macros
In order to access a stored compiled macro, you must
1. assign a libref to the SAS library that contains a Sasmacr catalog in
which the macro was stored
2. set the system options MSTORED and SASMSTORE=libref
3. call the macro.
Only one permanent catalog containing compiled macros can be accessed at any
given time.
Example
The following program calls the Words macro. Assume that the Words macro was
compi |
|
c*****s 发帖数: 180 | 23
Using Stored Compiled Macros (continued)
The Stored Compiled Macro Facility can be used in conjunction with the
Autocall Facility and with session-compiled macros. When you submit a macro
call such as %words, the macro processor searches for the macro Words as
1. an entry named Words.Macro in the temporary Work.Sasmacr catalog.
2. an entry named Words.Macro in the Libref.Sasmacr catalog. The MSTORED
option must be specified, and the SASMSTORE option must have a value of
Libref.
|
|
j**i 发帖数: 419 | 24 do it like this for each table?
or is there a easier way?
SET PAGESIZE 0
SET FEEDBACK OFF
SET TERMOUT OFF
SPOOL C:\RawData\main.csv
select
TO_CHAR(mperiod,'YYYYMMDD')||','||Mstore||','||MITEM||','||MQ||','||MC||'
,'||MP
from Tablename1
/
SPOOL OFF
Thank you very much! |
|