Marks the beginning of a block of statements intended for asynchronous, parallel execution.
Valid in: | SPD Server |
Explicit SQL pass-through facility | |
Requirement: | Must be used in conjunction with the END ASYNC OPERATION Statement.Optionally used with the LIBREF Statement. |
execute(begin async operation) by sasspds;
proc sql; connect to sasspds (dbq="path1" server=host.port user='siteusr1' password='mypasswd'); execute(begin async operation) by sasspds; execute(create table state_al as select * from allstates where state='AL') by sasspds; execute(create table state_az as select * from allstates where state='AZ') by sasspds; execute(create table state_wy as select * from allstates where state='WY') by sasspds; execute(end async operation) by sasspds; /* */ /* Create indexes in a second ASYNC block */ /* */ execute(begin async operation) by sasspds; execute(create index county on state_al(county)) by sasspds; execute(create index county on state_az(county)) by sasspds; ... execute(create index county on state_wy(county)) by sasspds; execute(end async operation) by sasspds; disconnect from sasspds; quit;
libname path1 sasspds ... libgen=yes; libname path2 sasspds ... libgen=yes; proc sql; connect to sasspds (dbq='path1' host='hostname' service='spdsname' user='siteusr1') password='mypasswd'; execute(reset noexec _method) by sasspds; execute(begin async operation) by sasspds; execute(libref path1 engopt='dbq="path1" host='hostname' service='spdsname' user='siteusr1' password='mypasswd') by sasspds; execute(libref path2 engopt='dbq="path2" host='hostname' service='spdsname' user='siteusr1' password='mypasswd') by sasspds; execute(create table path1.southeast as select a.customer_id, a.region, b.sales from path1.customer a, path2.orders b where a.customer_id = b.customer_id and a.region='SE') by sasspds; execute(create table path1.northeast as select a.customer_id, a.region, b.sales from path1.customer a, path2.orders b where a.customer_id = b.customer_id and a.region='NE') by sasspds; execute(end async operation) by sasspds; disconnect from sasspds; quit;