Please enable JavaScript to view this site.

InterFormNG2 Manual

Navigation: Modules in InterFormNG2 > Spool2XML > Spool2XML setup and settings on IBM i

Spool2XML: How to handle printer file changes

Scroll Prev Top Next More

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.