Spool2XML: How to handle printer file changes

Spool2XML: How to handle printer file changes

You need to handle changes of the related printer files, when you use Spool2XML.


Printer files are changed, if e.g. a new format has been added/removed or if new fields are added/removed. This can e.g. be caused by an upgrade of the ERP-solution, that you are using with Spool2XML.

 

If you do not handle this, the printer jobs will most likely stop with the error message, which is caused by a level check on the printer file:

 

 

                         Additional Message Information                        

                                                                               

 Message ID . . . . . . :   RNQ1216       Severity . . . . . . . :   99        

 Message type . . . . . :   Inquiry                                            

 Date sent  . . . . . . :   25/08/21      Time sent  . . . . . . :   09:41:30  

                                                                               

 Message . . . . :   Error message CPF4131 appeared during OPEN for file       

   NG402PR (C S D F).                                                          

 Cause . . . . . :   RPG procedure NG402PGM in program KSE/NG402PGM received   

   the message CPF4131 while performing an implicit OPEN operation on file     

   NG402PR. The actual file is NG402PR.                                        

 Recovery  . . . :   Check the job log for a complete description of message   

   CPF4131, and contact the person responsible for program maintenance. If the 

   file has a device type of SPECIAL, there may be no message in the job log.  

 Possible choices for replying to message . . . . . . . . . . . . . . . :      

   D -- Obtain RPG formatted printout of system storage.                       

   S -- Obtain printout of system storage.                                     

   F -- Obtain full formatted printout of system storage.                      

                                                                        More...

 Press Enter to continue.                                                      

                                                                               

 F3=Exit   F6=Print   F9=Display message details                               

 F10=Display messages in job log   F12=Cancel   F21=Select assistance level    

 

 

A bit higher in the joblog you will probably see this error message:

 

 

                         Additional Message Information                         

                                                                               

 Message ID . . . . . . :   CPF4131       Severity . . . . . . . :   40          

 Message type . . . . . :   Escape                                               

 Date sent  . . . . . . :   25/08/21      Time sent  . . . . . . :   09:41:30   

                                                                               

 Message . . . . :   Level check on file NG402PR in library KSE with member *N. 

 Cause . . . . . :   The file requested to be opened is file NG402PR.  The file 

   actually opened is file NG402PR in library KSE.  For the file actually       

   opened, the record format level identifiers supplied by the program does not 

   match the file actually opened.                                              

 Recovery  . . . :   Do one of the following, then try the request again:       

     -- Compile the program again.                                              

     -- Specify the *NO value for the LVLCHK parameter as an override using the 

   appropriate OVRDBF, OVRDSPF, OVRICFF, or OVRPRTF command.                    

                                                                               

                                                                               

                                                                               

                                                                         Bottom 

 Press Enter to continue.                                                       

                                                                               

 F3=Exit   F6=Print   F9=Display message details   F12=Cancel                   

 F21=Select assistance level                                                    

                                                                           

 

The solution is to recreate the XML printer file, that is used by Spool2XML. The XML printer file is explained here.

 

The recommended procedure is described below:

 

1.First you should export the XML definition(s) for the printer file(s), that should be fixed. (You need to do that as the XML definitions are cleared (e.g. parent/child definitions) during the recreation of the printer file with the CVTPRTFXML command).

2.Stop printing for the related printer files as the next step will cause a problem for the print jobs: The print jobs will use the standard non-XML printer file while the XML printer files are deleted.

3.Now you should delete the related, converted printer files in the special override library, that previously has been created with the CVTPRTFXML command. You do that with the DLTF command e.g. DLTF FILE(KSE_HIGH/NG402PR). Do NOT delete the original, unconverted printer file.

4.Now recreate the printer files, that you have just deleted with the DLTF. You recreate the printer files with the command, CVTPRTFXML.

5.Now you can import the XML definitions, that you exported earlier.

6.Verify if the new printer files has changed so much, that you need to change the XML definitions. It can e.g. be a changed parent/child relationship or perhaps a changed fragment setting.

7.Now the changes are done and you can start printing as normally.


    • Related Articles

    • Save a printer file

      For support cases it can sometimes be required, that you include a saved printer file, that is used by the Spool2XML module. This would normally be the converted (XML) printer file, which will make the printing application generate 'XML like' spooled ...
    • Split spool (fixed key position)

      If you want InterFormNG2 to process spooled files, that contains multiple documents e.g. multiple invoices within a single spooled file (e.g. generated by a batch invoice run), then you may want to split up the spooled file into multiple output PDF ...
    • Split spool (dynamic key position)

      As the split spooled file (fixed key position) component above, this component can be used to split a spooled file based on a key value. However, in this case the key value can be in variable positions on the page. You just need to be able to find ...
    • Split XML

      This advanced converter workflow component can split up an XML in the payload of the current workflow. The subtree of this workflow component is executed for each splitted XML. A similar component, which is also able to transform the splitted files, ...
    • Spooled file split

      You might want to split up spooled files during InterFormNG2 processing. The reason might be, that the input spooled file may contain multiple documents (e.g. invoices), and that you want to create one PDF file (or email) for each invoice. There are ...