<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Custom datetime.xml for x12 format in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Custom-datetime-xml-for-x12-format/m-p/160025#M32454</link>
    <description>&lt;P&gt;Trying to get datetime.xml configured to recognize a timestamp in x12 file format with no success...&lt;/P&gt;

&lt;P&gt;Here are the possibilities of what the data could look like within the file:&lt;BR /&gt;
[~GS*HS*123456*ASDF*&lt;STRONG&gt;20150519*0642&lt;/STRONG&gt;&lt;EM&gt;896109*X*005010X279~&lt;BR /&gt;
[~GS*HS*123456*ASDF&lt;/EM&gt;&lt;STRONG&gt;20150519*064201&lt;/STRONG&gt;&lt;EM&gt;896109*X*005010X279~&lt;BR /&gt;
[~GS*HS*123456*ASDF&lt;/EM&gt;&lt;STRONG&gt;20150519*06420123&lt;/STRONG&gt;*896109*X*005010X279~&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;datetime&amp;gt;
    &amp;lt;define name="_x12date" extract="year, month, day"&amp;gt;
        &amp;lt;text&amp;gt;&amp;lt;![CDATA[(?:~GS\*(?:.*?\*){3})(19\d\d|20\d\d)(0?[1-9]|1[012])(0[1-9]|[12]\d|3[01])(?:\*)]]&amp;gt;&amp;lt;/text&amp;gt;
    &amp;lt;/define&amp;gt;
    &amp;lt;define name="_x12time1" extract="hour, minute, second, subsecond"&amp;gt;
        &amp;lt;text&amp;gt;&amp;lt;![CDATA[(?:~GS\*(?:.*?\*){4})(\d{2})(\d{2})(\d{2})(\d{2})(?:\*)]]&amp;gt;&amp;lt;/text&amp;gt;
    &amp;lt;/define&amp;gt;
    &amp;lt;define name="_x12time2" extract="hour, minute, second"&amp;gt;
        &amp;lt;text&amp;gt;&amp;lt;![CDATA[(?:~GS\*(?:.*?\*){4})(\d{2})(\d{2})(\d{2})(?:\*)]]&amp;gt;&amp;lt;/text&amp;gt;
    &amp;lt;/define&amp;gt;
    &amp;lt;define name="_x12time3" extract="hour, minute"&amp;gt;
        &amp;lt;text&amp;gt;&amp;lt;![CDATA[(?:~GS\*(?:.*?\*){4})(\d{2})(\d{2})(?:\*)]]&amp;gt;&amp;lt;/text&amp;gt;
    &amp;lt;/define&amp;gt;
    &amp;lt;timePatterns&amp;gt;
          &amp;lt;use name="_x12time1"/&amp;gt;
          &amp;lt;use name="_x12time2"/&amp;gt;
          &amp;lt;use name="_x12time3"/&amp;gt;
    &amp;lt;/timePatterns&amp;gt;
    &amp;lt;datePatterns&amp;gt;
          &amp;lt;use name="_x12date"/&amp;gt;
    &amp;lt;/datePatterns&amp;gt;
&amp;lt;/datetime&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[x12:270]
TRUNCATE = 0
DATETIME_CONFIG = /etc/apps/x12/local/datetime.xml
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any help would be appreciated as to why the timestamp is not being picked up. Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 20:16:57 GMT</pubDate>
    <dc:creator>hogan24</dc:creator>
    <dc:date>2020-09-28T20:16:57Z</dc:date>
    <item>
      <title>Custom datetime.xml for x12 format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Custom-datetime-xml-for-x12-format/m-p/160025#M32454</link>
      <description>&lt;P&gt;Trying to get datetime.xml configured to recognize a timestamp in x12 file format with no success...&lt;/P&gt;

&lt;P&gt;Here are the possibilities of what the data could look like within the file:&lt;BR /&gt;
[~GS*HS*123456*ASDF*&lt;STRONG&gt;20150519*0642&lt;/STRONG&gt;&lt;EM&gt;896109*X*005010X279~&lt;BR /&gt;
[~GS*HS*123456*ASDF&lt;/EM&gt;&lt;STRONG&gt;20150519*064201&lt;/STRONG&gt;&lt;EM&gt;896109*X*005010X279~&lt;BR /&gt;
[~GS*HS*123456*ASDF&lt;/EM&gt;&lt;STRONG&gt;20150519*06420123&lt;/STRONG&gt;*896109*X*005010X279~&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;datetime&amp;gt;
    &amp;lt;define name="_x12date" extract="year, month, day"&amp;gt;
        &amp;lt;text&amp;gt;&amp;lt;![CDATA[(?:~GS\*(?:.*?\*){3})(19\d\d|20\d\d)(0?[1-9]|1[012])(0[1-9]|[12]\d|3[01])(?:\*)]]&amp;gt;&amp;lt;/text&amp;gt;
    &amp;lt;/define&amp;gt;
    &amp;lt;define name="_x12time1" extract="hour, minute, second, subsecond"&amp;gt;
        &amp;lt;text&amp;gt;&amp;lt;![CDATA[(?:~GS\*(?:.*?\*){4})(\d{2})(\d{2})(\d{2})(\d{2})(?:\*)]]&amp;gt;&amp;lt;/text&amp;gt;
    &amp;lt;/define&amp;gt;
    &amp;lt;define name="_x12time2" extract="hour, minute, second"&amp;gt;
        &amp;lt;text&amp;gt;&amp;lt;![CDATA[(?:~GS\*(?:.*?\*){4})(\d{2})(\d{2})(\d{2})(?:\*)]]&amp;gt;&amp;lt;/text&amp;gt;
    &amp;lt;/define&amp;gt;
    &amp;lt;define name="_x12time3" extract="hour, minute"&amp;gt;
        &amp;lt;text&amp;gt;&amp;lt;![CDATA[(?:~GS\*(?:.*?\*){4})(\d{2})(\d{2})(?:\*)]]&amp;gt;&amp;lt;/text&amp;gt;
    &amp;lt;/define&amp;gt;
    &amp;lt;timePatterns&amp;gt;
          &amp;lt;use name="_x12time1"/&amp;gt;
          &amp;lt;use name="_x12time2"/&amp;gt;
          &amp;lt;use name="_x12time3"/&amp;gt;
    &amp;lt;/timePatterns&amp;gt;
    &amp;lt;datePatterns&amp;gt;
          &amp;lt;use name="_x12date"/&amp;gt;
    &amp;lt;/datePatterns&amp;gt;
&amp;lt;/datetime&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[x12:270]
TRUNCATE = 0
DATETIME_CONFIG = /etc/apps/x12/local/datetime.xml
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any help would be appreciated as to why the timestamp is not being picked up. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:16:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Custom-datetime-xml-for-x12-format/m-p/160025#M32454</guid>
      <dc:creator>hogan24</dc:creator>
      <dc:date>2020-09-28T20:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: Custom datetime.xml for x12 format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Custom-datetime-xml-for-x12-format/m-p/160026#M32455</link>
      <description>&lt;P&gt;I figured this one out...I was trying to do my prefix in the regex which I believe was causing an issue. So I removed the everything in the regex up to the actual timestamp itself and put the prefix regex stanza in the TIME_PREFIX var leaving my props.conf to look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[x12:270]
TRUNCATE = 0
DATETIME_CONFIG = /etc/apps/x12/local/datetime.xml
MAX_TIMESTAMP_LOOKAHEAD = 20
TIME_PREFIX = ~GS\*(?:.*?\*){3}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is what datetime.xml ended up looking like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;datetime&amp;gt;

&amp;lt;define name="_year" extract="year"&amp;gt;
    &amp;lt;text&amp;gt;&amp;lt;![CDATA[(20\d\d|19\d\d|[901]\d(?!\d))]]&amp;gt;&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;define name="_month" extract="month"&amp;gt;
    &amp;lt;text&amp;gt;&amp;lt;![CDATA[(0?[1-9]|1[012])(?!:)]]&amp;gt;&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;define name="_day"  extract="day"&amp;gt;
    &amp;lt;text&amp;gt;&amp;lt;![CDATA[(0?[1-9]|[12]\d|3[01])]]&amp;gt;&amp;lt;/text&amp;gt; 
&amp;lt;/define&amp;gt;

&amp;lt;define name="_hour" extract="hour"&amp;gt;
    &amp;lt;text&amp;gt;&amp;lt;![CDATA[([01]?[1-9]|[012][0-3])(?!\d)]]&amp;gt;&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;define name="_minute" extract="minute"&amp;gt;
    &amp;lt;text&amp;gt;&amp;lt;![CDATA[([0-6]\d)(?!\d)]]&amp;gt;&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;define name="_second" extract="second"&amp;gt;
    &amp;lt;text&amp;gt;&amp;lt;![CDATA[([0-6]\d)(?!\d)]]&amp;gt;&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;define name="_x12date1" extract="year, month, day, hour, minute, second"&amp;gt;
    &amp;lt;text&amp;gt;&amp;lt;![CDATA[(19\d\d|20\d\d)(0?[1-9]|1[012])(0[1-9]|[12]\d|3[01])\*(\d{2})(\d{2})(\d{2})]]&amp;gt;&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;define name="_x12date2" extract="year, month, day, hour, minute"&amp;gt;
    &amp;lt;text&amp;gt;&amp;lt;![CDATA[(19\d\d|20\d\d)(0?[1-9]|1[012])(0[1-9]|[12]\d|3[01])\*(\d{2})(\d{2})]]&amp;gt;&amp;lt;/text&amp;gt;
&amp;lt;/define&amp;gt;

&amp;lt;timePatterns&amp;gt;
      &amp;lt;use name="_x12date1"/&amp;gt;
      &amp;lt;use name="_x12date2"/&amp;gt;
&amp;lt;/timePatterns&amp;gt;
&amp;lt;datePatterns&amp;gt;
      &amp;lt;use name="_x12date1"/&amp;gt;
      &amp;lt;use name="_x12date2"/&amp;gt;
&amp;lt;/datePatterns&amp;gt;

&amp;lt;/datetime&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Jun 2015 21:35:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Custom-datetime-xml-for-x12-format/m-p/160026#M32455</guid>
      <dc:creator>hogan24</dc:creator>
      <dc:date>2015-06-18T21:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Custom datetime.xml for x12 format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Custom-datetime-xml-for-x12-format/m-p/160027#M32456</link>
      <description>&lt;P&gt;Hogan24, I am very impressed with your efforts to parse EDI X12.  This appears to be a 270.  Have you been successful at parsing the full transaction?  Have you worked with any other HIPAA Transactions, like the 271 or the 276/277?  This solution is the &lt;EM&gt;only&lt;/EM&gt; hit I got regarding EDI/X12 in all of Splunkland.  Can you direct me to guidance?  Pretty-Please???&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 23:07:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Custom-datetime-xml-for-x12-format/m-p/160027#M32456</guid>
      <dc:creator>timothywatson</dc:creator>
      <dc:date>2019-08-23T23:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Custom datetime.xml for x12 format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Custom-datetime-xml-for-x12-format/m-p/704919#M116591</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33200"&gt;@timothywatson&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/30774"&gt;@hogan24&lt;/a&gt;&amp;nbsp;, it looks like you both are trying to implement a solution with EDIs.&amp;nbsp; We now have a solutions accelerator for EDI documents.&amp;nbsp; Let me know if any of you is interested in sharing some information, I can set up a call to introduce.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 08:22:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Custom-datetime-xml-for-x12-format/m-p/704919#M116591</guid>
      <dc:creator>youngc_splunk</dc:creator>
      <dc:date>2024-11-21T08:22:24Z</dc:date>
    </item>
  </channel>
</rss>

