Problem with cat/lpr from stored procedure

From: Urey, Dawn (UreyD@pginw.com)
Date: Fri Oct 04 2002 - 10:10:57 EDT


>From an Oracle Java stored procedure we issue a command to Tru64 using:

String command1 = "/usr/bin/ps -a";
String command2 = "/usr/bin/cat /pgi/bin/seaxx.ksh";
Process proc = null;
proc = Runtime.getRuntime().exec( command1 );
retcode = proc.waitFor();
.... code for checking retcode and stdout/stderr ...
proc = Runtime.getRuntime().exec( command2 );
retcode = proc.waitFor();
.... code for checking retcode and stdout/stderr ...

command1 works fine!
command2 works, but returns an error code 2 and message <cat: cannot open >

Same problem with any command that takes a list of files. The executable
will process the first file and then return an error trying to get more
files from the command line. I have tried terminating the command string
with NUL, ETX, EOF, CR, LF, CR/LF, EOT with no improvement. In fact it will
add an extra line to message saying that <cat: cannot open .> where . is the
non-printable terminator.

Any clues on how to tell cat or lpr that I only have one file???

Thanks

Dawn

Dawn Urey
Systems and Site Support Manager
Polymer Group, Inc
(919)874-9512

This email and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed. Personal views and opinions expressed in this communication are
those of the originator and may not necessarily reflect those of PGI. If
you are NOT the original recipient, be advised that you have received this
email in error, and that any use, dissemination, forwarding, printing, or
copying of this email is strictly prohibited.



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:48:55 EDT