Built-In Functions

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Raftsman
Premium Member
Premium Member
Posts: 335
Joined: Thu May 26, 2005 8:56 am
Location: Ottawa, Canada

Built-In Functions

Post 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
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
Raftsman
Premium Member
Premium Member
Posts: 335
Joined: Thu May 26, 2005 8:56 am
Location: Ottawa, Canada

Post by Raftsman »

Thanks, it worked
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Most of the built-in and SDK functions are cataloged with "DSX" prefix.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply