Hello All,
I would like to run a program from windows command line and pass some arguments to it.
What and where I should code inside a COBOL program in order to work with command line?
I'm working with Microfocus Net Express 5.0
Thank you,
Hello All,
I would like to run a program from windows command line and pass some arguments to it.
What and where I should code inside a COBOL program in order to work with command line?
I'm working with Microfocus Net Express 5.0
Thank you,
Hello All,
I would like to run a program from windows command line and pass some arguments to it.
What and where I should code inside a COBOL program in order to work with command line?
I'm working with Microfocus Net Express 5.0
Thank you,
The easiest method is to use the following:
id division.
program-id. testcmdline.
working-storage section.
01 ws-command-line pic x(1024) value spaces.
procedure division.
accept ws-command-line from command-line
display ws-command-line
stop run.
Hello All,
I would like to run a program from windows command line and pass some arguments to it.
What and where I should code inside a COBOL program in order to work with command line?
I'm working with Microfocus Net Express 5.0
Thank you,
thank you for your answer and sorry that I posted it in wrong place :)
I tried this but it didn't work.
May be I calling a program wrong.
This is the way I do it on Win XP command line :
"C:\\Documents and Settings\\Administrator\\Desktop\\SHELED.int" TestString
or
"C:\\Documents and Settings\\Administrator\\Desktop\\SHELED.int" 'TestString'
but I did not see this " TestString" text on output screen...
Hello All,
I would like to run a program from windows command line and pass some arguments to it.
What and where I should code inside a COBOL program in order to work with command line?
I'm working with Microfocus Net Express 5.0
Thank you,
If you are using .int then you will need to start this using RUN.EXE or RUNW.EXE.
Try:
run "C:\\Documents and Settings\\Administrator\\Desktop\\SHELED.int" TestString
Hello All,
I would like to run a program from windows command line and pass some arguments to it.
What and where I should code inside a COBOL program in order to work with command line?
I'm working with Microfocus Net Express 5.0
Thank you,
I tried this :
"C:\\Documents and Settings\\Administrator\\Desktop\\SHELED.int" TestString
and there was output window but nothing was displayed.
I was told that I should create an empty project,the add my source file and rebuild it .
As far as I know there suppose to be an .exe file in the debug directory but there is non.
I also tried to step by step in debugger and it reaches this line:
ACCEPT WS-COMMAND-LINE FROM COMMAND-LINE
DISPLAY WS-COMMAND-LINE
so as far as I saw there is no problem with the code.
We also tried to do it with the class instructor and the result was the same.
Is there any setting that should be set in order to work with command line and also to create .EXE file?
thank you!!!
P.S.
we solved the other problem " connect to DB2 " by changing values in environmental variable in Windows.
I will post them later there.I still didn't tried to solve it your way,so I will try later and post the answer also.
Thanks a lot for your time !
Hello All,
I would like to run a program from windows command line and pass some arguments to it.
What and where I should code inside a COBOL program in order to work with command line?
I'm working with Microfocus Net Express 5.0
Thank you,
I am attaching an example Net Express 5.0 project that demonstrates how this is done.
Normally if you have an .int showing under DEBUG Build in the NX IDE Build window, then the RELEASE build will contain the .EXE but this all depends on how you set it up.
If you drag a source file from the source pool window on the right to the build window on the left then you should bring the file over as an object file.
You would then right click on the .obj in the build window and select Package As and select .EXE.
The project that I have attached has an .EXE in the build window which will be copied to the debug folder.
Under Animate-->Settings I have set the text "teststring" to be passed on the command line.
When you are animating you should be able to position the mouse over the ws-command-line variable in the source to see it's contents after the ACCEPT statement has been executed.
Thanks.
Hello All,
I would like to run a program from windows command line and pass some arguments to it.
What and where I should code inside a COBOL program in order to work with command line?
I'm working with Microfocus Net Express 5.0
Thank you,
Perhaps these will help
change the build type to release,and then change the interface type to character instead of graphic in the build settings panel.
Hello All,
I would like to run a program from windows command line and pass some arguments to it.
What and where I should code inside a COBOL program in order to work with command line?
I'm working with Microfocus Net Express 5.0
Thank you,
Perhaps these will help
change the build type to release,and then change the interface type to character instead of graphic in the build settings panel.
Hello All,
I would like to run a program from windows command line and pass some arguments to it.
What and where I should code inside a COBOL program in order to work with command line?
I'm working with Microfocus Net Express 5.0
Thank you,
Perhaps these will help
change the build type to release,and then change the interface type to character instead of graphic in the build settings panel.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.