Page 1 of 1

Posted: Wed Jun 27, 2007 3:29 pm
by ray.wurlod
What is the value coming in from DSLink8.PROCESS_DT ?

Capture this using stage tracing or the Debugger or an extra output from the Transformer stage to a text file.

Posted: Wed Jun 27, 2007 4:26 pm
by naren6876
ray.wurlod wrote:What is the value coming in from DSLink8.PROCESS_DT ?

Capture this using stage tracing or the Debugger or an extra output from the Transformer stage to a text file. ...
The value coming in that link is 20070627

Thanks in advance

Posted: Wed Jun 27, 2007 8:27 pm
by ray.wurlod
OK, now output FMT(DSLink8.PROCESS_DT, "L####/##/##") to establish whether the problem is in Fmt() or Iconv().

Posted: Thu Jun 28, 2007 3:28 am
by rafik2k
What is the source datatype? and what is the target db2 date format?

Depending upon your target format, use iconv and oconv function accordingly like

Code: Select all

Oconv((Iconv(DSLink8.PROCESS_DT,"DYMD")),"D-YMD[4,2,2]")

Posted: Thu Jun 28, 2007 7:08 am
by ray.wurlod
Can you please also output Len(Fmt(DSLink8.PROCESS_DT, "L####/##/##")) and Quote(Fmt(DSLink8.PROCESS_DT, "L####/##/##")) so we can be sure there are no non-printing characters?

Although theoretically unnecessary, try being specific about the format in the Iconv() function.
Iconv(Fmt(DSLink8.PROCESS_DT, "L####/##/##"), "D/YMD[4,2,2]")
or
Iconv(Left(Fmt(DSLink8.PROCESS_DT, "L####/##/##"), 10), "DYMD")

Posted: Thu Jun 28, 2007 7:22 am
by naren6876
ray.wurlod wrote:Can you please also output Len(Fmt(DSLink8.PROCESS_DT, "L####/##/##")) and Quote(Fmt(DSLink8.PROCESS_DT, "L####/##/##")) so we can be sure there are no non-printing characters?

Although theoretic ...
The output of
Len(Fmt(DSLink8.PROCESS_DT, "L####/##/##")) = 10

Quote(Fmt(DSLink8.PROCESS_DT, "L####/##/##"))
and I am not able to use the Quote and receiving message like

variable 'Quote' not defined.

Thanks in advance.

Posted: Thu Jun 28, 2007 6:56 pm
by ArndW
naren6876, add a parenthesis, the line is

Code: Select all

Quote(Fmt(DSLink8.PROCESS_DT, "L####/##/##")))

Posted: Thu Jun 28, 2007 10:09 pm
by chulett
Two lefts and three rights, Arnd? :wink:

DQuote or SQuote, there is no Quote.

Posted: Thu Jun 28, 2007 10:13 pm
by ArndW
Craig - I guess I really can't count. Silly me.

Naren6876 - Please ignore my earlier post and follow Master Craig's suggestion.

Posted: Thu Jun 28, 2007 10:23 pm
by ray.wurlod
There IS a Quote function - I use it a lot.

Quote is not in DSParams, but you can put it there so that it should compile and run successfully. But DQuote or SQuote will serve as well for the current purpose.

Posted: Fri Jun 29, 2007 6:24 am
by chulett
There is? It didn't come up in the ellipsis list of functions and the OP's error suggested it didn't exist. The online help has an entry for Quote but actually brings up DQuote. :?

I'll take your word for it.

Posted: Fri Jun 29, 2007 6:34 am
by ray.wurlod
As noted, 'tis not in DSParams.

Posted: Fri Jun 29, 2007 6:35 am
by chulett
As noted, 'tis not in the Help either. :wink: