Indexes in qualified files

Bob Stockler bob at trebor.iglou.com
Mon Nov 27 14:19:47 PST 2006


Rodgers Hemer wrote (on Mon, Nov 27, 2006 at 11:39:59AM -0800):

| I would appreciate some advice and/or solutions for two indexing  
| problems concerning qualified files (FP 5.0.14R4 and SCO 6.0):
| 
| 1.  When using xfer to transfer records from a Windows file server to  
| the SCO box, the keys in qualified files are transferred but the  
| indexes are not.  In all cases the main key file is empty as all of  
| the records are in the qualified files.  Is there any way around this  
| or must I manually build each of the indexes for qualified files?
| 
| 2.  I use the following script to rebuild indexes on the SCO  box:
| 
| 	#!/bin/sh
| 	##Rebuild all automatic indexes in all filePro files
| 	indexlist=`ls /u/appl/filepro`
| 	for index in $indexlist
| 	do
| 		/u/appl/fp/dxmaint $index -ra -e >/dev/null
| 	done
| 
| This works fine for all files except the qualified files.  Is there  
| some similar script that might work for the qualified files?  I am  
| trying to avoid maintaining a separate file containing a list of the  
| qualified files.

Here's something for you to play with:

  #!/bin/ksh
  [[ -z "$PFTEMP" ]] && PFTEMP=/tmp
  [[ -z "$PFPROG" ]] && PFPROG=/u/appl
  [[ -z "$PFDATA" ]] && PFDATA=/u
  [[ -z "$PFDIR"  ]] && PFDIR=/appl
  cd $PFDATA$PFDIR/filepro
  Files=$( ls */map | awk -F / '{ print $1 }' )
  for File in $Files
  do ls $File/key?* 2>/dev/null |
       awk -F / '{ sub(/key/,"",$2) ; print "fPfile=" $1, "Qual=" $2 }'
  done >$PFTEMP/fplist
  while read
  do eval $REPLY
     echo "$PFPROG/fp/dxmaint $fPfile -m $Qual -ra -e >/dev/null 2>&1"
  done <$PFTEMP/fplist
  rm -f $PFTEMP/fplist

Bob

-- 
Bob Stockler  +-+  bob at trebor.iglou.com  +-+  http://members.iglou.com/trebor


More information about the Filepro-list mailing list