Re: How to read in data from the command window?
- From: globaloney <jgolano@xxxxxxxxxx>
- Date: Mon, 21 Jul 2008 20:47:44 -0700 (PDT)
On Jul 21, 7:24 pm, globaloney <jgol...@xxxxxxxxxx> wrote:
How do you pull in data issued in the cmd window
Example my REXX program issues "ADDRESS CMD DIR"
how do I capture the response as data to be used later in the program?
Is the response read as one stream or individual lines.
Thanks in advance.
I did get the following code to run however it generates errors in the
cmd window.
/*********************************/
rxqueue('delete','jgq')
rxqueue('create','jgq')
rxqueue('set','jgq')
cmdstr = "dir *.txt"
ADDRESS CMD cd prf
ADDRESS CMD cmdstr"| rxqueue jgq "
Do queued()
pull qline
got=got+1
/**********************************************************/
pos1 = pos('~', qline)
pos2 = pos('.TXT',qline)
if pos1 > 0 and pos2 > 0 then do
tr=pos1-2
orse=substr(qline,tr,12)
call LINEOUT FOLENAME, orse
end
CALL LINEOUT (FOLENAME) /* CLOSE */
/**************************************************/
I did get the above code to run, however it generates the
following(non impacting) error messages in the command window;
'0' is not recognized as an internal or external command,operable
program or batch file.
'JGQ' is not recognized as an internal or external command,operable
program or batch file.
'SESSION' is not recognized as an internal or external
command,operable program or batch file.
Is there a way to suppress the messages FMI?
.
- Follow-Ups:
- References:
- How to read in data from the command window?
- From: globaloney
- How to read in data from the command window?
- Prev by Date: Re: Need sample program
- Next by Date: Re: How to read in data from the command window?
- Previous by thread: Re: How to read in data from the command window?
- Next by thread: Re: How to read in data from the command window?
- Index(es):
Relevant Pages
|