/**************************************************************************/
/*                                                                        */
/* INETTIME.cmd - Procedure to summarize by month all connect time to the */
/*                Internet using the IPDIALER.LOG as input data.          */
/*                                                                        */
/* Version:       2.0                                                     */
/* Last Update:   January 28, 1998                                        */
/*                                                                        */
/* Copyright (c) D.A.Ritari-KNIGHT RESEARCH - 1995 - ALL RIGHTS RESERVED  */
/*                                                                        */
/* FREELY DISTRIBUTABLE FOR ANY USE OR PURPOSE.                           */
/* NO WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PURPOSE IMPLIED.     */
/*                                                                        */
/*                                                                        */
/* CONTACT:   Constructive comments and tips to:                          */
/*                Internet:    dritari@ibm.net                            */
/*                                                                        */
/* FOR:       Warp Internet Users who want to know how much 'connect'     */
/*            time they've used this month on IBM's Advantis Network.     */
/*            (NOT for ALTERNATE-DIALER Users).                           */
/*                                                                        */
/* PURPOSE:   This small REXX program searches for the Internet connect   */
/*            log on all available drives, and reads thru all the         */
/*            entries in the log (in the file \mptn\etc\IPDIALER.LOG)     */
/*            and SUMMARIZES the 'connect' time by month...quickly letting*/
/*            you know how much time you've used this month. (I haven't   */
/*            found a similar function with the Warp Internet bonus       */
/*            pack apps). Assumptions are that you are using the SLIP     */
/*            standard 'Dialer' app, that you have logging turned on,     */
/*            and that the log file is set big enough to record more than */
/*            a few connects. As this is a REXX application, you must     */
/*            have REXX installed on your PC to run the program, and      */
/*            if you prefer a PM-style application, it can be also run    */
/*            using PMREXX. Testing of this app was minimal...if you      */
/*            find that it doesn't run on your system, let me know or     */
/*            modify it to your hearts content.                           */
/*                                                                        */
/*                                                                        */
/* TO RUN:    At the 'C>' prompt:   INETTIME   (no parms needed)          */
/*            At the 'C>' prompt:   INETTIME C:\mydir\IPDIALER.LOG        */
/*            or for PMREXX usage:  PMREXX INETTIME.CMD                   */
/*                                                                        */
/*                                                                        */
/* UPDATES:   Version 1.0 - Original Release - January 25, 1995           */
/*            Version 1.1 - Inadvertently left off last entry in log.     */
/*                          This corrected original error.                */
/*            Version 1.2 - Variety of fixes for 'connect.log' files      */
/*                          which have missing carriage returns, spliced  */
/*                          lines, broken lines etc., which caused the    */
/*                          calculations to abend. Also, added better     */
/*                          lookup of where connect.log exists by using   */
/*                          the environment 'ETC' parm if it exists.      */
/*            Version 1.3 - Added new YEAR information added to log       */
/*                          entries available with DIALER version 1.45.   */
/*                          Also, Dialer-1.45 LOCKS the CONNECT.LOG file  */
/*                          and keeps it locked, even after you hangup.   */
/*                          An error message was added advising you to    */
/*                          close the Dialer app before running INETTIME. */
/*            Version 2.0 - Changed default name of logfile for the newer */
/*            JAN/1998      IBM Dialer - 1.69 or greater...IPDIALER.LOG   */
/*                          (was CONNECT.LOG). Changed search directory   */
/*                          to \mptn\etc from \tcpip\etc directory. Fixed */
/*                          date error in December...always showed the    */
/*                          new year instead of the old year (Thanks      */
/*                          Tom for the error report). IF you are still   */
/*                          using the old dialer, either rename the log   */
/*                          in the dialer setup to IPDIALER.LOG or change */
/*                          the source code at the start of the program   */
/*                          in the LOGNAME entry...remarked statement     */
/*                          already provided, or override the name of the */
/*                          log by running INETTIME with the fulle path...*/
/*                              INETTIME C:\mptn\etc\connect.log          */
/*                                                                        */
/* PROBLEMS:  Do not use this program if you ONLY use the Alternate       */
/*            Dialer (AD). The AD does NOT produce a IPDIALER.LOG to      */
/*            summarize (INETTIME won't be able to find the log).         */
/*                                                                        */
/*            If INETTIME reports that it can't find your IPDIALER.LOG    */
/*            file OR you have MULTIPLE ipdialer.log files and you don't  */
/*            want a report on the first one it finds, specify the name   */
/*            of the log on the command line when you run the program...  */
/*                INETTIME   R:\example\other\backup\IPDIALER.LOG         */
/*            for example (or whereever you keep you IPDIALER.LOG file).  */
/*                                                                        */
/*            If the INETTIME report has a month with '???' in it, your   */
/*            IPDIALER.log file is corrupted on one or more entries.      */
/*            A normal log entries looks like the following line:         */
/*                                                                        */
/*    12/11 17:22:37 Disconnected after 01:14:01  0 errors  0 discards    */
/*                                                                        */
/*            A corrupted line might look like the following:             */
/*                                                                        */
/*    xxxxx 17:22:37 Disconnected af                                      */
/*    ter 01:14:01  0 errors  0 discards                                  */
/*                                                                        */
/*            As you can see, the log entry has (somehow) gotten split    */
/*            into two lines...INETTIME will find the 'Disconnected'      */
/*            line BUT there is no time to report and the date field      */
/*            contains X's...the program will not abend...will attempt    */
/*            to summarize the data on a '???' month and continues.       */
/*            If you can edit the ipdialer.log file and straight out      */
/*            the entries, future reports will summarize correctly.       */
/*            (See caution below on editing the log).                     */
/*                                                                        */
/* LOG SIZE:  In the Dialer, I strong suggest that you set IPDIALER.LOG   */
/*            size to an amount LARGER THAN 10K...I suggest at least      */
/*            50K for 6 months of log activity. Also, I edit the log      */
/*            occasionally to remove old month's activities (instead of   */
/*            just letting the dialer arbitrarily 'trim' back your log).  */
/*            (See caution below on editing the log).                     */
/*                                                                        */
/* CAUTIONS:  Do not edit your IPDIALER.LOG file with an ASCII editor     */
/*            which puts an END-OF-FILE (EOF) mark at the end of the      */
/*            file! The IBM dialer program will write log entries AFTER   */
/*            this mark and you will not be able to see new log entries   */
/*            using INETTIME or other ASCII-based programs (or just       */
/*            'TYPE ipdialer.log') in the future. Either remove the EOF   */
/*            character or erase the log and let the dialer build you     */
/*            a new one for future use...A remove-end-of-file-mark        */
/*            program has been included for this purpose...See REMOVEOF.  */
/*                                                                        */
/**************************************************************************/
INETTIME.CMD - Version 2.0 - January 28, 1998
-Small REXX proc for OS/2 to summarize
 by month all connect time to IBM's Advantis
 Internet network using the IPDIALER.LOG as
 input data. (See INETTIME.TXT for details).
REMOVEOF.cmd - Version 1.0 - March 2, 1995
-Procedure to remove any/all extraneous
 End-Of-File (EOF) marks from an ASCII text
 file. (See REMOVEOF.TXT for details).
Copyright(c) D.A.Ritari-KNIGHT RESEARCH-1995
