Parallel Processing in Sas: Pooja Matekar
Parallel Processing in Sas: Pooja Matekar
Parallel Processing in Sas: Pooja Matekar
Let discuss one of the approach i.e. introducing parallelism through code
Using this technique the user is required to execute just a single copy of code. Through this
code many codes will be generated and executed. Once the code is submitted, splitting the
input dataset, generation of multiple instances of the code, their execution and aggregation
of output datasets all follow automatically. Because of automation there is no need to
monitor spawned jobs.
Following is the generalized version of the code, which can be used in your code to
implement parallelism. %PARALLEL will include your code (this part is given in bold).
Using PRINTTO procedure will help us to keep our main log clean. We will redirect the
details of parallel is used to redirect the log to some other location with the specified name.
%LET JOBNAME = MYJOB ;
*** Job name must be a unique name and should NOT have extensions **;
This job name will used to create multiple SAS scripts.
%LET NUM_PARTITIONS = 10; * Number of threads;
Num_Partitions will decide the number of threads i.e. the number of independent SAS
scripts to be created.
%PARTITION;
The above do loop will create a shell script for each of the SAS script. If loop will check
whether all the scripts in that particular group have executed, if yes then it will proceed
further with other set of scripts. If not then it will wait for all the scripts in that group to
complete before it starts executing the rest scripts.