jposge

COBAL.EXE Parameters

7 posts in this topic

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

 

 

Share this post


Link to post
Share on other sites



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

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now