I am in the middle of researching bcheck for repairing possible corrupt future c-isam files. I am not even sure it can do that.
Anyway I came across this:
this is from http://support.proiv.com/V6_Help/environmentguide/syntax.htm Trail: PROIV Documentation > Administration > Environment Guide > Syntax bcheck -[ i | l | y | n | q | s ] filename where filename does not have suffix .idx or .dat. Options -i Check index file only -l List entries in B+ trees -n Answer no to all questions -y Answer yes to all questions -q Suppress printing of the program banner -s Resize the index file node size Unless you use the -n or -y option, bcheck is interactive, waiting for you to respond to each error it finds. ... When running bcheck -s, the index created on a UNIX platform will have an uppercase extension. This will cause subsequent BCHECKs of the file to display the message ‘Error linking .IDX to .idx’. To avoid this situation, delete the file name with the lowercase extension, and rename the remaining file, changing only the case of the file exten sion.
here is a testing using bcheck -s :
~/tmp $ ll total 8 -rw-r--r-- 1 rob pro 1024 2018-04-15 07:53 dm_trfle.dat -rw-r--r-- 1 rob pro 3072 2018-04-15 07:53 dm_trfle.idx localhost pro4 ~/tmp $ localhost pro4 ~/tmp $ localhost pro4 ~/tmp $ bcheck -s dm_trfle BCHECK C-ISAM B-tree Checker version 7.24.UC5 Copyright (C) 1981-1997 Informix Software, Inc. Software Serial Number UMD#J999999 C-ISAM File: dm_trfle Old index node size = 1024 Key node size = 18 Checking dictionary and file sizes. Index file node size = 1024 Current C-ISAM index file node size = 1024 Checking data file records. Checking indexes and key descriptions. Index 1 = unique key (0,2,0) 1 index node(s) used -- 1 index b-tree level(s) used ERROR: 10 missing data record pointer(s) Delete index ? yes Remake index ? yes Checking data record and index node free lists. Recreating index 1. 3 index node(s) used, 0 free -- 10 data record(s) used, 25 free. localhost pro4 ~/tmp $ ll total 12 -rw-r--r-- 1 rob pro 1024 2018-04-15 07:53 dm_trfle.dat -rw-r--r-- 1 rob pro 3072 2018-04-15 07:54 dm_trfle.idx -rw-r--r-- 1 rob pro 3072 2018-04-15 07:53 dm_trfle.IDX
- what is the purpose of "bcheck -s " ? I hope it is not to repair a file as there are a few file renaming steps to do after fixing a file.
- is there a way to name files in pro4 to be compatible with bcheck [ using upper case ?] I'll test further however pro4 seems to always name .dat and .odx lower case.
- is Rob D's 'defrag' utility a replacement for 'bcheck -s ' ?
best regards, rob