Dos Software

Before windows there was DOS. After windows there is still DOS. Perhaps it is called command line mode or whatever but basically batch files are batch files.

However DOS is not always DOS. 36-400 has extensive experience in support for DOS and is aware of the subtle differences between the different incarnations of cmd.exe and command.com.

There are many venerable DOS applications that most people think will not run on anything but a plain DOS machine. In our experience this is incorrect.

36-400 has migrated many DOS applications to Win98SE, WinNT, Win2000 and WinXP. Not only that, 36-400 can store your DOS batch files on an AS/400 and then execute them on a nominated PC. This helps with centralising backups and making changes.

The example below is processed by an RPG program that performs data substitution and then transfers it to a PC for execution:

Or perhaps self modifying batch files is a requirement? The following is a small sample from a suite of batch files that take uniquely named edi files, builds a .TTO file for PCS and then transfers them to an AS400. Although not highlighted below, the batch files have full error checking.

set error=4
goto tag90

:tag25
:: Create the transfer request and upload the file.
for %%f in (*.mfd) do call pctfr400 %cedi% %%f %ilib%
if '%error%'=='' goto tag99

::...if error fall thru.

::Error routine.
:tag90
3640014 bad%error%.txt
goto tag100

::Create PC to AS/400 transfer request
:: P1 = Edi directory name ie x:\edi
:: P2 = File name on PC ie WS112233.mdf
:: P3 = Library name on AS/400 to upload to
:: Note AS/400 file name is extracted from PC file name.

::Check that on a previous run this job hasn't failed.
if '%error%'=='' goto tag10
goto tag99

:tag10
:: Delete current request
del %1\pctfr400.xxx > nul
del %1\pctfr400.tfr > nul

::Archive the file to be worked on.
copy %1\%2 %cedibak% > nul

::Get Upload file name.
if not exist c:\work36400\nul md c:\work36400
c:
cd\work36400
for %%g in (*.*) do del %%g > nul
copy %cedi%\%2 PO*
for %%g in (PO*) do set PONAM=%%g
cd\%edi%
deltree /Y c:\work36400

:: Rebuild new request
echo TRFRPC> pcto400.yyy
echo Upload for EDI mdf files to 400. > pcto400.xxx
call pctfr401.bat
echo TO %3/%PONAM%> pcto400.xxx
call pctfr401.bat
echo %1\%2> pcto400.xxx

 

 
 
©2004 36-400 Consulting Pty Ltd. Please read the disclaimer.