DOS 6.22 does not support %~nI in for batch statements. here's a workaround to the problem I presented in my original question about isql's 4.10 bcheck utility requiring only a basename whereas in isql 2.10 bcheck utility worked with star.star as an argument. I created the following QBASIC program to solve bcheck 4.10 now requiring only a basename to work:
BatFile$ = "CHKFILE.BAT"
IF INSTR(COMMAND$, "?") > 0 THEN
PRINT
PRINT "This program generates a batch file to check Informix files"
PRINT " -b BBBB.BAT this option is used to change the batch file name"
PRINT " by default the batch file name is CHKFILE.BAT"
PRINT
SYSTEM
END IF
IF INSTR(COMMAND$, "-B") > 0 THEN
BatFile$ = LTRIM$(MID$(COMMAND$, INSTR(COMMAND$, "-B") + 2)) + " "
BatFile$ = LEFT$(BatFile$, INSTR(BatFile$, " ") - 1)
END IF
OPEN BatFile$ FOR OUTPUT AS #2
filename$ = DIR$("*.dat")
IF LEN(filename$) = 0 THEN SYSTEM
DO WHILE LEN(filename$) > 0
PRINT #2, "bcheck -y", filename$
filename$ = DIR$
LOOP
CLOSE
SYSTEM
OR, one can write an ACE program to extract the basename from systables.dirpath and PRINT "BCHECK -y ",systables.dirpath