How to rebuild the Netmaster EVENTDB

Document ID : KB000124077
Last Modified Date : 03/01/2019
Show Technical Document Details
Introduction:
This document is intended to assist in repairing an EVNTDB that is causing problems.
It may be 
  • badlocked
  • too large
  • failing during an attempt to resize
  • unreadable due to an excessive number of records
  • corrupted
  • on DASD where no space is available for extents
or need managing due to other issues.
This document does not supply error messages or details regarding various causes but provides guidance in getting the EVNTDB back into operable condition in the shortest time possible.
Background:

The Netmaster EVNTDB collects FTP events for both regular FTP and SSH sessions. 
It is used exclusively by the Netmaster File Transfer Management product.

It utilizes a combination of SMF records and packet data to store all FTP events running through the TCP/IP stack with as much useful information as possible to assist in problem diagnosis.

For all types of records, a maximum of 7 days of data can be stored. 

Daily housekeeping deletes records older than the maximum designated.

/PARMS EVENTLOG is the parameter group where the EVNTDB DSN and maximum number of days is defined.

An online HELP screen can be accessed using PF1 in case anything is unclear.

Because the data in this file is so transient, we recommend doing a DELETE / DEFINE and starting over with an empty file when problems occur unless you have a very specific need for the current data.

If the file seems corrupted and you want to try to repair it, see KB000052779.

Instructions:

PLEASE NOTE: The steps below assume that you have this corrective maintenance applied:
For Netmaster 12.1   SO06805
For Netmaster 12.2   SO06806
If that is not the case, you can try running through the steps but you may still have problems.
If so, please contact support for assistance.

The EVNTDB can be repaired while the region is active, or when it is stopped.

Steps for Repairing the EVNTDB on an Active Region

1. Logon to the Netmaster region and go to Command Entry ( issue CMD  from any screen) and issue the following commands,
   waiting until each  completes before entering the next. This will remove the EVNTDB from the region.

  • NDB STOP EVNTDB IMM
  • UDBCTL CLOSE=EVNTDB
  • UNALLOC DD=EVNTDB


2.  If you do need to retain the data from the log, you can REPRO it out to a flatfile prior to the delete/define, then REPRO it back in after. This step is
     optional.
Sample JCL:

//JOBCARD
// CREATE A NEW BACKUP DATASET,
// REPRO THE EVNTDB CONTENTS TO IT
//
//COPYOUT  EXEC PGM=IDCAMS
//SYSIN    DD *
//*  REPRO INFILE(DD1) OUTFILE(DD2)
//DD1      DD DSN=hlq.EVNTDB,DISP=SHR
//DD2      DD DSN=new.EVNTSEQ,DISP=(NEW,CATLG),
//         SPACE=(CYL,(500,100)),
//         DCB=(RECFM=VB,LRECL=4096,BLKSIZE=23445),
//         VOL=SER=XXXXXX,UNIT=SYSDA        
//SYSPRINT DD SYSOUT=*

Please be sure to  modify DSN, SPACE  and the VOLSER/UNIT information as needed, or change to use SMS.


3. The EVNTDB needs to be deleted and redefined using the original parameters as defined in S01LCALC job from your region setup ,with slight modifications for the method you need for the storage/management/data class (or VOLSER/UNIT) and adjusted for the number of records as needed.
If you still have your JCL library from the install, it is recommended to use that as it will already match your environment. 
Sample parameters for Netmaster 12.1 and 12.2 (other releases have different parameters):

Be sure to update the jobcard, hlq and storage parameters to match your environment.

// JOBCARD
//DEFINE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *

 DELETE (hlq.EVNTDB) CLUSTER
 IF LASTCC = 8 THEN                                  -
    IF MAXCC LT 12 THEN                              -
       SET MAXCC  = 0

 DEFINE CLUSTER (NAME(hlq.EVNTDB)                    -
                                  MGMTCLAS(mgtclas)                   - /* <-----------Modify or delete as needed
                 STORCLAS(storclas)                  - /* <-----------Modify or delete as needed
                 INDEXED                             -
                 RECORDS(5000 5000)                  - /* <----adjust to match your environment
                 SPEED                               -
                 SHAREOPTIONS(2 3)                   -
                 REUSE                               -
                )                                    -
        DATA    (NAME(hlq.EVNTDB.D)                  -
                 CONTROLINTERVALSIZE(4096)           -
                 RECORDSIZE(600 600)                 -
                 FREESPACE(0 0)                      -
                 KEYS(72 0)                          -
                )                                    -
        INDEX   (NAME(hlq.EVNTDB.I)                  -
                 CONTROLINTERVALSIZE(4096)           -
                )
//*
//


4. REPRO the file from step #1 back into the new EVNTDB (optional).
   Sample JCL:
   Be sure to modify the jobcard, and DSNs.


// JOBCARD
//* REPRO THE BACKUP DATA INTO THE NEWLY-DEFINED EVNTDB VSAM DATASET
//*
//COPYIN   EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
  REPRO INFILE(DD1) OUTFILE(DD2)
//DD1      DD DSN=new.EVNTSEQ,DISP=SHR
//DD2      DD DSN=hlq.EVNTDB,DISP=OLD



5. Now it's time to reactivate the EVNTDB.
   In your Netmaster region, go to /PARMS and select parameter group EVENTLOG with option U (Update)
   Hit PF6 to action the parameter group.
   It should take a moment, then come back with the message that the action was successful.

6. Hit PF5 to view the ILOG for the parameter group. 
    It should show many lines of information with the current timestamp indicating that the EVNTDB is now available.

7. Check the EVNTDB by going to /FTHIST and viewing a section where you know records are being written.
   Depending whether this is a test or PROD region, you may see immediate results or it may take a few minutes before new records are written.




Steps for Repairing the EVNTDB on a Stopped Region

The steps here are very similar to those above.

1. Stop your Netmaster region with the command correct for your environment. 
    Standard here is  /F NM,FSTOP
    
2. Wait until the job has ended; be aware of potential restarts if you have automation. Ensure it is not active for the Netmaster region.

3. Follow steps 2, 3 and 4 above to create anEVNTDB containing data from the original log.
                  OR
   Follow Step 3 only to allocate a new, empty EVNTDB.

4. Restart the Netmaster region using the command that is standard for your environment.
    The command here is /S NM