13.07.2015 Views

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SAS/ACCESS 9.2 for Relational Databases: Reference, Fourth Edition

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

344 MULTILOAD= Data Set Option 4 Chapter 11If ML_CHECKPOINT is between 1 and 59 inclusive, checkpoints are recorded at thespecified interval in minutes. If ML_CHECKPOINT is greater than or equal to 60, thena checkpoint occurs after a multiple of the specified rows are loaded.ML_CHECKPOINT= functions very much like the Teradata MultiLoad utilitycheckpoint, but it differs from the DBCOMMIT= data set option.These restrictions apply when you restart a failed MultiLoad job.3 The failed MultiLoad job must have specified a checkpoint rate other than 0 usingthe ML_CHECKPOINT= data set option. Otherwise, restarting begins from thefirst record of the source data.Checkpoints are relevant only to the acquisition phase of MultiLoad. Even ifML_CHECKPOINT=0 is specified, a checkpoint takes place at the end of theacquisition phase. If the job fails after that (in the application phase) you mustrestart the job outside of <strong>SAS</strong> using the MultiLoad script written to the <strong>SAS</strong> log.For example, this MultiLoad job takes a checkpoint every 1000 records.libname trlib teradata user=testuser pw=XXXXXX server=dbc;/* Create data to MultiLoad */data work.testdata;do x=1 to 50000;output;end;end;data trlib.mlfloat(MultiLoad=yes ML_CHECKPOINT=1000);set work.testdata;run;3 You must restart the failed MultiLoad job as an append process because the targettable already exists. It is also necessary to identify the work tables, restart table,and the error tables used in the original job.For example, suppose that the DATA step shown above failed with this errormessage in the <strong>SAS</strong> log:ERROR: MultiLoad failed with DBS error 2644 after a checkpoint wastaken <strong>for</strong> 13000 records.Correct error and restart as an append process with data set optionsML_RESTART=<strong>SAS</strong>_ML_RS_1436199780, ML_ERROR1=<strong>SAS</strong>_ML_ET_1436199780,ML_ERROR2=<strong>SAS</strong>_ML_UT_1436199780, and ML_WORK=<strong>SAS</strong>_ML_WT_1436199780.If the first run used FIRSTOBS=n, then use the value (7278+n-1) <strong>for</strong> FIRSTOBSin the restart.Otherwise use FIRSTOBS=7278.Sometimes the FIRSTOBS value used on the restart can be an earlier positionthan the last checkpoint because restart is block-oriented and notrecord-oriented.After you fix the error, you must restart the job as an append process and youmust specify the same work, error, and restart tables as you used in the earlierrun. You use a FIRSTOBS= value on the source table to specify the record fromwhich to restart./* Restart a MultiLoad job that failed in the acquisition phaseafter correcting the error */proc append data=work.testdata(FIRSTOBS=7278)base=trmlib.mlfloat(MultiLoad=YES ML_RESTART=<strong>SAS</strong>_ML_RS_1436199780ML_ERROR1=<strong>SAS</strong>_ML_ET_1436199780 ML_ERROR2=<strong>SAS</strong>_ML_UT_1436199780ML_WORK=<strong>SAS</strong>_ML_WT_1436199780 ML_CHECKPOINT=1000);

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!