Topic
  • 7 replies
  • Latest Post - ‏2013-01-07T15:57:27Z by Rphilo
admkazuya
admkazuya
11 Posts

Pinned topic %TOTIME things

‏2012-12-28T02:14:58Z |
Hi, 
 
I have a problem using %TOTIME function on mirroring AS400 to AIX.
When I use %TOTIME function, "Error parsing input to '%TOTIME': . " in logfile on <CDCINSTDIR>/instance/<INSTANCENAME/log 
Any Idea?
 
PS. Sorry for my bad English 
 
Regards, 
 
Kazuya 
 
Updated on 2013-01-07T15:57:27Z at 2013-01-07T15:57:27Z by Rphilo
  • Rphilo
    Rphilo
    391 Posts

    Re: %TOTIME things

    ‏2013-01-03T11:02:06Z  
     Kazuya
     
    If you are getting this error when you are trying to replicate data, I suspect that the iSeries is not providing valid date/time information. try converting the source data to a character column and writing away to a  temporary table on the target so that you can see easily what is being sent
     
    Regards
     
    Robert
  • admkazuya
    admkazuya
    11 Posts

    Re: %TOTIME things

    ‏2013-01-04T02:28:44Z  
    Hi, Robert 
     
    I try to convert AS400 to AIX, for example follows. 
     %IF(UPTB__='' ,%TOTIME(NULL) ,%TOTIME("11:11:11"))
     
    I watched carefully AS400 data and it has blank data on UPTB__ field, it happened 'parse error  %TOTIME'
     
    Any solutions ? 
     
    Regrets,
     
    Kazuya 
     
     
  • Rphilo
    Rphilo
    391 Posts

    Re: %TOTIME things

    ‏2013-01-04T10:46:49Z  
    • admkazuya
    • ‏2013-01-04T02:28:44Z
    Hi, Robert 
     
    I try to convert AS400 to AIX, for example follows. 
     %IF(UPTB__='' ,%TOTIME(NULL) ,%TOTIME("11:11:11"))
     
    I watched carefully AS400 data and it has blank data on UPTB__ field, it happened 'parse error  %TOTIME'
     
    Any solutions ? 
     
    Regrets,
     
    Kazuya 
     
     
     Kazuya
     
    Assuming UPTB__ is a string and the column being populated is nullable, I think you would need something like %IF(UPTB__=' ',NULL,%TOTIME(UPTB__))
     
    Regards
     
    Robert
  • admkazuya
    admkazuya
    11 Posts

    Re: %TOTIME things

    ‏2013-01-04T14:32:43Z  
    • Rphilo
    • ‏2013-01-04T10:46:49Z
     Kazuya
     
    Assuming UPTB__ is a string and the column being populated is nullable, I think you would need something like %IF(UPTB__=' ',NULL,%TOTIME(UPTB__))
     
    Regards
     
    Robert
     Hi, Robert
     
    I already try to `%IF(UPTB__='', NULL, %TOTIME(UPTB__))'  
    But, blank data row on AS400, maybe happend error. 
    In another case,  all rows have data, it does converted normally.
     
    What can i do ? 
     
    PS. 
     I try to evaluate this software, but information is not enough and I`m stuck on this problem. 
     I`m grateful to you for reply posting. 
     
    Sorry my bad english. 
     
    Regards, 
     
    Kazuya 
     
     
  • Rphilo
    Rphilo
    391 Posts

    Re: %TOTIME things

    ‏2013-01-04T15:28:04Z  
    • admkazuya
    • ‏2013-01-04T14:32:43Z
     Hi, Robert
     
    I already try to `%IF(UPTB__='', NULL, %TOTIME(UPTB__))'  
    But, blank data row on AS400, maybe happend error. 
    In another case,  all rows have data, it does converted normally.
     
    What can i do ? 
     
    PS. 
     I try to evaluate this software, but information is not enough and I`m stuck on this problem. 
     I`m grateful to you for reply posting. 
     
    Sorry my bad english. 
     
    Regards, 
     
    Kazuya 
     
     
     Hi Kazuya
     
    It may well be that the UPTB__ column contains all spaces, so the comparison may need to be with a literal with the same number of space characters as the length of the column. Or you could try the %LTRIM and %RTRIM to create an empty string
     
    %IF(%LTRIM(%RTRIM(UPTB__))='',NULL,%TOTIME(UPTB__))
     
    Thanks
     
    Robert
     
     
  • admkazuya
    admkazuya
    11 Posts

    Re: %TOTIME things

    ‏2013-01-07T04:36:40Z  
    • Rphilo
    • ‏2013-01-04T15:28:04Z
     Hi Kazuya
     
    It may well be that the UPTB__ column contains all spaces, so the comparison may need to be with a literal with the same number of space characters as the length of the column. Or you could try the %LTRIM and %RTRIM to create an empty string
     
    %IF(%LTRIM(%RTRIM(UPTB__))='',NULL,%TOTIME(UPTB__))
     
    Thanks
     
    Robert
     
     
     Hi, Robert
     
    Finally, We fix this problem!
     
    We successes with this expression! ,No parse error!!!
    %IF(%LTRIM(%RTRIM(UPTB__))='',NULL,%TOTIME(%LTRIM(%RTRIM(UPTB__))))
     
    Thank you for your advice!!!!! 
     
    Regards, 

    Kazuya 
  • Rphilo
    Rphilo
    391 Posts

    Re: %TOTIME things

    ‏2013-01-07T15:57:27Z  
    • admkazuya
    • ‏2013-01-07T04:36:40Z
     Hi, Robert
     
    Finally, We fix this problem!
     
    We successes with this expression! ,No parse error!!!
    %IF(%LTRIM(%RTRIM(UPTB__))='',NULL,%TOTIME(%LTRIM(%RTRIM(UPTB__))))
     
    Thank you for your advice!!!!! 
     
    Regards, 

    Kazuya 
     Kazuya
     
    Glad you got a resolution to this question
     
    Regards
     
    Robert