Groups > DB2 > DB2 on AS400 server > Re: Spool file using Java




Spool file using Java

Spool file using Java
Tue, 8 Jan 2008 15:24:33 -0500
Anybody can send me in the right direction on how-to achieve this?

idea is user submits a job (which runs a java class file) and now need to 
send back a spool file(report) into users queue.

Can this be done? its easily done with other programming languages on the 
iSeries question is how to do in Java? all I could find is ibm toolbox. 

Post Reply
Re: Spool file using Java
Thu, 10 Jan 2008 08:01:13 -060
The simplest form of this is to just use System.out. I know I've seen 
spool files from batch Java programs where the information is from 
System.out and/or System.err. There's an OUTPUT(*PRINT) option on the 
JAVA/RUNJVA but I don't know if that's needed. I'd think you'd be able 
to OVRPRTF this to a different queue.

Or are you asking for an externally described record layout spool file 
and the ability to use that?

-Stevers

Robert wrote:
> Anybody can send me in the right direction on how-to achieve this?
> 
> idea is user submits a job (which runs a java class file) and now need to 
> send back a spool file(report) into users queue.
> 
> Can this be done? its easily done with other programming languages on the 
> iSeries question is how to do in Java? all I could find is ibm toolbox. 
> 
Post Reply
Re: Spool file using Java
Sat, 12 Jan 2008 17:13:00 -050
> Or are you asking for an externally described record layout spool file and

> the ability to use that?
Kind of, you can think of it as a report to the program.

I did find the solution, for anyone interested see web link.

Answer is to use the com.ibm.io.as400.access.*; classes more specifically 
the Spool related classes.

http://www.jguru.com/forums/view.jsp?EID=1282363 

Post Reply
about | contact