Home |

CHKISAM - UNIX

CHKISAM can be performed on a single file or a directory. Both of these are performed from the # or $ prompt.

CHKISAM

1. To CHKISAM all files:

    type cd /mc/mcadata
    press <ENTER>

    type ./chkisam
    press <ENTER>

    #./chkisam

    (Display shows individual file. If this command is run without a file name, the display will repeat for each file name.)

    iccheck Revision 3.00 (DG/UX for 88K)
    Copyright (C) 1987-2000, Egan Systems, Inc. All rights reserved.
    1 file/argument had errors
    iccheck is finished
    icfixup Revision 3.00 (DG/UX for 88K)
    Copyright (C) 1987-2000, Egan Systems, Inc. All rights reserved.
    Attempt to exclusively open an open file: /500disk/data/support/prtass
    1 file/argument had errors

    icfixup is finished
    # ls -la prtass*
    -rwxrwxrwx 1 root other 4096 May 17 2001 prtass.nx
    -rwxrwxrwx 1 root other 12288 May 10 08:41 prtass.xd
    # cd /stage/mcoffice/mcadata
    # chkisam prtass
    iccheck Revision 3.00 (DG/UX for 88K)
    Copyright (C) 1987-2000, Egan Systems, Inc. All rights reserved.
    /stage/mcoffice/mcadata/prtass processed on May-10-2002 11:46:18.31
    ICISAM Revision 5.09
    Delete is logical, Maximum file size is 2GB
    No Alternate Keys 64 byte Records 81 Records allocated
    Records available before the .XD EOF: 109
    Primary ------- Key: 81 Record: 81
    1 file/argument was processed - All are reliable.
    iccheck is finished

    icfixup Revision 3.00 (DG/UX for 88K)
    Copyright (C) 1987-2000, Egan Systems, Inc. All rights reserved.
    /stage/mcoffice/mcadata/prtass processed on May-10-2002 11:46:19.32
    Reliability flags clear, headers valid, no need to fix file.
    1 file/argument was processed - 1 file was not fixed.
    icfixup is finished
    #

    After the chkisam is complete, do the following to check for errors:

      # ls -la *.er

    If any files are displayed, print the file names or write them down and proceed to the reorg process.

2. To CHKISAM a single file:

    type cd /mc/mcadata
    press <ENTER>

    type ./chkisam filename
    press <ENTER>

    #./chkisam prtass

    iccheck Revision 3.00 (DG/UX for 88K)
    Copyright (C) 1987-2000, Egan Systems, Inc. All rights reserved.
    1 file/argument had errors
    iccheck is finished
    icfixup Revision 3.00 (DG/UX for 88K)
    Copyright (C) 1987-2000, Egan Systems, Inc. All rights reserved.
    Attempt to exclusively open an open file: /500disk/data/support/prtass
    1 file/argument had errors

    icfixup is finished
    # ls -la prtass*
    -rwxrwxrwx 1 root other 4096 May 17 2001 prtass.nx
    -rwxrwxrwx 1 root other 12288 May 10 08:41 prtass.xd
    # cd /stage/mcoffice/mcadata
    # chkisam prtass
    iccheck Revision 3.00 (DG/UX for 88K)
    Copyright (C) 1987-2000, Egan Systems, Inc. All rights reserved.
    /stage/mcoffice/mcadata/prtass processed on May-10-2002 11:46:18.31
    ICISAM Revision 5.09
    Delete is logical, Maximum file size is 2GB
    No Alternate Keys 64 byte Records 81 Records allocated
    Records available before the .XD EOF: 109
    Primary ------- Key: 81 Record: 81
    1 file/argument was processed - All are reliable.
    iccheck is finished

    icfixup Revision 3.00 (DG/UX for 88K)
    Copyright (C) 1987-2000, Egan Systems, Inc. All rights reserved.
    /stage/mcoffice/mcadata/prtass processed on May-10-2002 11:46:19.32
    Reliability flags clear, headers valid, no need to fix file.
    1 file/argument was processed - 1 file was not fixed.
    icfixup is finished
    #

    After the chkisam is complete, do the following to check for errors:

      # ls -la *.er

    If any files are displayed, print the file names or write them down and proceed to the reorg process.

    Below is a sample UNIX chkisam script file. This file is normally located in the /mc/mcadata directory:

    Note: the directory /mc/cobol is a link to /mc/cobol2xx.

    umask 000
    ICROOT=/mc/cobol
    ICCODEPATH=/mc/mcaobj
    export ICROOT ICCODEPATH
    if [ -f $1.xd ]
    then
       /mc/cobol/iccheck -epiN w $1
       /mc/cobol/icfixup -p $1
    else
       /mc/cobol/iccheck -epiN w
        exit
    fi
    exit

Updated February 18, 2005 at 8:27 a.m.