Page 1 of 1
Built-In Functions
Posted: Tue May 31, 2005 10:06 am
by Raftsman
I want to use the internal DS functions "Convertweek" and "Week.tag" in a built-in function. I get the following error messages
Array 'ConvertWeek' never dimensioned.
Array 'WEEK.TAG' never dimensioned.
Do I need to declare these internal commands somewhere.
Thanks
Posted: Tue May 31, 2005 10:22 am
by ArndW
Raftsman,
you also should add the following code to your BASIC program:
Code: Select all
$IFNDEF JOBCONTROL.H
$INCLUDE DSINCLUDE JOBCONTROL.H
$ENDIF
This will include the standard DataStage function and routine calls. The two you are referring to are not included in this. You would need to add
Code: Select all
DEFFUN ConvertWeek(Arg1,Arg2) CALLING 'DSX.'CONVERT.WEEK'
DEFFUN WEEK.TAG(Arg1) CALLING 'DSX.WEEKTAG'
to your program to call these functions.
Posted: Tue May 31, 2005 10:28 am
by Raftsman
Thanks, it worked
Posted: Tue May 31, 2005 10:32 am
by ArndW
No problem, these two are exceptions, normally your functions & routines are catalogued as DSU.{routinename} and the DEFFUN syntax is the same; but that didn't work when I tried it for your question so I had to look a bit deeper.
Posted: Tue May 31, 2005 5:22 pm
by ray.wurlod
Most of the built-in and SDK functions are cataloged with "DSX" prefix.