Previous Page | Next Page

ARM Logging

Traditional ARM Log

The SAS 9.2 ARM interface preserves the existing SAS 9.1 ARM interface as much as possible, including the ARM log. After you install SAS 9.2, you do not have to use the SAS logging facility or the performance macros. You can continue using user-defined correlators, ARM macros with user-defined metrics, and the ARMLOC= system option.

The ARM log is a preformatted output file, which contains comma-separated contents. The format includes a one-character identifier that represents the ARM call, a date.time group, transaction ID, user CPU time, and system CPU time. This information is followed by transaction-unique details, such as correlators and user metrics.

Instructions for defining correlators and user metrics are in the SAS 9.1 documentation.

The following code uses the ARM macros, user-defined metrics, and correlators:

%let _armexec=1;
%let _armacro=1;

%arminit(appname="OpenCodeARMGTID test w/ user metrics");
%armgtid(txnname="OpenCode02",txnidvar=txn1,
     metrNam1="ShtStr",
     metrDef1=short,
     metrNam2="cnt32",
     metrDef2=count32);

%put SYSPARM=&sysparm 
%armstrt(txnidvar=txn1,metrval1=&sysparm); 

 data x;
 do i=1 to 10000;
 x=i; y=0-i;
 output;
 end; run;

proc sort  data=x threads; by y;  run;

%armstop; 
%armend;

The default name of the log file is ARMLOG.LOG. To specify a different name, use the ARMLOC= system option. The following is the ARM log output:

I,1523811290.756000,1,0.015625,0.468750,SAS,USERID
G,1523811290.771000,1,1,PROCEDURE,PROC START/STOP,PROC_NAME,
     ShortStr,PROC_IO,Count64,PROC_MEM,Count64,PROC_LABEL,LongStr
I,1523811291.396000,2,0.093750,0.750000,OpenCodeARMGTID test w/ user metrics,*
G,1523811291.537000,2,2,OpenCode02,,ShtStr,ShortStr,cnt32,Count32
S,1523811291.678000,2,2,1,0.281250,0.828125
S,1523811291.693000,1,1,2,0.281250,0.843750,DATASTEP,0,0,
P,1523811291.787000,1,1,2,0.296875,0.906250,0,DATASTEP,311169,257544,
S,1523811291.803000,1,1,3,0.296875,0.906250,SORT    ,0,0,
P,1523811291.975000,1,1,3,0.343750,1.000000,0,SORT    ,532865,2099080,
P,1523811292.021000,2,2,1,0.375000,1.015625,0
E,1523811292.068000,2,0.375000,1.046875
E,1523811292.131000,1,0.375000,1.078125

After performance data is written to the ARM log, you can use the ARM postprocessing macros to read the log and to create SAS data sets for reporting and analysis. The postprocessing macros are specific to the SAS ARM implementation; they are not part of the ARM open API standard. The postprocessing macros cannot be used with the SAS logging facility.

Note:   If you use the SAS 9.2 ARM interface, the SAS logging facility, and the performance macros, do not use the postprocessing macros.  [cautionend]

The following example uses the %ARMPROC and %ARMJOIN postprocessing macros:

filename ARMLOG 'd:\armlog';
  %armproc();
  %armjoin();

Previous Page | Next Page | Top of Page