I am currently creating an Access database to replace an existing batch file that transfers data from one system into text files (Using tto transfer files if that means anything to you). Anyway, the batch file is laid out as below:
@echo off
echo Monthy Download......
REM Batch file to run transfers for monthly download
date /t > "C:\Data\Log.txt"
time /t >> "C:\Data\Log.txt"
RTOPCB /s "C:\Data\Transfers\File1Import.tto" >> "C:\Data\Log.txt"
echo File1 complete
RTOPCB /s "C:\Data\Transfers\File2Import.tto" >> "C:\Data\Log.txt"
echo File2 complete
date /t >> "C:\Data\Log.txt"
time /t >> "C:\Data\Log.txt"
echo Transfer complete.
As you can see, as each of the two files are transferred and at the start and end the command ">> "C:\Data\Log.txt" is used. This copies certain information to a log text file. The information from the tto files includes no of records transferred and confirmation on successful transfer. It looks like the below:
Mon 04/11/2002
9:29
IBM AS/400 Client Access for Windows 95/NT
Version 3 Release 2 Level 0
Transfer data from AS/400
(C) Copyright IBM Corporation and Others 1984, 1995. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.
Licensed Materials - Property of IBM
Transfer file: C:\Data\Transfers\File1Import.tto
Receive completed successfully.
Rows transferred: 47505
IBM AS/400 Client Access for Windows 95/NT
Version 3 Release 2 Level 0
Transfer data from AS/400
(C) Copyright IBM Corporation and Others 1984, 1995. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.
Licensed Materials - Property of IBM
Transfer file: C:\Data\Transfers\File2Import.tto
Receive completed successfully.
Rows transferred: 26927
Mon 04/11/2002
12:19
Now because I am making the transfer process in access I need to find a way of creating this same log file. Does anyone know how to use the command used in the batch file or an equivalent command inside Access? Someone else I know tried using shell to run the command but this makes an error message appear that is too quick to read.
@echo off
echo Monthy Download......
REM Batch file to run transfers for monthly download
date /t > "C:\Data\Log.txt"
time /t >> "C:\Data\Log.txt"
RTOPCB /s "C:\Data\Transfers\File1Import.tto" >> "C:\Data\Log.txt"
echo File1 complete
RTOPCB /s "C:\Data\Transfers\File2Import.tto" >> "C:\Data\Log.txt"
echo File2 complete
date /t >> "C:\Data\Log.txt"
time /t >> "C:\Data\Log.txt"
echo Transfer complete.
As you can see, as each of the two files are transferred and at the start and end the command ">> "C:\Data\Log.txt" is used. This copies certain information to a log text file. The information from the tto files includes no of records transferred and confirmation on successful transfer. It looks like the below:
Mon 04/11/2002
9:29
IBM AS/400 Client Access for Windows 95/NT
Version 3 Release 2 Level 0
Transfer data from AS/400
(C) Copyright IBM Corporation and Others 1984, 1995. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.
Licensed Materials - Property of IBM
Transfer file: C:\Data\Transfers\File1Import.tto
Receive completed successfully.
Rows transferred: 47505
IBM AS/400 Client Access for Windows 95/NT
Version 3 Release 2 Level 0
Transfer data from AS/400
(C) Copyright IBM Corporation and Others 1984, 1995. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure
restricted by GSA ADP Schedule Contract with IBM Corp.
Licensed Materials - Property of IBM
Transfer file: C:\Data\Transfers\File2Import.tto
Receive completed successfully.
Rows transferred: 26927
Mon 04/11/2002
12:19
Now because I am making the transfer process in access I need to find a way of creating this same log file. Does anyone know how to use the command used in the batch file or an equivalent command inside Access? Someone else I know tried using shell to run the command but this makes an error message appear that is too quick to read.