From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Urey, Dawn" Newsgroups: gmane.os.tru64.managers Subject: Problem with cat/lpr from stored procedure Date: Fri, 04 Oct 2002 10:10:57 -0400 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: main.gmane.org 1033740547 15335 127.0.0.1 (4 Oct 2002 14:09:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 4 Oct 2002 14:09:07 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.20.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 17xT8a-0003z6-00 for ; Fri, 04 Oct 2002 16:09:05 +0200 Original-Received: (qmail 22867 invoked by uid 5); 4 Oct 2002 14:09:18 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 22858 invoked by uid 49493); 4 Oct 2002 14:09:18 -0000 Original-Received: from UreyD@pginw.com by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.24. spamassassin: 2.50-cvs. Clear:SA:0(-1.4/5.0):. Processed in 0.399822 secs); 04 Oct 2002 14:09:18 -0000 Original-Received: from unknown (HELO emroute2.cind.ornl.gov) (128.219.159.41) by 0 with SMTP; 4 Oct 2002 14:09:18 -0000 Original-Received: from emroute2.cind.ornl.gov (LOCALHOST [127.0.0.1]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0H3G00FACNBGIM@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Fri, 04 Oct 2002 10:09:17 -0400 (EDT) Original-Received: from pginwimc.pginw.com (pginwimc.pginw.com [208.9.69.11]) by emroute2.cind.ornl.gov (PMDF V6.1-1 #39060) with ESMTP id <0H3G00L0HNAWST@emroute2.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Fri, 04 Oct 2002 10:08:57 -0400 (EDT) Original-Received: by PGINW02 with Internet Mail Service (5.5.2656.59) id <4GRKNFNR>; Fri, 04 Oct 2002 10:08:55 -0400 Content-return: allowed Original-To: "Tru64 Managers \(tru64-unix-managers@ornl.gov\)" X-Mailer: Internet Mail Service (5.5.2656.59) Xref: main.gmane.org gmane.os.tru64.managers:1958 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:1958 >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 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 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.