Please enable JavaScript to view this site.
This command must be run on the IBM i and can be used to print an XML File, that has been pre-configured via the Work with XML Cross References, to a spooled file. Requires Cobwebb Server version 6.2.82 or above (with a licence to the Cobwebb XML module) and IBM i OS V6R1M0 or above.
Note: If you wish to automate the printing of your XML files then this can be done via the Cobwebb Folder Monitor using the Folder Monitor program FMXML2SPL.
Make sure that you have the CPPD library in your library list. To do this, enter the following command: -
ADDLIBLE CPPD
If the library already exists in your library list, you will receive an error message, which you may ignore.
Next enter PRTXMLSPL and press F4=Prompt.
Running this command will create a spooled file called PRTXMLSPLF in the Output Queue QPRINT in library CPPD. For example:
•The first two lines detail the XML Cross Reference ID that has been used, the Document No if there is more than one document in your XML and the path to the XML file that has been printed.
•The area outlined in red contains the type of line being printed e.g. *H = Field Heading, *D = Field Data and *B = a blank line.
•The area outlined in blue shows the Label ID for the line.
•The areas outlined in yellow are example Field Headings being printed.
•From version 6.2.88. The area outlined in pink shows how you can wrap text to a given length which then writes the remaining text over the following lines.
•From version 6.2.88. If you wanted to print the area outlined in green at the top of every page (the first two lines are always included) then you would enter 'ADD1,ADD2,ITEM' in the HDRLAB parameter and 'N' in the INCLDT paramter.
Command Parameters
File ID Name (FILEID)
The File ID from the Work with XML Cross References to use as the print configuration for your chosen XML file.
File Path Name (FILENAME)
The full path to the XML file that you wish to print e.g. /test/XML/MyTest.xml
Print - Page Length (PAGLEN)
The page length for the generated spooled file. Valid entries are 1-255.
Default = 66
Print - Overflow Line (OVRFLW)
The overflow line for the generated spooled file. Valid entries are 1-255 but this entry must be less than or equal to the Page Length.
Default = 60
Comma sep Label IDs for header (HDRLAB)
From version 6.2.88. If you wish to print the data for a Label ID as a header on subsequent pages then you may specify a comma separated list of Label IDs (no spaces) in the same case as they are entered in the Work with XML Cross Reference Details. For obvious reasons these should be Labels IDs that appear first in our output. You may specify up to 10 different Label IDs. This can be useful if you wish to have the Address information appearing on every page. Note: Any Headers and Blank lines will also be included.
Include data for last hdr lab (INCLDT)
From version 6.2.88. If you have specified a list of Label IDs to include as a header then you have the option, by specifying 'N' here, to only include the field headers and not the data for the last Label ID in the list. This can be useful if you wish to include the heading for say your Invoice Lines on every page but you obviously wouldn't want to include the data.
(ERROR)
This is just used by the program when it is being called via the Folder Monitor and may be ignored.