Hi all, I want to compile the cobol program with a click of a button in toolbar provided if its compiler location and command to compile is specified.
e.g

c:\cob>cobol hello.cob 'command line equivalent

VB equivalent:

Dim command As String
         command = "cd " & app_path 
         'app_path="c:\cob"
         'app_param="cobol"
         'file_name="hello.cob"  
         stats = Shell("cmd.exe /k " & command & app_param & file_name, vbNormalFocus)

In the Cmd prompt I get:

The Directory name is Invalid.
c:\cob>

But there exists a directory named cob and file named "hello.cob".
Help needed!

Edited 5 Years Ago by b1izzard: n/a

I Got it solved

command = app_param & " " & file_name 'cobol num.cob
         ChDir (app_path) 'compiler path
         stats = Shell("cmd.exe /k " & command, vbNormalFocus)

I Got it solved

command = app_param & " " & file_name 'cobol num.cob
         ChDir (app_path) 'compiler path
         stats = Shell("cmd.exe /k " & command, vbNormalFocus)
Comments
Well done.
This question has already been answered. Start a new discussion instead.