The best way to run Java batch jobs on i-Series:Explanatory Notes:
http://www.tutorials-be.com/as400/Best-ways/
The traditional method on the iSeries would be to use the SBMJOB command and
let your Java program run as a separate job. That way, if necessary, you
can tweak setting like dispatching priority, memory pool, pre-started JVMs,
etc. These, IMHO, are the things that OS/400 is particularly good at, and
might endear you to your opponents.
If you can start the command from a green screen command line, you can
submit the same command to a job queue and run it there. You can execute
the command from inside an RPG program, but personally, for flexibiliy, I
think it is easier to write a small CL program (you can get away with 3 or
so lines if you aren't passing any parameters) and call it from the RPG.
Of course, if you aren't familar with CL then this becomes more of a
problem.
And a final thought: You need some way to (gracefully) end the java
program.
Sam
FWIW: YOur Java program sound like what we often refer to as an NEP, or
Never Ending Program. While such things run as a background task, they can
be made to run at the same priority, or maybe slightly lower, than
interactive sessions, but almost always higher than batch jobs, on the
theory that they spend most of their time just waiting for activity, but
when they run, they need to respond more quickly than, and not be inpacted
by, other batch (background) jobs. Again, this is where OS/400 excels in
it's flexibility and control.
IMHO: In My Humble Opinion
FWIW: For What It's Worth
No comments:
Post a Comment