Add / Subtract months from a date in a Sequence

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Suhel_2112
Premium Member
Premium Member
Posts: 10
Joined: Sun Jul 15, 2012 11:34 pm
Location: Bangalore

Add / Subtract months from a date in a Sequence

Post by Suhel_2112 »

Hi i have a similar requirement as noted here to add/subtract months from a given date.
I did use Ray's Addmonth , when i Test the routine independently it works fine but when i include it in a sequence the routine fails with return code = '10893', Am i doing something wrong here :( (i have 3 month exp with data stage 7.5.x) ..

In the sequence i have a UVA stage where i use
VAR= IConv(DefineBizDate.BIZ_DATE,"D-YMD[4,2,2]")

and i pass this VAR to the routine, along with month i.e 5...

Also , is this error because transform routine cannot be used in sequence , if yes .. how do i go about it ..
Thanks & Regards
Suhel Khan

Env Info:
DataStage Version : 8.5
DSEngine Platform : Windows Server 2008 R2
DWH Platform : Oracle 10g
sudha03_vpr
Participant
Posts: 34
Joined: Tue Feb 26, 2013 9:36 am
Location: Chicago

Post by sudha03_vpr »

Transform routine needs to be used in the basic transformer. I assume you are working with Datastage server edition as you have Iconv function below. First you will be creating a server routine and then calling the routine in your transform and use the transform in the derivation part of your basic transformer.

You cannot use transform at the sequence level with Routine activity stage.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Split to your own post.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Try using the function in the expression for the user variable.
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