|
Thanks, Franco. I was thinking along the same lines, so I tried telling it to run qsh and then passed my command as a separate String argument, but I still can't get it to work. -Marty ------------------------------ date: Fri, 07 Feb 2003 14:14:45 +0100 from: "Franco Biaggi" <fbiaggi@ticino.com> subject: Re: runtime.exec() Hi, never tried on the AS/400, but I think you should start a runtime environment linke CMD.EXE on Windows. Ciao. On Fri, 7 Feb 2003 06:57:58 -0500, Urbanek, Marty wrote: >How do I use runtime.exec() on iSeries? I've read several web articles but I >still don't undertand and can't get it to work. >Let's say I want to do "ls >mylist.txt". >Runtime rt = Runtime.getRuntime(); >Process proc = rt.exec("ls >mylist.txt"); >int exitVal = proc.waitFor(); >System.out.println("Process exitValue: " + exitVal); >This prints out an exit value of zero, but the output file is not created >and a spool file is created with a CEE0020: >Message . . . . : This job is about to end. >Cause . . . . . : The job is being terminated because the job is capable >of > having multiple threads and the application has issued an exit(), abort() >or > their equivalent APIs, an exception has occurred and is not being handled, > or a return from main() has occurred in a program that runs in a *NEW > Activation Group. >Do I have to tell it to run qshell? I guess what I am asking is whether the >commands I submit to exec() have to be CL commands or qshell commands. >Thanks, >-Marty
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.