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.

Data Set Options <strong>for</strong> <strong>Relational</strong> <strong>Databases</strong> 4 TRAP151= Data Set Option 395ExamplesIn this example, DB2DBUG is turned on so that you can see what occurs whenTRAP151=YES:Output 11.2<strong>SAS</strong> Log <strong>for</strong> TRAP151=YESproc fsedit data=x.v4(trap151=yes);run;SELECT * FROM V4 FOR FETCH ONLYSELECT * FROM V4 FOR FETCH ONLYSELECT "A","X","Y","B","Z","C" FROM V4 FOR UPDATE OF "A","X","Y","B","Z","C"DB2 SQL Error, sqlca->sqlcode=-151WARNING: SQLCODE -151: repreparing SELECT as:SELECT "A","X","Y","B","Z","C" FROM V4 FOR UPDATE OF "A","Y","B","Z","C"DB2 SQL Error, sqlca->sqlcode=-151WARNING: SQLCODE -151: repreparing SELECT as:SELECT "A","X","Y","B","Z","C" FROM V4 FOR UPDATE OF "A","B","Z","C"DB2 SQL Error, sqlca->sqlcode=-151WARNING: SQLCODE -151: repreparing SELECT as:SELECT "A","X","Y","B","Z","C" FROM V4 FOR UPDATE OF "A","B","C"COMMIT WORKNOTE: The PROCEDURE FSEDIT used 0.13 CPU seconds and 14367K.The next example features the same code with TRAP151 turned off:Output 11.3<strong>SAS</strong> Log <strong>for</strong> TRAP151=NOproc fsedit data=x.v4(trap151=no);run;SELECT * FROM V4 FOR FETCH ONLYSELECT * FROM V4 FOR FETCH ONLYSELECT "A","X","Y","B","Z","C" FROM V4 FOR UPDATE OF "A","X","Y","B","Z","C"DB2 SQL Error, sqlca->sqlcode=-151ERROR: DB2 prepare error; DSNT4081 SQLCODE= ---151, ERROR;THE UPDATE STATEMENT IS INVALID BECAUSE THE CATALOG DESCRIPTION OF COLUMN CINDICATES THAT IT CANNOT BE UPDATED.COMMIT WORKNOTE: The <strong>SAS</strong> System stopped processing this step because of errors.NOTE: The PROCEDURE FSEDIT used 0.08 CPU seconds and 14367K.

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

Saved successfully!

Ooh no, something went wrong!