OS/2, eCS & ArcaOS - Technical > Programming
Start program from VX-Rexx
Per E. Johannessen:
Hi,
I have a cmd file with this line;
address cmd.exe "start /C /min P:\test\pdftotext.exe source.PDF input.txt"
and it works fine (converting the pdf to txt).
Trying to run the same line in VX-Rexx is not working.
Got some good tips in the below thread:
https://www.os2world.com/forum/index.php/topic,2932.msg32804.html#msg32804
I've tried any "combination" I could think of but no success.
At one point I got the error message "private_alloc failed, error code = 0x00000137".
Anyone who knows how to get it to work in VX-Rexx?
Alex Taylor:
1. Don't put .exe after cmd, I'm pretty sure it's a keyword command, not a reference to cmd.exe
2. Don't use 'start', running a program with address cmd (at least from VXREXX) will already start a separate session (and minimize it, IIRC).
The following should suffice for running a program from VX-REXX:
--- Code: ---ADDRESS CMD "P:\test\pdftotext.exe source.PDF input.txt"
--- End code ---
Plus any output redirection you need, of course.
Remy:
--- Quote from: Per E. Johannessen on March 22, 2024, 09:54:21 pm ---Hi,
I have a cmd file with this line;
address cmd.exe "start /C /min P:\test\pdftotext.exe source.PDF input.txt"
and it works fine (converting the pdf to txt).
Trying to run the same line in VX-Rexx is not working.
Got some good tips in the below thread:
https://www.os2world.com/forum/index.php/topic,2932.msg32804.html#msg32804
I've tried any "combination" I could think of but no success.
At one point I got the error message "private_alloc failed, error code = 0x00000137".
Anyone who knows how to get it to work in VX-Rexx?
--- End quote ---
I didn't try this but may be you can try it:
'@start cmd /c start "pdftotext" /b/k '||your_program
Per E. Johannessen:
Thanks, but I can't get any of the suggestions to work.
ADDRESS CMD "P:\test\pdftotext.exe source.PDF input.txt"
Results in "private_alloc failed, error code = 0x00000137
'@start cmd /c start "pdftotext" /b/k '||your_program
Results in "invalid expression"
In another project this is working fine:
address cmd.exe "start /C /min d:\gs\GS9.15\BIN\gsos2
Alex Taylor:
--- Quote from: Per E. Johannessen on March 23, 2024, 02:48:49 pm ---ADDRESS CMD "P:\test\pdftotext.exe source.PDF input.txt"
Results in "private_alloc failed, error code = 0x00000137
--- End quote ---
Actually, I think this is probably an error from pdftotext.exe itself (or rather, its C runtime).
Does it depend on DLLs or other support files in its current directory? If so, you might need to change the current working directory (or possibly even manipulate the path/libpath/dpath etc).
Navigation
[0] Message Index
[#] Next page
Go to full version