Server Job - DS 6.0
I am trying to see if there is a better method to ensure that a passed value onto a Transform Stage is valid. I have an input variable of a Varchar(10) that is a YYYYMMDD date format. I know that I could do an if/then/else bunch of checks by breaking down those fields, validating whether the date is valid, ensuring that the DD is correct for the corresponding MM, particularly for the YYYY format (taking in account the leap year day rule). Not to forget handling those truncated and NULL fields.
Naturally, it will be a pain in the butt to do.
![Smile :)](./images/smilies/icon_smile.gif)
So I'm trying to find a better way. The closest I came was this:
ICONV([field], "D[4,2,2]")
Status()
I believe Status() is a BASIC function, and I must plea ignorance on the inner-working of BASIC at this time. I am trying to handle this via 2 Stage Variables, but I knew it would not work.
My question to you folks -- What is the proper way to obtain the returned Status for an iconv call? How do I include a BASIC function within the Transform stage?
Your help is deeply appreciated.
-T.J.
* * *
... now if this can make breakfast, my life is complete.