0

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 by b1izzard: n/a

1
Contributor
2
Replies
4
Views
6 Years
Discussion Span
Last Post by b1izzard
Featured Replies
  • I Got it solved [CODE] command = app_param & " " & file_name 'cobol num.cob ChDir (app_path) 'compiler path stats = Shell("cmd.exe /k " & command, vbNormalFocus) [/CODE] Read More

0

I Got it solved

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

I Got it solved

command = app_param & " " & file_name 'cobol num.cob
         ChDir (app_path) 'compiler path
         stats = Shell("cmd.exe /k " & command, vbNormalFocus)
Votes + Comments
Well done.
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.