<?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 smf time (seconds since midnight) how to print out  and ip addresses in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/smf-time-seconds-since-midnight-how-to-print-out-and-ip/m-p/44206#M9053</link>
    <description>an embarrassing rookie question...new to sas programming.&lt;BR /&gt;
I'm trying to print out SMF 118 tcpip records and there are two 4 byte bin fields denoting the time of transmission and end of transmission which I believe is in seconds since midnight.&lt;BR /&gt;
When I code the fields as smfstamp8  I only get a very few times in the reports.&lt;BR /&gt;
(most just show as dots)&lt;BR /&gt;
When I code the fields as pib4, all times show on the report (no dots) but appear to be all off.&lt;BR /&gt;
I've tried:&lt;BR /&gt;
FORMAT STIME TIME. ETIME TIME. ;&lt;BR /&gt;
input @57   STARTED       PIB4.&lt;BR /&gt;
        @61   ENDED         PIB4.&lt;BR /&gt;
.&lt;BR /&gt;
STIME = TIMEPART(STARTED);&lt;BR /&gt;
ETIME = TIMEPART(ENDED);&lt;BR /&gt;
Any direction on where I've gone south on this?&lt;BR /&gt;
Thanks!</description>
    <pubDate>Fri, 03 Dec 2010 15:26:20 GMT</pubDate>
    <dc:creator>mbieganski</dc:creator>
    <dc:date>2010-12-03T15:26:20Z</dc:date>
    <item>
      <title>smf time (seconds since midnight) how to print out  and ip addresses</title>
      <link>https://communities.sas.com/t5/SAS-Programming/smf-time-seconds-since-midnight-how-to-print-out-and-ip/m-p/44206#M9053</link>
      <description>an embarrassing rookie question...new to sas programming.&lt;BR /&gt;
I'm trying to print out SMF 118 tcpip records and there are two 4 byte bin fields denoting the time of transmission and end of transmission which I believe is in seconds since midnight.&lt;BR /&gt;
When I code the fields as smfstamp8  I only get a very few times in the reports.&lt;BR /&gt;
(most just show as dots)&lt;BR /&gt;
When I code the fields as pib4, all times show on the report (no dots) but appear to be all off.&lt;BR /&gt;
I've tried:&lt;BR /&gt;
FORMAT STIME TIME. ETIME TIME. ;&lt;BR /&gt;
input @57   STARTED       PIB4.&lt;BR /&gt;
        @61   ENDED         PIB4.&lt;BR /&gt;
.&lt;BR /&gt;
STIME = TIMEPART(STARTED);&lt;BR /&gt;
ETIME = TIMEPART(ENDED);&lt;BR /&gt;
Any direction on where I've gone south on this?&lt;BR /&gt;
Thanks!</description>
      <pubDate>Fri, 03 Dec 2010 15:26:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/smf-time-seconds-since-midnight-how-to-print-out-and-ip/m-p/44206#M9053</guid>
      <dc:creator>mbieganski</dc:creator>
      <dc:date>2010-12-03T15:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: smf time (seconds since midnight) how to print out  and ip addresses</title>
      <link>https://communities.sas.com/t5/SAS-Programming/smf-time-seconds-since-midnight-how-to-print-out-and-ip/m-p/44207#M9054</link>
      <description>These fields are "time" not "datetime" so you should not be using the TIMEPART(...) function against them. As read with the INFORMAT PIB4. in your INPUT statement, you will have time-of-day values.&lt;BR /&gt;
&lt;BR /&gt;
Also, I suggest you migrate to using the now-standard SMF type 119 for TCP/IP statistics.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Fri, 03 Dec 2010 21:40:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/smf-time-seconds-since-midnight-how-to-print-out-and-ip/m-p/44207#M9054</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-12-03T21:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: smf time (seconds since midnight) how to print out  and ip addresses</title>
      <link>https://communities.sas.com/t5/SAS-Programming/smf-time-seconds-since-midnight-how-to-print-out-and-ip/m-p/44208#M9055</link>
      <description>Perhaps these STARTED and ENDED times are "seconds since midnight" ??? as their PIB4. fields do not show time values when printed:&lt;BR /&gt;
given:&lt;BR /&gt;
 &lt;BR /&gt;
DATA A;&lt;BR /&gt;
  KEEP FTPCMD RHOST LHOST LOCID STARTED ENDED BYTES DSN;&lt;BR /&gt;
  INFILE SMF;&lt;BR /&gt;
  INPUT @2 REC_TYPE    PIB1.  @;&lt;BR /&gt;
  IF REC_TYPE NE 118 THEN DELETE;&lt;BR /&gt;
  INPUT @19 SUBTYPE    PIB2.  @;&lt;BR /&gt;
  IF ((SUBTYPE NE 75)) AND ((SUBTYPE NE 74)) THEN DELETE;&lt;BR /&gt;
  INPUT  @21   FTPCMD        $4.&lt;BR /&gt;
         @29   RHOST         PIB4.&lt;BR /&gt;
         @33   LHOST         PIB4.&lt;BR /&gt;
         @45   LOCID          $8.&lt;BR /&gt;
         @57   STARTED     PIB4.&lt;BR /&gt;
         @61   ENDED        PIB4.&lt;BR /&gt;
         @65   BYTES        PIB4.&lt;BR /&gt;
         @73   DSN           $44.&lt;BR /&gt;
         @;&lt;BR /&gt;
PROC PRINT;&lt;BR /&gt;
&lt;BR /&gt;
The STARTED &amp;amp; ENDED times are printing out as shown below:&lt;BR /&gt;
STARTED     ENDED                   &lt;BR /&gt;
2411463    2411464&lt;BR /&gt;
2592137    2592152&lt;BR /&gt;
2769181    2769186&lt;BR /&gt;
2772300    2772301&lt;BR /&gt;
2783348    2783348&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;BR /&gt;
&lt;BR /&gt;
So if timepart is not the function that will format the above to readable times,&lt;BR /&gt;
(I also could not get&lt;BR /&gt;
FORMAT STARTED TIME. ENDED TIME. ;  to work.&lt;BR /&gt;
Do I need to put together a formula to convert these values from seconds from midnight to readable times??&lt;BR /&gt;
thanks for your help&lt;BR /&gt;
&lt;BR /&gt;
lost</description>
      <pubDate>Mon, 06 Dec 2010 14:24:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/smf-time-seconds-since-midnight-how-to-print-out-and-ip/m-p/44208#M9055</guid>
      <dc:creator>mbieganski</dc:creator>
      <dc:date>2010-12-06T14:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: smf time (seconds since midnight) how to print out  and ip addresses</title>
      <link>https://communities.sas.com/t5/SAS-Programming/smf-time-seconds-since-midnight-how-to-print-out-and-ip/m-p/44209#M9056</link>
      <description>The time-fields are in 1/100th of a second (check the IBM TCP/IP SMF type 118 record source documentation) so you must use PIB4.2, not PIB4. to read those fields.  Also, you will likely want to apply some TIMEw.d  SAS format.&lt;BR /&gt;
&lt;BR /&gt;
Do consider that these fields are only the time and if you have a negative difference when computing elapsed time between END-START, then you will need to handle this condition.  There is another DATETIME field in the SMF record header which may help with your calculating an accurate "date portion" though.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 06 Dec 2010 15:16:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/smf-time-seconds-since-midnight-how-to-print-out-and-ip/m-p/44209#M9056</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-12-06T15:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: smf time (seconds since midnight) how to print out  and ip addresses</title>
      <link>https://communities.sas.com/t5/SAS-Programming/smf-time-seconds-since-midnight-how-to-print-out-and-ip/m-p/44210#M9057</link>
      <description>Thank you Scott...I'll play around with it some&lt;BR /&gt;
regards!</description>
      <pubDate>Tue, 07 Dec 2010 17:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/smf-time-seconds-since-midnight-how-to-print-out-and-ip/m-p/44210#M9057</guid>
      <dc:creator>mbieganski</dc:creator>
      <dc:date>2010-12-07T17:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: smf time (seconds since midnight) how to print out  and ip addresses</title>
      <link>https://communities.sas.com/t5/SAS-Programming/smf-time-seconds-since-midnight-how-to-print-out-and-ip/m-p/44211#M9058</link>
      <description>Also, you may want to check with your SAS administrator and other mainframe SAS uers -- to determine if your site is licensed for MXG from Merrill Consultants &lt;A href="http://mxg.com/" target="_blank"&gt;http://mxg.com/&lt;/A&gt;   which has predefined SAS routines to read up this and many other data sources to build MXG / SAS PDBs (performance data bases).&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Wed, 08 Dec 2010 01:29:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/smf-time-seconds-since-midnight-how-to-print-out-and-ip/m-p/44211#M9058</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-12-08T01:29:53Z</dc:date>
    </item>
  </channel>
</rss>

