C - C2DBASE1.ZIP - CDBUTIL.PRC

 
Output of file : CDBUTIL.PRC contained in archive : C2DBASE1.ZIP

*****************
PROCEDURE RECOUNT
*****************
*THIS PROCEDURE PROVIDES A FAST ALTERNATIVE TO DBASE'S COUNT COMMAND. iT GIVES
*AN UNFILTERED COUNT OF THE NUMBER OF RECORD IN A .DBF FILE. (NORMALLY, YOU CAN
*HIDE CERTAIN RECORDS FROM DBASE BY USING THE 'SET FILTER TO' COMMAND. THIS
*WOULD CHANGE THE RECORD COUNT. THIS PROCEDURE INCLUDES THOSE HIDDEN RECORDS.)
PARAMETERS FILE
RUN CDBUTIL.EXE 2 &FILE
RETURN

******************
PROCEDURE MEMCOUNT
******************
*THIS PROCEDURE IS THE SAME AS RECOUNT, EXCEPT THAT THE RECORD COUNT IS PASSED
*TO A USER SPECIFIED MEMORY VARIABLE.
PARAMETERS FILE,RCOUNT
RUN CDBUTIL.EXE 3 &FILE
*ESTABLISH FULL PATHNAME OF .MEM FILE
TEMP=SUBSTR(FILE,1)
SLASH=AT("\",TEMP)
POSITION=0
DO WHILE SLASH > 0
POSITION=POSITION+SLASH
TEMP=SUBSTR(FILE,1+POSITION)
SLASH=AT("\",TEMP)
ENDDO
MEMFILE=SUBSTR(FILE,1,POSITION)+'RETURN'
RESTORE FROM &MEMFILE ADDITIVE
RCOUNT=VAL(RETPARAM)
*RETPARAM IS ALWAYS RESTORED AS A STRING
RETURN

*****************
PROCEDURE MEMDISP
*****************
*THIS PROCEDURE DISPLAYS THE MEMO FIELD(S) SPECIFIED IN THE VARIABLE RECRANGE
*RECRANGE MUST BE A STRING REPRESENTING A RECORD NUMBER, RECORD RANGE, OR
*STARTING OR ENDING RECORD NUMBER.
PARAMETERS FILE,RECRANGE
RUN CDBUTIL.EXE 5 &FILE &RECRANGE
RETURN

******************
PROCEDURE STRFIND
******************
*THIS PROCEDURE SEARCHES THROUGH RECORDS TO FIND A KEYPHRASE. THE RECORDS
*SEARCHED ARE SPECIFIED IN THE THIRD VARIABLE RECRANGE AND MUST BE A STRING
*OR STRING VARIABLE REPRESENTING THE RECORD OR RECORD RANGE. THE KEYPHRASE
*IS GIVEN IN THE SECOND VARIABLE, AND THE FILE TO BE SEARCHED IS GIVEN IN
*THE FIRST VARIABLE.
PARAMETERS FILE, PHRASE, RECRANGE
RUN CDBUTIL.EXE 6 &FILE &PHRASE &RECRANGE
RETURN