Using clock scan

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Using clock scan

  • Creator
    Topic
  • #48872
    Anonymous
    Participant

      To whom maybe able to help…

      We are on Cloverleaf 5.3/AIX 5.2…

      I am using the clock scan command to subtract current time from an registration date giving a time period. If its over 24hrs do not send the message. I’ve been getting these errors for time with a registration date of 00 as the hour (midnight). Is there are work around for this?

      Tcl error:                                                                      

             msgId   = message1                                                      

             proc    = ‘tpsPharmFilter’                                              

             args    = ”                                                            

             result  = ‘unable to convert date-time string “20061015 0055″‘          

             errorInfo: ‘                                                            

      unable to convert date-time string “20061015 0055”                              

         while executing                                                            

      “clock scan “$adat $atim””                                                      

         (“run” arm line 78)                                                        

         invoked from within                                                        

      “switch -exact — $mode {                                                      

           start  {                                                                  

                 return {}                                                          

           }                                                                        

           run {                                                                    

             keylget args MSGID mh                                                  

             set dispList “”                                                        

      # Get msgcontent                                                                

       …”                                                                          

         (procedure “tpsPharmFilter” line 5)                                        

        invoke

    Viewing 3 reply threads
    • Author
      Replies
      • #59961
        Mark Thompson
        Participant

          Mary,

          The clock scan will usually work the way you have it coded.  It is more robust if you put a colon in the time:

          clock scan “20061015 00:55” returns  1160891700

          - Mark Thompson
          HealthPartners

        • #59962
          Charlie Bursell
          Participant

            It is a valid point about the colon.  It seems the clock scan command is confused when the time is 00xx.  Another method, perhaps easier than inserting a colon is to add the seconds.

            clock scan “20061015 005500” works

          • #59963
            Dick Bly
            Participant

              try putting a : between the hour and minute

            • #59964
              John Mercogliano
              Participant

                Just an add on.  This is a known bug with clock scan before 8.5 but has been fixed in 8.5. Regretfully, this is no help to us.  If you try clock scan 0000 it will work but any value between 0001 and 0059 will fail.  So to avoid problems, as a rule for QDX time should always be represented as as HH:MM.

                John Mercogliano
                Sentara Healthcare
                Hampton Roads, VA

            Viewing 3 reply threads
            • The forum ‘Cloverleaf’ is closed to new topics and replies.