|
> From: Alberty Pascal > > >You lose the override as soon as you get done executing the command. > >Override by default only last as long as the current invocation level > >(although the rules change a little in ILE). > > I thought that commands run on a same AS400 object (same connection) > was run in the same "context" ... The same thing happens in any AS/400 job. If you call a program that does an override and that program returns, you lose the override. This is nothing new. That's why you have to call QCMDEXC to do an override. > Doesn't work ... :-( The following works fine for me: import com.ibm.as400.access.*; class CmdCallTest1 { public static void main(java.lang.String[] args) throws Exception { AS400 as400 = new AS400(); String cmd1 = "OVRPRTF QPDSPLIB SAVE(*YES) OVRSCOPE(*JOB)"; String cmd2 = "DSPLIB PLUTA OUTPUT(*PRINT)"; CommandCall cmd = new CommandCall(as400); cmd.run(cmd1); cmd.run(cmd2); System.exit(0); } } This creates a spooled file in RDY status, with the SAVE attribute set to *YES. When I print the report, it remains in the outq with status SAV. Joe
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.