This section covers some of the issues, that you might see when you start to use the Spool2XML module.
1.InterFormNG2 does not react to a ready spooled file.
2.The monitor job stops with the error message: LIC0001 License code issue.
3.The output queue monitor job stops with MSGW (message waiting) after an upgrade.
4.The output queue monitor stops with MSGW: CPFA0A9 is: Object not found.
5.The new spooled file does not contain XML tags
6.The new spooled file is not converted into XML.
7.The converted XML file only contains the spooled file attributes but no content.
This covers the situation, where InterFormNG2 does not react to a spooled file. Here is the checklist:
1. Does the spooled file arrive in status *Ready?
The spooled file, that arrives on the output queue must be in status *RDY (Ready). That is a prerequisite for a data queue entry, which is the trigger for InterFormNG2. If the status is *HLD (Held), then you need to release the spooled file to generate an entry in the data queue, that is used.
2. Does a data queue exist in the same library with the same name as the output queue?
You can verify that with the command:
WRKOBJ OBJ(QUSRSYS/IFORMNG2) OBJTYPE(*DTAQ)
This verifies if there is a data queue named IFORMNG2 in the library, QUSRSYS.
If not, then you can edit the monitor in InterFormNG2, and do a dummy change to make InterFormNG2 create the data queue.
You can also create the data queue manually with this command:
CRTDTAQ DTAQ(QUSRSYS/IFORMNG2)
3. Is the data queue connected to the output queue with the same name and library?
You can verify if the output queue is connected to a data queue with the command:
WRKOUTQD QUSRSYS/IFORMNG2
Then you should see the connected data queue like below:
Work with Output Queue Description
Queue: IFORMNG2 Library: QUSRSYS
Status: Writer active . . . . . . . . . . . : N Writer name(s) if active . . . . . . : Output queue held . . . . . . . . . : N Maximum spooled file size: Number of pages . . . . . . . . . . : *NONE Starting time . . . . . . . . . . . : Ending time . . . . . . . . . . . . : Writers to autostart . . . . . . . . . : 1 Display any file . . . . . . . . . . . : *NO Job separators . . . . . . . . . . . . : 0 Operator controlled . . . . . . . . . : *YES Order of files on queue . . . . . . . : *FIFO Data queue . . . . . . . . . . . . . . : IFORMNG2 Library . . . . . . . . . . . . . . : QUSRSYS
|
If the data queue is not referenced, then you can change the output queue and add it with this command:
CHGOUTQ OUTQ(QUSRSYS/IFORMNG2) DTAQ(QUSRSYS/IFORMNG2)
If the output queue cannot be changed, then a writer job is probably locking the output queue. If that is the case, then you need to stop that writer as that is also a problem, as spooled file might be printed out before InterFormNG2 can process the spooled files.
4. Is the IFORMNG2 subsystem started and the monitor job running?
The Spool2XML output queue monitor only works, if the IFORMNG2 subsystem is running, so first you can verify that e.g. via the IFORMNG2/IFORMNG2 command and option:
12. Work with IFORMNG2 subsystem
Here you should see an active subsystem with one or multiple jobs inside like below:
Work with Active Jobs PMK250 15/03/24 08:43:14 CET CPU %: 43.9 Elapsed time: 00:00:07 Active jobs: 288
Type options, press Enter. 2=Change 3=Hold 4=End 5=Work with 6=Release 7=Display message 8=Work with spooled files 13=Disconnect ... Current Opt Subsystem/Job User Type CPU % Function Status IFORMNG2 QSYS SBS .4 DEQW IFORMNG2 IFORMNG2 BCH 1.1 PGM-NGQ500C DEQW NG2CLEAN IFORMNG2 BCH .4 DLY-60 DLYW NG2SERVER IFORMNG2 ASJ .6 PGM-STRSVRC RUN QJVACMDSRV IFORMNG2 BCI 13.2 * -JOBLOG EOJ TOOLSHED2 IFORMNG2 BCH .4 PGM-STRTOOLSS TIMW TOOLSHED2 IFORMNG2 BCI .4 PGM-jvmStartPa CNDW
Bottom Parameters or command ===>
|
In the job list above we can e.g. see the job, IFORMNG2 which is monitoring the output queue, that we here wants to work with. If the subsystem is not started, then you can start it with option
10. Start IFORMNG2 subsystem on the IFORMNG2/IFORMNG2 command. You should consider to ensure, that this subsystem is started with IPL of the machine. That can be setup on the start up program referred to by the system value, QSTRUPPGM (DSPSYSVAL QSTRUPPGM). You should align changes in this program with your system administrator.
If the output queue monitor for your output is not running, then you can consider the suggestions below:
You can manually start the job from the IFORMNG2/IFORMNG2 command if you select the option:
1. Work with monitored output queues and then use option 1=Start monitoring for the output queue, then you can start it up manually.
To ensure, that the output queue monitor starts up automatically with the subsystem, then you should verify these things:
Select option 92. NG2 installation and configuration from the IFORMNG2/IFORMNG2 menu and ensure that the value for this option is *ACTIVE:
IBM I Queue Monitor . . . . . . > *ACTIVE
You should also verify, that the automatic startup is enabled on the individual monitored output queue. That is setup on the IFORMNG2/IFORMNG2 command, then option 1. Work with monitored output queues and then 2=Change for the output queue in question. On the next screen you press <Page Down> to see this screen:
Change monitored output queue NGQ310D
Auto start job . . . . . . Y Y=Yes, N=No
Exit program . . . . . . . XML_INBOX Name, *NONE Library . . . . . . . . IFORMNG2
|
On the screen above you need to ensure, that the Auto start job option is set to "Y".
5. Does the job log of the output queue monitor indicate that the spooled file was found?
You should look into the job log of the output queue monitor and ensure, that the job log indicates an input spooled file at the time when the spooled file arrived (or was released).
You can do that in this way:
Find the monitor job either via the command: WRKACTJOB SBS(IFORMNG2) or via option 12 on the IFORMNG2/IFORMNG2 menu.
Now select option 5=Work with for the job and then option 10. Display job log, if active, on job queue, or pending and F10=Display detailed messages. You can jump to the bottom (to the newest entries), if you press F18 (<Shift>+F6) . Here you should see entries like this to indicate a new spooled file:
18000 - CALL PGM(IFORMNG2/NGQLOGS) /* The CALL command contains
parameters */
19000 - CALL PGM(IFORMNG2/NGQ500) /* The CALL command contains
parameters */
If you do not, then you should verify if other jobs are retrieving messages from the same data queue. It is very important, that only a single job is doing that. Examples of jobs, that might take data queue entries as well are: 1) A workflow in InterFormNG2, that is also monitoring this specific output queue. 2) An Auto Forms Control job in InterForm400, which is monitoring the same output queue.
This section covers the solution, if you see this error message:
LIC0001
Message . . . . : License code issue. (Use command IFORMNG2/IFORMNG2 -
option 91) - Subsystem IFORMNG2 must be active. (R=Retry C=Cancel)
While trying to process a spooled file in Spool2XML i.e. via a output queue monitor job, that has been setup via option:
1. Work with monitored output queues
on the menu:
IFORMNG2/IFORMNG2
Such a job runs in the subsystem IFORMNG2/IFORMNG2 like shown below:
The job above is monitoring the output queue, IFORMNG2/IFORMNG2.
The solution as indicated by the error message is to get a 'green screen' license code for InterFormNG2, which includes the functionality. You can see and edit the license code from the menu:
IFORMNG2/IFORMNG2:
- and here select option 91. License:
In the screen shot above you can see, that the license code only covers spooled file support and not XML (Spool2XML), so another license code is required here.
This license code might also be missing and in either case you will need to request this license code from your local InterFormNG2 supplier.
After entering a license code, that covers the functionality, that you are trying to run, then you can reply to the message above with R-Retry.
After an upgrade of InterFormNG2 on the IBM i platform you might see this error message on one or more jobs in the IFORMNG2 subsystem:
Additional Message Information
Message ID . . . . . . : CPA0702 Severity . . . . . . . : 99
Message type . . . . . : Inquiry
Date sent . . . . . . : 14/03/24 Time sent . . . . . . : 15:40:57
Message . . . . : CPF0001 received by procedure PFX580C. (C D I R)
Cause . . . . . : ILE Control language (CL) procedure PFX580C in module
PFX580C in program PFX580C in library IFORMNG2 detected an error at
statement number 0000002200. Message text for CPF0001 is: Error found on
CALL command. Use F10 (if available) or the Display Job Log (DSPJOBLOG)
command to see the messages in the job log for a more complete description
of what caused the error. If you still are unable to solve the problem,
please contact your technical support person.
If you select option 5=Work with next to the job and select option: 10. Display job log, if active, on job queue, or pending followed by F10=Display detailed messages, then you can see the details of the joblog.
If you here press the F18=Bottom key (<Shift>+F6) then you see the latest entries in the joblog. Now you might see this entry in the bottom of the joblog:
Program XML_INBOX in library IFORMNG2 not found.
The reason for this error message is, that InterForm stopped including the object, that match the demo source member, XML_INBOX in the source file, IFORMNG2/APISRC. The error message can also occur, if you have put your own programs (or other objects) into the IFORMNG2 library. Such objects will remain in the old library (named IFxxxx, where xxxx is the old version) after an upgrade.
If you can find the missing object in the old library, then you can simply (as a fast workaround) copy the objects from the old library (named IFxxxx, where xxxx is the old version) into the IFORMNG2 library.
The long term solution is to copy/move the objects to your own library and refer to this library for the objects instead. For the XML_INBOX and other demo sources in the source file, IFORMNG2/APISRC the recommendation is, that if you want to use an object based on such a demo source member, then you should first copy the source member to your own library and then compile the source member there into your own library.
An output queue monitor job might stop with this message:
Additional Message Information
Message ID . . . . . . : CPA0701 Severity . . . . . . . : 99 Message type . . . . . : Inquiry Date sent . . . . . . : 15/03/24 Time sent . . . . . . : 12:09:18
Message . . . . : CPFA0A9 received by XML_INBOX at 2300. (C D I R) Cause . . . . . : Control language (CL) program XML_INBOX in library IFORMNG2 detected an error at statement number 2300. Message text for CPFA0A9 is: Object not found. Object is /iformng2/temp/ToNG2/QUSRSYS/IFORMNG2/QPADEV0005_766710_7_1220428_151721. Recovery . . . : This inquiry message can be avoided by changing the program. Monitor for the error (MONMSG command) and perform error recovery within the program. To continue, choose a reply value. Possible choices for replying to message . . . . . . . . . . . . . . . : C -- Cancel the CL program. D -- Dump the CL program variables and cancel the CL program.
|
From the message we can see, that InterFormNG2 expected an internal work file, which is used for normal spooled file processing, but that is not generated when using Spool2XML.
So why does InterFormNG2 expect to find this file in the IFS?
The reason is, that an input spooled file was processed, which does contain XML tags and was based on a converted printer file, but no matching XML definition was found in the IFORMNG2/IFORMNG2 menu.
So here you might need to convert the printer file again with the IFORMNG2/CVTPRTFXML command or perhaps you can just copy an existing XML definition to match the printer file used by the printer file.
So the printer file used by the spooled file is found by looking at the attributes with option 8 and <Page Down> to see the device file:
Work with Spooled File Attributes
Job . . . . . . . . : QPADEV0005 File . . . . . . . . : NG401PR
User . . . . . . . : KSE Number . . . . . . : 000002
Number . . . . . . : 766656 Creation date . . . : 27/04/22
Job system name . . : PMK250 Creation time . . . : 12:22:46
Save file after written . . . . . . . : *NO
Device type . . . . . . . . . . . . . : PRINTER
Printer device type . . . . . . . . . : *SCS
Device file . . . . . . . . . . . . . : NG401PR
Library . . . . . . . . . . . . . . : KSE_HIGH
So the printer file is here NG401PR in the library KSE_HIGH.
So here we need to ensure, that there is a match for both the printer file name and the library in the list of XML definitions (found via option 2 on the IFORMNG2/IFORMNG2 menu):
Work with xml definitions
Position to . . . . . . Printer file
Type options, press Enter. 2=Change 3=Copy 4=Delete 5=Display 12=Record formats 14=Parent child relationship 15=Display keys 17=Export
Opt File Library Description NG401PR KSE_HIGH2 CVTPRTFXML NG401PRX KSE_HIGH CVTPRTFXML
|
So the XML definitions does not match in this case. The first has the right name, but is placed in the wrong library and the second has a different name and is placed in the wrong library.
If you are sure, that an XML definition actually match the used printer file, then you can copy it via option 3 to the right name and library.
For spool2XML an important prerequisite is, that the input spooled file actually contains XML tags a contents inside. You can verify that, if you display the contents of the spooled file, which should look like an XML file as below:
<RECH>
<LEVEL> </LEVEL>
<FILESET>INFOR_VT </FILESET>
<TEKST>
This section will help you to identify why these XML tags are missing.
The first prerequisite is, that you have run the command IFORMNG2/CVTPRTFXML and created a new XML printer file. The spooled file must be based on this, converted printer file.
Here is an example: (NG401PR is the name of the printer file and KSE and KSE_HIGH are the two libraries, that contains the original and converted printer files)
The original printer file is e.g. KSE/NG401PR, which will not create any XML tags. You can e.g. verify that with the command: DSPOBJD OBJ(KSE/NG401PR) OBJTYPE(*FILE) and look at the description, which should be the normal description unlike the description of the converted printer file below.
The converted printer file is e.g. KSE_HIGH/NG401PR (same name in a different library). If used this will create XML tags inside the spooled file. You can verify that this is a converted printer file with the command: DSPOBJD OBJ(KSE_HIGH/NG401PR) OBJTYPE(*FILE). The description is here (unless someone changed it): "IFNG2-XML" followed by the description of the original printer file. Another indication is also that the source member of this printer file is: PFXWRKPR in the source file QTEMP/PFXWRK.
Now you can verify the things below:
1. Is the spooled file based on the right printer file?
From e.g. the WRKOUTQ command you should use option 8=Attributes to look at the attributes of the spooled file. If you then press <Page Down> you can see on which printer file, that the spooled file is based as the Device file:
Work with Spooled File Attributes
Job . . . . . . . . : QPADEV0005 File . . . . . . . . : NG401PR User . . . . . . . : KSE Number . . . . . . : 000002 Number . . . . . . : 766656 Creation date . . . : 27/04/22 Job system name . . : PMK250 Creation time . . . : 12:22:46
Save file after written . . . . . . . : *NO Device type . . . . . . . . . . . . . : PRINTER Printer device type . . . . . . . . . : *SCS Device file . . . . . . . . . . . . . : NG401PR Library . . . . . . . . . . . . . . : KSE_HIGH
|
In this case the spooled file is based on the right, converted printer file (both the printer file and library match the converted printer file). If in this case the device file is: NG401PR in library KSE, then the spooled file is based on the wrong, original printer file.
2. Yes, the spooled file is based on the original printer file (which is wrong).
If the spooled file is based on the wrong printer file, then you need to verify the library list of the original job, that created the spooled file. Are you absolutely sure, that the converted printer file is placed in a library, which is placed higher in the library list, which should cause the printing program to select the right printer file? Perhaps the spooled file is generated by a job, which has a different job description/library list than you think? This is outside the InterFormNG2 support, but still there is another suggestion below to consider.
3. Yes the library list is correct, but still the converted printer file is used in the spooled file.
If this is the case, then you should consider if e.g. the printer file is not selected via the library list, but e.g. via an override in the job, that generates the spooled file.
This section concerns the situation where the spooled file, that arrives on the monitored output queue is processed by InterFormNG2 and no errors occur, but also no output XML file is generated, that can be processed in InterFormNG2. First ensure, that InterFormNG2 does react to the spooled file.
For this you need to verify the configuration of the monitor job for the output queue in Spool2XML and ensure that a user program is called, and that the user program copies the generated XML to the folder, that you expect.
You can verify which program, that is called if you select this from the IFORMNG2/IFORMNG2 menu:
1. Work with monitored output queues
Option 2=Change for the monitor job.
Press <Page Down> and verify that an exit program has been registered and that this program copies the XML file to the folder, that you expect:
Change monitored output queue NGQ310D
Auto start job . . . . . . Y Y=Yes, N=No
Exit program . . . . . . . XML_INBOX Name, *NONE Library . . . . . . . . IFORMNG2
|
The normal exit program moves the temporary XML file to the IFS folder: /IFormNG2/InterFormNG-shell/user/inbox.
This section address the situation, where an input XML spooled file is processed, but the resulting XML file in the IFS only contains the spooled file attributes. If that is the case, then you will see an output XML file in the IFS like the one below:
<?xml version="1.0" encoding="utf-8" ?><IFORMNG FRAGMENTED="false"><JOBINFORMATION>
<SYSTEM>PMK250</SYSTEM>
<QSRLNBR>785F48X</QSRLNBR>
<CREATED>2024-03-15-11.18.04.993000</CREATED>
<JOB>QPADEV0005</JOB>
<USER>KSE</USER>
<JOBNBR>766656</JOBNBR>
<SPLF>NG401PR</SPLF>
<SPLNBR>2</SPLNBR>
<OUTQ>IFORMNG2</OUTQ>
<OUTQLIB>QUSRSYS</OUTQLIB>
<FORMTYPE>IFNG-XML</FORMTYPE>
<PGM>NG401PGM</PGM>
<PGMLIB>KSE</PGMLIB>
<DEVFILE>NG401PR</DEVFILE>
<DEVLIB>KSE_HIGH</DEVLIB>
<DEFLIB>KSE_HIGH</DEFLIB>
<USRDTA>NG401PGM</USRDTA>
<COPIES>1</COPIES>
<TOOUTQ>IFORMNG2</TOOUTQ>
<TOOUTQLIB>QUSRSYS</TOOUTQLIB>
</JOBINFORMATION>
</IFORMNG>
A very likely reason can be, that the XML definition has selected a 'Tree builder' conversion, but no other setting has been done in the XML definition. You can verify that, if you select the IFORMNG2/IFORMNG2 menu and here select these options:
2. Work with XML definitions
2=Change for the XML definition used.
If you here see the selection: Create fragments . . . . . 3, then the tree structure setup is used for the conversion. With the tree structure only selected printer file formats are selected in the output XML. To include all formats (still with the 3=Treebuilder setting) you can e.g. look at the first spooled file line of the first page and note the name of that node like below:
File . . . . . : NG401PR
Control . . . . .
Find . . . . . .
*...+....1....+....2....+....3..
<RECH>
You can in the XML definition choose to select "0=Ignore fragment processing" or you can choose to define all other formats to be children of this node. You can do that if you select option 12=Record formats for the first format and then option 14=Children for this format. Here you can choose to mark all other nodes/formats as children with an X like below:
Work with child record formats
Printer file . . . . : NG401PR Library . . . . . . . : KSE_HIGH Record format . . . . : RECH
Type options, press Enter. X=Child 1=Single child blank=Not a child format
Child Seq Format Description X 2 REC0 X 3 REC1 X 4 REC3
|
Then the resulting XML file will contain all the nodes.