Hi,
I get an error when compiling a routine that calls a transform. All I have in a routine for now is:
Ans=TAG.TO.DATE("2006-03-24");
and I get an error when I compile:
"Array 'TAG.TO.DATE' never dimensioned."
What am I missing? I also tried to use the following and I get the same error to dimension the function:
Ans=ConvertTag("2006-03-24", "I");
What's going on?
Thanks.
Transform in Routine
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It is not possible to use Transforms within Routines. You can, however, copy the Transform's definition expression and use that in a Routine. In the case of a Transform that invokes another Routine (like TAG.TO.DATE) you will also need a DEFFUN declaration for that other routine.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Re: Transform in Routine
Hi
Copy the definition(source code) of TAG.TO.DATE from the transform and use it within the routine. Use an intermediate variable to store the result of the routine.
alternatively this is the way you could go about it
Ans = ICONV(Arg1,"D-YMD")
where Arg1 = "2006-03-24"
Thanks
Copy the definition(source code) of TAG.TO.DATE from the transform and use it within the routine. Use an intermediate variable to store the result of the routine.
alternatively this is the way you could go about it
Ans = ICONV(Arg1,"D-YMD")
where Arg1 = "2006-03-24"
Thanks