Page 1 of 1

Add / Subtract months from a date in a Sequence

Posted: Thu Feb 28, 2013 10:23 am
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 ..

Posted: Thu Feb 28, 2013 10:35 am
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.

Posted: Thu Feb 28, 2013 11:28 am
by chulett
Split to your own post.

Posted: Thu Feb 28, 2013 3:36 pm
by ray.wurlod
Try using the function in the expression for the user variable.