javaibm-midrangejt400

How to get List of Spool files from OUTQ to Java


1st i want to say thank you for viewing this Question :)

I'm a beginner to AS400/JAVA development. I want to know how to get spool file list to java and how to convert it to PDF from OUTQ, Using JT400.

Can anyone to tell me or give me sample java code ?

Thanks in advance!


Solution

  • Split it in two.

    One is reading the characters in the spool file. I did this a few years back. I believe there is a SPoolFile class where you then need to search for the actual spool file given the job name/user name/job number triplet and then choose the one of potentially many generated by that job. Then you need to transform it (I had to use cp850 on our host as the code page) but the rest eludes me.

    The second is to generate a PDF file containing the characters read. This is a pure Java thing - I believe it was iText I used and it was pretty straight forward.