Trying to publish SAS® formats or a scoring model might result in an error with Teradata 16.20


A change was introduced in Teradata 16.20.35.01 that causes an error to occur when you publish SAS formats or a scoring model (using mechanism=static). The errors might look similar to the following when publishing SAS formats:

Errors in the SAS log:

ERROR: Function sas_put_stub was not successfully created.
ERROR: Function access was not successfully replaced.
ERROR: Function sas_put was not successfully created.
ERROR: Function access was not successfully replaced.
ERROR: Function sas_puti was not successfully created.
ERROR: Function access was not successfully created.
In the outdir/BTEQOutput.log for each create/replace function that was attempted:
ERROR: TKTSExecDirect failed.

Error in the Teradata DBQL logs for each create/replace function that was attempted:

Error (5601):
Error creating UDF/XSP/UDM/UDT/JAR: problem with temporary compile directory.

The errors written to the outdir/BTEQOutput.log and Teradata DBQL logs should be the same when publishing a scoring model. However, the errors in the SAS® log vary depending on how the data is being scored.

The issue occurs because SAS places double quotation marks around the name in the EXTERNAL NAME clause. In Teradata 16.20.35.01, a change was implemented that rejects SQL with special characters (including double quotation marks) in the EXTERNAL NAME clause.

The workarounds are to upgrade to Teradata 16.20.53.04 or later, upgrade to Teradata 17.05.01, or do the following:

  1. Use the OUTDIR= option with the publishing macros to capture the generated SQL in the outdir/BTEQInput.txt file.
  2. Edit BTEQInput.txt and remove the double quotation marks from the REPLACE FUNCTION statements.
  3. Manually submit the SQL in BTEQInput.txt from the SAS Server, using the BTEQ utility or a PROC SQL explicit pass-through.

The error does not occur when you publish scoring models using MECHANISM=EP.