I have converted my old dbaseIV application to 5.7.
In the "old" situation i use batfiles for starting up and to set de directory variables.
Example:
rem Envoriment Variables-*******
set ae.drv=D
set ae.drvx=D
set ae.drvpers=D
set ae.o=E
rem **************************
set ae.valuta=EUR
set ae.opers=Z
set ae.k=Y
set ae.as=TM
set ae.is=TM
set ae.drvdb=c:\DBASE
set ae.drv3270=U:\EXTRA
rem set ae.drvdata=%ae.drv%:\%ae.o%%ae.k%%ae.as%A
rem set ae.drvdati=%ae.drvx%:\%ae.o%%ae.k%%ae.as%I
IF A%AE.DRVDATA% == A SET AE.DRVDATA=%AE.DRV%:\%AE.O%%AE.K%%AE.AS%A
IF A%AE.DRVDATI% == A SET AE.DRVDATI=%AE.DRVX%:\%AE.O%%AE.K%%AE.AS%I
rem Wich enviroment?
cls
echo THIS IS THE 57 version
echo %ae.drvdata%
echo %ae.drvdati%
pause
rem call Application
call %ae.drvdata%\APPS\BAT\Tmjstart.bat
pause
rem clear variabels
set ae.drv=
set ae.drvx=
set ae.drvpers=
set ae.o=
set ae.opers=
set ae.k=
set ae.as=
set ae.is=
set ae.drvdb=
set ae.drv3270=
set ae.drvdata=
set ae.drvdati=
rem End PYTMA.BAT
After calling the tmjstrt1.bat there is another batfile wich is called tmjstrt2
if not exist %ae.drvdata%\APPS\BAT\Tmj_val.bat goto wrongcur
call %ae.drvdata%\APPS\BAT\Tmj_val.bat
if %ae.valuta%==NLG goto rightcur
if %ae.valuta%==EUR goto rightcur
:wrongcur
echo ********************************************
echo Systeem kan niet worden opgestart wegens
echo het ontbreken van de valuta context.
echo Neem contact op met de helpdesk, tel 8181.
echo.
echo.
echo Druk op een toets om af te breken
echo ********************************************
pause > nul
goto EINDE
:rightcur
IF A%AE.DRVDATA% == A goto EnviromentERR
IF A%AE.DRVDATI% == A goto EnviromentERR
IF A%AE.DRVDB% == A goto EnviromentERR
IF A%AE.DRV3270% == A goto EnviromentERR
echo ********************************************
echo Systeem will startup in %ae.valuta% currency
echo with the following variables:
echo %AE.DRVDATA%
echo %AE.DRVDATI%
echo %AE.DRVDB%
echo %AE.DRV3270%
echo Press any key to continue
echo ********************************************
pause > nul
cls
%AE.DRV%:
CD %AE.DRVDATA%\APPS\PROG
%AE.DRVDATA%\APPS\PROG\TMQSTRT.EXE /%AE.DRVDATA%
CD %AE.DRVDATA%\APPS\BAT
CALL %AE.DRVDATA%\APPS\BAT\TMJSTRT2.BAT
goto einde
:EnviromentERR
echo ********************************************
echo Systeem cannot start because of missing
echo enviromentvariables.
echo Call helpdesk
echo.
echo.
echo Press any key to abort
echo ********************************************
pause > nul
cd ..\..
:EINDE
The problem however is that ae.drvdati (the directory in wich my database files are stored) is not stored in memory.
Is there someone with a solution? hard coding or prg's and dbf's in the same foler are not an option.
Thanks in advance,
Bob
In the "old" situation i use batfiles for starting up and to set de directory variables.
Example:
rem Envoriment Variables-*******
set ae.drv=D
set ae.drvx=D
set ae.drvpers=D
set ae.o=E
rem **************************
set ae.valuta=EUR
set ae.opers=Z
set ae.k=Y
set ae.as=TM
set ae.is=TM
set ae.drvdb=c:\DBASE
set ae.drv3270=U:\EXTRA
rem set ae.drvdata=%ae.drv%:\%ae.o%%ae.k%%ae.as%A
rem set ae.drvdati=%ae.drvx%:\%ae.o%%ae.k%%ae.as%I
IF A%AE.DRVDATA% == A SET AE.DRVDATA=%AE.DRV%:\%AE.O%%AE.K%%AE.AS%A
IF A%AE.DRVDATI% == A SET AE.DRVDATI=%AE.DRVX%:\%AE.O%%AE.K%%AE.AS%I
rem Wich enviroment?
cls
echo THIS IS THE 57 version
echo %ae.drvdata%
echo %ae.drvdati%
pause
rem call Application
call %ae.drvdata%\APPS\BAT\Tmjstart.bat
pause
rem clear variabels
set ae.drv=
set ae.drvx=
set ae.drvpers=
set ae.o=
set ae.opers=
set ae.k=
set ae.as=
set ae.is=
set ae.drvdb=
set ae.drv3270=
set ae.drvdata=
set ae.drvdati=
rem End PYTMA.BAT
After calling the tmjstrt1.bat there is another batfile wich is called tmjstrt2
if not exist %ae.drvdata%\APPS\BAT\Tmj_val.bat goto wrongcur
call %ae.drvdata%\APPS\BAT\Tmj_val.bat
if %ae.valuta%==NLG goto rightcur
if %ae.valuta%==EUR goto rightcur
:wrongcur
echo ********************************************
echo Systeem kan niet worden opgestart wegens
echo het ontbreken van de valuta context.
echo Neem contact op met de helpdesk, tel 8181.
echo.
echo.
echo Druk op een toets om af te breken
echo ********************************************
pause > nul
goto EINDE
:rightcur
IF A%AE.DRVDATA% == A goto EnviromentERR
IF A%AE.DRVDATI% == A goto EnviromentERR
IF A%AE.DRVDB% == A goto EnviromentERR
IF A%AE.DRV3270% == A goto EnviromentERR
echo ********************************************
echo Systeem will startup in %ae.valuta% currency
echo with the following variables:
echo %AE.DRVDATA%
echo %AE.DRVDATI%
echo %AE.DRVDB%
echo %AE.DRV3270%
echo Press any key to continue
echo ********************************************
pause > nul
cls
%AE.DRV%:
CD %AE.DRVDATA%\APPS\PROG
%AE.DRVDATA%\APPS\PROG\TMQSTRT.EXE /%AE.DRVDATA%
CD %AE.DRVDATA%\APPS\BAT
CALL %AE.DRVDATA%\APPS\BAT\TMJSTRT2.BAT
goto einde
:EnviromentERR
echo ********************************************
echo Systeem cannot start because of missing
echo enviromentvariables.
echo Call helpdesk
echo.
echo.
echo Press any key to abort
echo ********************************************
pause > nul
cd ..\..
:EINDE
The problem however is that ae.drvdati (the directory in wich my database files are stored) is not stored in memory.
Is there someone with a solution? hard coding or prg's and dbf's in the same foler are not an option.
Thanks in advance,
Bob