DATECOPYOPT UseCustomDate option

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf DATECOPYOPT UseCustomDate option

  • Creator
  • #50627
    Anu Jandhyala


    What we need:

    Every date field, say MSH 7 should show datetime-timezone in the outgoing field. This does not come in, in the inbound msg. But we don’t want precision ie the extra .000 in the date.

    So I used DATECOPYOPT in my xlate, Precision off and chose “UseCustomDate” radio button and selected -6:30 for timezone. According to the documentation, any missing fields are replaced by the defaults specified in this option. Since inbound msg has no timezone information, I expected this option to append the information. But that was not the case.

    Please clarify on the expected behavior for DATECOPYOPT and also, is there a way for us to accomplish the above task?



Viewing 5 reply threads
  • Author
    • #66826
      Jim Kosloskey

      Are you using BULKCOPY in your Xlate?

      How about PATHCOPY?


    • #66827
      Anu Jandhyala

      I am using a PATHCOPY

    • #66828
      Jim Kosloskey


      I don’t have experience with PATHCOPY.

      If you are PATHCOPYing the segment that contains the date fields in question try doing a COPY for that specific Date field alone (no PATHCOPY at all) to see if it is PATHCOPY that is causing the DATECOPYOPT to be ignored.

      My theory (and I may be way off) is that at the segment level PATHCOPY works like BULKCOPY at the message level. That is the fields are copied ‘as is’ without the potential that the DATECOPYOPT settings can apply.

      If the single COPY works, you can choose to PATHCOPY the segment and then do an individaul COPY for Date fields, or do individual field COPYs for all fields.


    • #66829
      Anu Jandhyala

      Hi Jim,

      I have tested this more:

      Even with PATHCOPY, I am able to copy/modify individual fields for other types:

      PATHCOPY MSH segment

      COPY =GE –< MSH#3(0) .. etc.,

      I think there may be an issue with DATECOPYOPT or atleast it does not behave as expected.

      Tests run:

      1. PATHCOPY, DATECOPYOPT;Add Precision off; UseCustomTime (with timezone specified)

      Result: Date is copied as is, does not show timezone; In my example: 20081027141230

      Expected Result: 20081027141230+0330  —-> this is what we need for this situation

      2. PATHCOPY, DATECOPYOPT;Add Precision On; UseCustomTime..(same as above)

      Result: 20081027141230.   0+0330

      Expected Result: 20081027141230+0330 (since seconds were specified)

      Also, if DATECOPYOPT was placed before PATHCOPY, I guess the latter overwrote DATECOPY settings, so add precision did not help at all.

    • #66830
      Jim Kosloskey


      DATECOPYOPT is supposed to be effective from the time it is encountered in an Xlate.

      So if you have DATECOPYOPT and then other Actions its effect should continue through all of the subsequent Actions until another DATECOPYOPT (probably with different options) is encountered.

      What release of Cloverleaf(R) are you using?

      Try this:

      DATECOPYOPT (with whatever options you want)

      COPY (for the Date/Time Field in question).

      If you get some change to the Date/Time field then DATECOPYOPT is working (maybe not the way you like but working the way it does).

      Then try:

      DATECOPYOPT (with whatever options you want).

      PATHCOPY segment (segment containing Date/Time field).

      If you get the same change as above – fine. If not, then PATHCOPY is copying all of the segment ‘as is’ and you will eithere need to follow the PATHCOPY with individual field COPYs or abandon PATHCOPY for this segment.

      Now if the field is changed but not the way you want, you need to take a look at what an HL/7 Date/Time field with full precision should look like. You may need to add seconds (zeros) to the Date/Time field first.


    • #66831
      Anu Jandhyala

      Thanks, Jim.

      BTW, this is on Cloverleaf 5.5MultiByte.

      I get the best results when DATECOPYOPT is after PATHCOPY.

      My problem is: the timezone gets copied ONLY if precision is on. And with precision ON, I get “20090115120600.   0+0400″ . We do not want the portion in bold. I will try this with a tclproc.

      If you have any other ideas, do throw them my way.



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

Forum Statistics

Registered Users
Topic Tags