| 
 | 
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
>_______________________________________________
>This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) 
>mailing list
>To post a message email: JAVA400-L@midrange.com
>To subscribe, unsubscribe, or change list options,
>visit: http://lists.midrange.com/mailman/listinfo/java400-l
>or email: JAVA400-L-request@midrange.com
>Before posting, please take a moment to review the archives
>at http://archive.midrange.com/java400-l.
-----------------------
Franco Biaggi
CH-6807 Taverne
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.