1.3 Executing Basic Logdump Tasks

The following are some basic tasks that can be performed with Logdump. For detailed information about the commands shown and other available options, see the alphabetical reference in Logdump Commands.

1.3.1 Finding the Next Good Record Header

To find the next good record header, enter the following command:

Logdump 8> SCANFORHEADER

Alternatively, you can simply enter SFH.

1.3.2 Finding the Beginning, Middle, and End of a Transaction

To find the beginning, middle, and end of a transaction, complete the following steps:

  1. Show headers and detail.
    Logdump 9> GHDR ON
    Logdump 10> DETAIL ON
    
  2. Go to the next record.
    Logdump 11> N
    
  3. View the TransInd field in the record header. The following table explains where the record is in relation to the transaction.

    Transaction Indicator Description
    TransInd   : .  (x00)
    

    First statement in transaction

    TransInd   : .  (x01)
    

    Statement in middle of transaction

    TransInd   : .  (x02)
    

    Last statement in transaction

    TransInd   : .  (x03)
    

    Sole statement in transaction


  4. Move through subsequent records by pressing N, and refer to the TransInd field to determine where each one is within the transaction. When TransInd is either x02 or x03, the TransInd of the next record should be x00, starting a new transaction.

1.3.3 Scanning for the End of a Transaction

To scan for the end of a transaction, enter the following command:

Logdump 20> SCANFORENDTRANS

Alternatively, you can simply enter SFET.

The record shown will be the first one in the next transaction. To confirm, the TransInd field should be x00.

1.3.4 Going to a Specific RBA in the File

To go to a specific RBA in the file, you can do either of the following:

  • To go to an RBA anywhere in the file:

    Logdump 35> POS rba
    Logdump 36> N
    

    This displays the record located at that RBA.

  • To go to the first record in the file:

    Logdump 37> POS FIRST
    

    Alternatively, you can enter the following command:

    Logdump 37> POS 0
    

1.3.5 Filtering Based on a Table or Data File Name

To filter out everything except records containing a specific NonStop data file name, enter the following command:

Logdump 60> FILTER INCLUDE FILENAME $volume.subvolume.file

To filter out everything except records containing a specific table name:

  • On a NonStop system:

    Logdump 60> FILTER INCLUDE ANSINAME catalog.schema.table
    
  • On a Windows or UNIX system:

    Logdump 60> FILTER INCLUDE FILENAME [container | catalog] schema.table
    

Now, when you use the N command, you will only see records that satisfy this filter. Conversely, to filter out records containing a specific table or file name, but show everything else, use the EXCLUDE option instead of INCLUDE.

1.3.6 Removing the Current Filter Criteria

To remove the current filter criteria, enter the following command:

Logdump 62> FILTER CLEAR

1.3.7 Filtering on Multiple Conditions

To filter on multiple conditions, enter one of the following commands:

  • Logdump 60> FILTER INCLUDE FILENAME $volume.subvolume...file..; FILTER RECTYPE record_type; FILTER MATCH ALL

  • Logdump 60> FILTER INCLUDE ANSINAME catalog.schema.table; FILTER RECTYPE record_type; FILTER MATCH ALL

  • Logdump 65> FILTER INCLUDE FILENAME schema.table; FILTER RECTYPE record_type; FILTER MATCH ALL

Use MATCH ANY or MATCH ALL depending on whether you want the search to match any or all of the filter conditions, respectively, when multiple conditions are specified. The preceding example filters on a name and record type, typically an operation type such as INSERT.

1.3.8 Count the Records in a Trail File

The following command shows a count summary followed by counts for each table or data file:

Logdump 67> COUNT

1.3.9 Saving Records to a New Trail File

To save a subset of records, enter the following command:

Logdump 68> SAVE file n RECORDS

1.3.10 Closing the Current File and Opening the Next One in the Trail

To close the current file and open the next one in the trail, enter the following command:

Logdump 69> NEXTTRAIL

1.3.11 Keeping a Log of Your Session

To start logging, enter the following command:

Logdump 70> LOG TO filename.txt

To write text to the log:

Logdump 71> WRITELOG "text"

To stop logging:

Logdump 72> LOG STOP

1.3.12 Seeing the Current Logdump Environment

To see the current Logdump environment, enter the following command:

Logdump 73> ENV

This shows which features are enabled, such as filtering and header views, and it shows environment information such as the current trail and position.

1.3.13 Getting Online Command Help

To get online command help, enter the following command:

Logdump 74> HELP

1.3.14 To Exit Logdump

To exit Logdump, enter either of the following commands:

  • Logdump 100> EXIT

  • Logdump 100> QUIT