jposge Posted July 12, 2016 Share Posted July 12, 2016 I am trying to have AutoIt run the following but cannot figure out how to add the SYDRIVER.COB to the AutoIt "RUN" command line to get it to work. "Q:\RMCv1212\046\program files\Liant\RMCOBOLVX\runcobol.exe" SYDRIVER.COB I can get run("Q:\RMCv1212\046\program files\Liant\RMCOBOLVX\runcobol.exe") to work but of course I get an error during start up because it needs the SYDRIVER.COM lookup. Thanks, Joe Posge Link to comment Share on other sites More sharing options...
Developers Jos Posted July 12, 2016 Developers Share Posted July 12, 2016 Did you try?: Run('"Q:\RMCv1212\046\program files\Liant\RMCOBOLVX\runcobol.exe" SYDRIVER.COB') Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
jposge Posted July 13, 2016 Author Share Posted July 13, 2016 Hi Jos - Yes I have tried this. The program starts but puts up a messagebox that reads..Return Code - Program 'SYDRIVER' terminate with return code 252, COBOL error code: 204. The line of code was taken from the Properties of the Icon on the Desktop that normally starts the COBOL program running. SYDRIVER reports... COBOL procedure error 234 (no object file found). Error loading main program SYDRIVER.COB COBOL procedure error 204 (program not found). Error starting application SYDRIVER.COB. Somehow, it works when I click the ICON but not when I try to run it with AutoIT. It is acting like it cannot find SYDRIVER.COB running in AutoIT. Thanks Joe Link to comment Share on other sites More sharing options...
jposge Posted July 13, 2016 Author Share Posted July 13, 2016 The ICON says Start In; Q:\Quantum_780 I think I need to indicate the file location along with the SYDRIVER.COB I am going to try adding "Q:\Quantum_780\SYSDRIVER.COB') to see if that works Thanks again for your help Joe Link to comment Share on other sites More sharing options...
Developers Jos Posted July 13, 2016 Developers Share Posted July 13, 2016 Maybe it needs the workdir set to the program dir like?: Run('"Q:\RMCv1212\046\program files\Liant\RMCOBOLVX\runcobol.exe" SYDRIVER.COB',"Q:\RMCv1212\046\program files\Liant\RMCOBOLVX") Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
jposge Posted July 13, 2016 Author Share Posted July 13, 2016 Somehow, COBOL is interpreting the location information as part of the name of the program to run. Whatever I put after runcobol.exe gets interpreted as what program to start. Is there an AutoIT function to set the Directory to Q:\Quantum_780 so then perhaps when I run the command it might find the program? Thanks, Joe Link to comment Share on other sites More sharing options...
jposge Posted July 14, 2016 Author Share Posted July 14, 2016 Hello Jos - I have resolve the issue by putting the following command first in the script - FileChangeDir("Q:\Quantum_780") Now the program executes perfectly! Thanks for your help. Sincerely, Joe Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now