|
On Monday 15 April 2002 5:20 am, Joe Pluta wrote: > > From: Ren Fu Ping > > > > Dear Joe > > My Programm use display file I/O, I check all display input > > value in RPG, and i use on parameter '0' &'1' to indicated > > interactive and batch job. I want to program an CLP for calling > > in RPG to change this job from Qinter to Qbatch, I have tried > > your prompt, but only batch job generate with some log file, and > > result spool file was generated by interactive job. any suggestion? > > Ping, if your program uses a display file, you will not be able to run > it in batch easily. From what I can understand, your program prompts > the user for some values and then runs the program. Is this correct? > > Then, if what you want to do is to run the program in batch, what you > will have to do is first prompt the user for the parameters > interactively, then submit the job and pass the parameters to the > called program on the SBMJOB command. > > Joe Ping It sounds (unless I've completely lost the plot) like you want to have the interactive job itself go into batch, rather than submit a copy of itself to batch. Something like the equivalent of doing a Ctrl-Z then typing bg on a Linux box to put the current foreground (interactive) job into the background (batch). AFAIK it isn't possible to move a job from one subsystem to another, only from one job queue to another before it's been activated. The Batch/Interactive setting is set by how the job is run and isn't user controllable[1]. About the only thing you can do is as Joe suggests. Put conditions around all display file I/O and have the display file(s) put under user control. Only open the display file & enable I/O if the job is run interactively, otherwise keep the file closed and bypass display file logic. Regards, Martin [1] Unless you have Fast/400, that is ;-) -- martin@dbg400.net jamaro@firstlinux.net http://www.dbg400.net /"\ DBG/400 - DataBase Generation utilities - AS/400 / iSeries Open \ / Source free test environment tools and others (file/spool/misc) X [this space for hire] ASCII Ribbon Campaign against HTML mail & news / \
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.