DSCAPIOP_ replacing "$" in Teradata API and Multi-

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

DSCAPIOP_ replacing "$" in Teradata API and Multi-

Post by throbinson »

These stage DLLs appear identical to me Server to EE. Server jobs work with Project Environment parameters, EE jobs fail.

Can anyone explain why EE jobs that use the Teradata API or Teradata Multi-load stages feel the need to translate Project Environment parameters? What is the technical rationale for this substitution?

I've searched on DSCAPIOP. There's a fair amount of mis-information out there but it appears this is a problem with the DB2 and Dynamic RDBMS stages too.

As an example;

$DATADIR becomes DSCAPIOP__DATADIR when the job is compiled and run;

Error log

Teradata_Multiload_0,0: Fatal Error: Fatal: Cannot create control file #DSCAPIOP__DATADIR#/thrtest.ctl: No such file or directory [dscapiop.C:1882]


osh
LMETHOD=\'Invoke MultiLoad\',
LOADTYPE=\'Upsert\',
DIRPATH=\'\#DSCAPIOP__DATADIR\#\',
OVERWRITE=\'YES\',
LARGEFILES=\'YES\',
score
LMETHOD=\\'Invoke MultiLoad\\',LOADTYPE=\\'Upsert\\', \n DIRPATH=\\'#DSCAPIOP__DATADIR#\\', \n OVERWRITE=\\'YES\

Teradata Enterprsie Stage works fine with Project Environment parameters.
dsdeveloper13
Participant
Posts: 10
Joined: Thu Aug 28, 2008 12:40 am

Re: DSCAPIOP_ replacing "$" in Teradata API and Mu

Post by dsdeveloper13 »

When the environment variables are not impoted explicitly, such errors occur. Make sure that all the variables being used are imported into the job.

[quote="throbinson"]These stage DLLs appear identical to me Server to EE. Server jobs work with Project Environment parameters, EE jobs fail.

Can anyone explain why EE jobs that use the Teradata API or Teradata Multi-load stages feel the need to translate Project Environment parameters? What is the technical rationale for this substitution?

I've searched on DSCAPIOP. There's a fair amount of mis-information out there but it appears this is a problem with the DB2 and Dynamic RDBMS stages too.

As an example;

$DATADIR becomes DSCAPIOP__DATADIR when the job is compiled and run;

Error log

Teradata_Multiload_0,0: Fatal Error: Fatal: Cannot create control file #DSCAPIOP__DATADIR#/thrtest.ctl: No such file or directory [dscapiop.C:1882]


osh
LMETHOD=\'Invoke MultiLoad\',
LOADTYPE=\'Upsert\',
DIRPATH=\'\#DSCAPIOP__DATADIR\#\',
OVERWRITE=\'YES\',
LARGEFILES=\'YES\',
score
LMETHOD=\\'Invoke MultiLoad\\',LOADTYPE=\\'Upsert\\', \n DIRPATH=\\'#DSCAPIOP__DATADIR#\\', \n OVERWRITE=\\'YES\

Teradata Enterprsie Stage works fine with Project Environment parameters.[/quote]
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

Post by throbinson »

I assume you mean importing by selecting them rather then typing them in. This is not an available option. They have to be typed. It is also not an option in the Server versions of these EE jobs. Both sets are imported the same way -- they are manually typed. Server jobs work, EE jobs fail. Perhaps the EE jobs don't recognize them as parameters? How does that figure with the substitution of the $ with DSCAPIOP__? In what stage did you experience this problem with typed Project Environment parameters versus selecting them from a list?
toshea
Participant
Posts: 79
Joined: Thu Aug 14, 2008 6:46 pm

Post by toshea »

I believe it's a bug in the job compiler. The environment variable job parameter should be represented in the osh as [$DSCAPIOP_PARAMNAME] instead of #DSCAPIOP_PARAMNAME#. Try getting the patch for Ecase 104775.
Post Reply