[NEWSboard IBMi Forum]

Hybrid View

  1. #1
    Registriert seit
    Oct 2010
    Beiträge
    2

    Problems reading AFPDS spool with Java Toolbox

    Problems reading AFPDS spool with Java Toolbox


    Hi,

    I'm trying to read an AFPDS spool using SpooledFile.getPageInputStream() from Java Toolbox. When doing this, I get following Exception:
    com.ibm.as400.access.AS400Exception: CPF3CF2 Fehler beim Aufruf von API QWPZHPT1
    at com.ibm.as400.access.NPConversation.makeRequest(NP Conversation.java:163)
    at com.ibm.as400.access.PrintObjectPageInputStreamImp lRemote.createPrintObjectPageInputStream(PrintObje ctPageInputStreamImplRemote.java:121)
    at com.ibm.as400.access.PrintObjectPageInputStream.<i nit>(PrintObjectPageInputStream.java:82)
    at com.ibm.as400.access.SpooledFile.getPageInputStrea m(SpooledFile.java:754)
    at de.branchware.bgo.spoolview.SpoolAccessI5.getAFPSp oolAsGif(SpoolAccessI5.java:495)

    My calling code looks like this, the error occurs in the marked like (*):
    SpooledFile splf = new SpooledFile(...
    PrintParameterList printParms = new PrintParameterList();
    printParms.setParameter(PrintObject.ATTR_WORKSTATI ON_CUST_OBJECT, "/QSYS.LIB/QWPGIF.WSCST");
    printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST");
    PrintObjectPageInputStream in = splf.getPageInputStream(printParms); (*)

    Similarily, when reading a spool's PageInputStream, i also get an exception:
    java.io.IOException: java.io.IOException: com.ibm.as400.access.ErrorCompletingRequestExcepti on: An error occurred on the system.
    at com.ibm.as400.access.PrintObjectTransformedInputSt reamImplRemote.read(PrintObjectTransformedInputStr eamImplRemote.java:418)
    at com.ibm.as400.access.PrintObjectTransformedInputSt ream.read(PrintObjectTransformedInputStream.java:1 88)
    at java.io.BufferedInputStream.fill(BufferedInputStre am.java:218)
    at java.io.BufferedInputStream.read(BufferedInputStre am.java:235)
    at de.branchware.bgo.spoolview.SpoolAccessI5.getAFPSp oolAsTiff(SpoolAccessI5.java:542)

    The code looks like this:
    SpooledFile splf = new SpooledFile(...
    PrintParameterList printParms = new PrintParameterList();
    printParms.setParameter(PrintObject.ATTR_WORKSTATI ON_CUST_OBJECT, "/QSYS.LIB/QWPGIF.WSCST");
    printParms.setParameter(PrintObject.ATTR_MFGTYPE, "*WSCST");
    PrintObjectPageInputStreamin = splf.getPageInputStream(printParms);
    in.selectPage(page);
    byte[ ] buf = new byte[32767];
    int bytesRead = 0;
    do {
    bytesRead = in.read(buf); (*)
    if (bytesRead > 0) {
    outStream.write(buf);
    }
    } while ( bytesRead != -1 );

    The code has been running on many differents AS/400 systems without any problems. But on one of our customers' machines, we get the problems described above.
    The machine is V5R4 (which did not cause any troubles till now).
    The following PTFs are installed:
    5722JV1 SF99291 Java Group PTF (installed, LVL 24)
    5722SS1 SI21833 DB2 UDB for iSeries (installed)
    5722SS1 SI23754 Toolbox driver PTF (installed)
    5722JC1 SI23752 Toolbox driver PTF (installed)
    SF99347 (installed, LVL 40)

    Till now, I could not find any hints how to solve the problem.
    Could anybody give me a hint how to find the reason for my problem, or where to search for a solution or further hints?

    Thanks in advance,
    Manfred.

  2. #2
    Registriert seit
    Apr 2005
    Beiträge
    385
    Gello You must set the

    ATTR_AFP, "*YES"

    in the RpitnParamterList, because your read an AFP Spool.

  3. #3
    Registriert seit
    Oct 2010
    Beiträge
    2
    Hi ExAzubi,

    thanks for your answer. I tried this, but nothing changed.

    Meanwhile, another newsgroup pointed me to QNPSERVS' joblog, where I found missing objects like C0S0CR12, CZ6200, which seem to be font objects, which should be in library QFNTCPL. This lib isn't there on our customer's machine.
    I'll try to install the lib, and hope that this will solve the problem.

    Thanks,
    Manfred.

Similar Threads

  1. Security für Java Toolbox
    By arminius in forum NEWSboard Java
    Antworten: 3
    Letzter Beitrag: 10-03-06, 08:47
  2. SCS und AFPDS Spool zusammenführen
    By JonnyRico in forum IBM i Hauptforum
    Antworten: 10
    Letzter Beitrag: 12-09-05, 12:37
  3. Spool umwandeln und archiverien in PDF, TIFF, PCL, AFPDS
    By sidoc_Support in forum NEWSboard Server Software
    Antworten: 0
    Letzter Beitrag: 07-12-04, 10:29
  4. Mit java in ein bestimmten Spool schreiben.
    By LoCal in forum NEWSboard Programmierung
    Antworten: 12
    Letzter Beitrag: 15-07-04, 16:43
  5. Java-Methoden und RPG Hilfe!!!!!!!
    By Nasenbär in forum NEWSboard Programmierung
    Antworten: 3
    Letzter Beitrag: 22-05-03, 08:56

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • You may not post attachments
  • You may not edit your posts
  •