The SCAPROC Procedure |
This example writes information from the SAS Code Analyzer to the file named 1.txt. The example code also runs the Grid Job Generator, and writes that information to the file named 1.grid. Notice that this example does not have an ending statement that contains this code:
proc scaproc; write; run;
When SAS terminates, PROC SCAPROC automatically runs any pending RECORD or GRID statements.
Note: For the GRID statement to work, your site has to license SAS Grid Manager or SAS/CONNECT. SAS Grid Manager enables your generated grid job to run on a grid of distributed machines. SAS/CONNECT enables your generated grid job to run on parallel SAS sessions on one symmetric multiprocessing (SMP) machine.
proc scaproc; record '1.txt' grid '1.grid'; run; data a; do i = 1 to 100000; j = cos(i); output; end; run; proc print data=a(obs=25); run; proc means data=a; run;
Contents of the 1.txt file:
/* JOBSPLIT: DATASET OUTPUT SEQ WORK.A.DATA */ /* JOBSPLIT: LIBNAME WORK ENGINE V9 PHYS C:\DOCUME~1\userid\LOCALS~1\Temp\SAS Temporary Files\_TD1252 */ /* JOBSPLIT: ELAPSED 375 */ /* JOBSPLIT: PROCNAME DATASTEP */ /* JOBSPLIT: STEP SOURCE FOLLOWS */ data a; do i = 1 to 1000000; j = cos(i); output; end; run; /* JOBSPLIT: DATASET INPUT SEQ WORK.A.DATA */ /* JOBSPLIT: LIBNAME WORK ENGINE V9 PHYS C:\DOCUME~1\userid\LOCALS~1\Temp\SAS Temporary Files\_TD1252 */ /* JOBSPLIT: ELAPSED 46 */ /* JOBSPLIT: PROCNAME PRINT */ /* JOBSPLIT: STEP SOURCE FOLLOWS */ proc print data=a(obs=25); run; /* JOBSPLIT: DATASET INPUT SEQ WORK.A.DATA */ /* JOBSPLIT: LIBNAME WORK ENGINE V9 PHYS C:\DOCUME~1\userid\LOCALS~1\Temp\SAS Temporary Files\_TD1252 */ /* JOBSPLIT: FILE OUTPUT C:\WINNT\Profiles\userid\1.txt */ /* JOBSPLIT: SYMBOL GET SYSSUMTRACE */ /* JOBSPLIT: ELAPSED 81453 */ /* JOBSPLIT: PROCNAME MEANS */ /* JOBSPLIT: STEP SOURCE FOLLOWS */ proc means data=a; run; /* JOBSPLIT: END */
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.