Section
1, Task 3: Create a Test PDB and
Process, Reduce, and Report on Data Action 2: Process and reduce your data. |
|
For generic collectors, you must explicitly run the staging code before processing the staged data into the PDB.
For ease of management of the code, you may want to create a SAS macro to execute the staging code. This can be accomplished through the following steps:
%MACRO macro_name ;
%MEND;
You can now use the macro to run the staging code by simply invoking the macro:
%macro_name ;
For the fax example, here is sample code to define a macro called %FAXES:
In a file called FAXES.SAS, have the following code:
%MACRO FAXES ;
[the staging code goes here; see Fax Appendix 2: Sample Code for Staging the Data]
%MEND FAXES ;
Here is how to invoke the %FAXES macro:
%FAXES ;
%INCLUDE macro_name.SAS; %macro_name; #1 RUN; %CPPROCES(COLLECTR=GENERIC,TOOLNM=SASDS,GENLIB=WORK, #2 _RC=CPPRRC); %PUT CPPROCES return code is &CPPRRC; #3
Notes:
In the PROGRAM EDITOR Window, type the following
%CPREDUCE ();
Check the SAS LOG window for any messages, warnings, or errors, in the reduce step.