
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello:
In NetExpress i use a command "CALL "SYSTEM" USING command-line" where command-line is a call to a batch file
"cmd /C hash.bat 001181107".
I copied the routine for Visual Cobol but I think the command is not running as the result of the CALL does not appear.
Is there any other way to do this command?
Thanks
Alberto Ferraz
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello david and Chris:
Have redefined the path and the call is already running.
The BAT.FILE is already being called by Cobol.
Thanks again for your help.
Best Regards
Alberto Ferraz

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Alberto,
Make sure you null terminate your command. This works OK for me:-
identification division.
program-id. Program1.
environment division.
configuration section.
data division.
working-storage section.
procedure division.
call "system" using z"dir c:\|more"
goback.
You can also use the X"91" Function 35 call to do this:-
documentation.microfocus.com/.../index.jsp;cp=5_5_3_9_30_6
or go to a Windows API (CreateProcess).
Regards
David

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Alberto,
Also please be aware that in Net Express when running from within the IDE the current directory was set as the project directory by default so your .bat file would be found if located there.
In Visual COBOL when running from within the IDE the currently directory is set at the Output directory by default. This is the folder in which your compiled executable files would be placed, i.e proj\bin\x86\debug in Visual Studio.
With your command if the .bat file is not in the current directory it will not be found.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello david and Chris:
Have redefined the path and the call is already running.
The BAT.FILE is already being called by Cobol.
Thanks again for your help.
Best Regards
Alberto Ferraz