SpoolFactory - Spool Converter Pro
Spool Conversion Software for i5/iSeries/AS400
XML Format
Discover how to generate XML from Spool
The power of XML Format
The distribution of information by electronic means has become something habitual and necessary The evolution has gone from paper to electronic formats like e-mail and publication on the Web
Spool Converter Pro can help to export the content of the reports by mean of spool to XML conversion
Page 2
Spool Converter Pro for XML format
1 2
Software Description Software Architecture
3
4 5
Page 3
Available XML Formats
Sample Conversions References
Software Description
Spool Converter Pro converts *SCS spool files to XML format
- The same procedure is valid for Excel conversion (XML for Excel 2003)
All the conversion is performed in native mode
- No external servers required
Two available modes
- User mode Spool Manager - Command Mode for Software Integration
Advanced features (only for XML, not for Excel)
- Multi record processing - Nesting allowed
Page 4
Software Description
Fast software installation
Save file available for downloading Restore the objects and start to use the software
Easy learning
For non-technical users, Spool Manager is the interface to convert the spool files
The whole conversion process is entirely done in native mode OS400 or i5/OS
Images can be added to the image catalogue in the System i environment with a supplied and easy to use tool
Command mode Command mode allows to call the converter from CL programs After spool conversion, it is possible to call a user program to execute other for developers actions with the generated file
Page 5
Software Arquitecture
Integration with other vendor tools
3rd party tools
Command implementations based on features of Spool Converter Pro
Spool Excel, Spool Chart
The conversion suite developed natively for OS400
Spool Converter Pro
Page 6
Available XML Formats
For information exchange. Include advanced features for multi-record processing
Excel format is based on XML for Excel 2003
Page 7
Spool Converter Pro for XML format
Sample Conversions
Simple XML Conversion
Page 8
Simple XML Conversion
iSeries Spool Content
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 Invoice Number: Customer Name: 2009-109932 Peter Wilson Jackson
Date Item Reference Description Amount Price/Unit Total Price ============================================================================= 02/02/09 02/12/09 02/15/09 02/16/09 02/18/09 02/20/09 02/25/09 02/26/09 2112-12234-112 4232-14783-143 1212-33443-253 1442-25463-683 6512-13533-843 1532-14353-167 3712-14353-226 1382-25433-842 Software Software Software Software Software Software Software Software Nbr Nbr Nbr Nbr Nbr Nbr Nbr Nbr 1 2 3 4 5 6 7 8 2 1 3 1 3 1 1 1 1,000.00 500.00 600.00 800.00 500.00 2,500.00 3,000.00 300.00 Total 2,000.00 500.00 1,800.00 800.00 1,500.00 2,500.00 3,000.00 300.00 12,400.00
Payment Instructions: North Tree Mercant Bank - Account 555-AHT-1P25Q
Selected in color the lines (records) we are going to process
Page 9
Simple XML Conversion
Title of the Report (Optional) - Tag <title> rule
SpoolFactory.com Sppafacr09 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 83 XMLFORMAT 1
Action . . . . . . : Active . . . . . . :
Title
9 Tag <title> Y (Y/N) Order # :
. . . . . . : Sales Report
Only for Excel At Row . . . . . . : At Column . . . . : Empty rows after title . . . : Size of Font . . . . 12 Color of text (F4=Select) Black (Default) Bold . . : N (Y/N) Italic . : N (Y/N) Underline: N (Y/N) Alignment: C (C/L/R) Only for XML First XML level . . . . : (By default: document)
F3=Exit
F10=View SplF QPRINT 007689/SPLFACDEV/QPADEV000B (0006)
F23=Delete
Title identification is optional. If it is specified, then it will appear at the <document title> XML tag
Page 10
Simple XML Conversion
Identify the records to process - Tag <record> rule
SpoolFactory.com Sppafacr10 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 83 XMLFORMAT 2
Action . . . . . . : 10 Tag <record> Active . . . . . . : Y (Y/N) Order # :
Initial Position . : 63 Final Position: Text to Localize . : *NUMERIC Description . . . : Sales Detail Only for XML Multi Record Processing (Optional - Maximum five nesting level) 64
Record Name . . . : It belongs to record:
F3=Exit
F23=Delete
We identify the records to process, by selecting records containing numeric value for decimal part of Price/Unit field.
Other options: decimal point of Price/Unit field, slash of date, other numeric values, or *NUMEDIT function for numeric fields containing symbols and blanks spaces. Important: If we use the Total Price field to identify the record, then we will process the Total record. Note: The Description field will appear as record identification in the XML file, at this case <SalesDetail>
Page 11
Simple XML Conversion
Select the fields to retrieve (Date) - Tag <data> rule
SpoolFactory.com Sppafacr11 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 83 XMLFORMAT 3
Action . . . . . . : 11 Tag <data> Active . . . . . . : Y (Y/N) Order # :
Apply to Positions : Description 3 (From) Until : 10
Only for XML Multi Record Tag Record Associated
. . . : Date
Only for Excel Width of Column . : Empty columns previous to this field . : Width of empty columns . . . : Format of Header Field Size of Font . . . . 12 Color of text (F4=Select) Black (Default) Bold . : N Y/N Italic : N Y/N Underline: N Y/N Alignment: C C/L/R Force to Alphabetic Y/N Apply Right to Left (Hebrew/Arabic): Y/N F3=Exit F10=View SplF QPRINT 007689/SPLFACDEV/QPADEV000B (0006) F23=Delete
We define the positions from/until where the field is located in the record, at this case positions 3 to 10 for Date
Note: we have defined the name Date for the field, and it matchs with the header description in the record, but we can specify any name we want for this field. It is the name which appears in the XML file. If we define a name with several words, the converter will merge the words by eliminating the spaces.
Page 12
Simple XML Conversion
Select the fields to retrieve (Item Reference) - Tag <data> rule
SpoolFactory.com Sppafacr11 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 83 XMLFORMAT 4
Action . . . . . . : 11 Tag <data> Active . . . . . . : Y (Y/N) Order # :
Apply to Positions : Description 13 (From) Until : 26
Only for XML Multi Record Tag Record Associated
. . . : Reference
Only for Excel Width of Column . : Empty columns previous to this field . : Width of empty columns . . . : Format of Header Field Size of Font . . . . 12 Color of text (F4=Select) Black (Default) Bold . : N Y/N Italic : N Y/N Underline: N Y/N Alignment: C C/L/R Force to Alphabetic N Y/N Apply Right to Left (Hebrew/Arabic): N Y/N F3=Exit F10=View SplF QPRINT 007689/SPLFACDEV/QPADEV000B (0006) F23=Delete
Definition of Reference field to retrieve
Page 13
Simple XML Conversion
Select the fields to retrieve (Description) - Tag <data> rule
SpoolFactory.com Sppafacr11 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 83 XMLFORMAT 5
Action . . . . . . : 11 Tag <data> Active . . . . . . : Y (Y/N) Order # :
Apply to Positions : Description 29 (From) Until : 44
Only for XML Multi Record Tag Record Associated
. . . : Description
Only for Excel Width of Column . : Empty columns previous to this field . : Width of empty columns . . . : Format of Header Field Size of Font . . . . 12 Color of text (F4=Select) Black (Default) Bold . : N Y/N Italic : N Y/N Underline: N Y/N Alignment: C C/L/R Force to Alphabetic N Y/N Apply Right to Left (Hebrew/Arabic): N Y/N F3=Exit F10=View SplF QPRINT 007689/SPLFACDEV/QPADEV000B (0006) F23=Delete
Definition of Description field to retrieve
Page 14
Simple XML Conversion
Select the fields to retrieve (Amount) - Tag <data> rule
SpoolFactory.com Sppafacr11 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 83 XMLFORMAT 6
Action . . . . . . : 11 Tag <data> Active . . . . . . : Y (Y/N) Order # :
Apply to Positions : Description 46 (From) Until : 50
Only for XML Multi Record Tag Record Associated
. . . : Amount
Only for Excel Width of Column . : Empty columns previous to this field . : Width of empty columns . . . : Format of Header Field Size of Font . . . . 12 Color of text (F4=Select) Black (Default) Bold . : N Y/N Italic : N Y/N Underline: N Y/N Alignment: C C/L/R Force to Alphabetic N Y/N Apply Right to Left (Hebrew/Arabic): N Y/N F3=Exit F10=View SplF QPRINT 007689/SPLFACDEV/QPADEV000B (0006) F23=Delete
Definition of Amount field to retrieve
Page 15
Simple XML Conversion
Select the fields to retrieve (Unit Price) - Tag <data> rule
SpoolFactory.com Sppafacr11 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 83 XMLFORMAT 7
Action . . . . . . : 11 Tag <data> Active . . . . . . : Y (Y/N) Order # :
Apply to Positions : Description 54 (From) Until : 64
Only for XML Multi Record Tag Record Associated
. . . : Unit Price
Only for Excel Width of Column . : Empty columns previous to this field . : Width of empty columns . . . : Format of Header Field Size of Font . . . . 12 Color of text (F4=Select) Black (Default) Bold . : N Y/N Italic : N Y/N Underline: N Y/N Alignment: C C/L/R Force to Alphabetic N Y/N Apply Right to Left (Hebrew/Arabic): N Y/N F3=Exit F10=View SplF QPRINT 007689/SPLFACDEV/QPADEV000B (0006) F23=Delete
Definition of Unit Price field to retrieve
Page 16
Simple XML Conversion
Select the fields to retrieve (Total Price) - Tag <data> rule
SpoolFactory.com Sppafacr11 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 83 XMLFORMAT 8
Action . . . . . . : 11 Tag <data> Active . . . . . . : Y (Y/N) Order # :
Apply to Positions : Description 68 (From) Until : 79
Only for XML Multi Record Tag Record Associated
. . . : Total Price
Only for Excel Width of Column . : Empty columns previous to this field . : Width of empty columns . . . : Format of Header Field Size of Font . . . . 12 Color of text (F4=Select) Black (Default) Bold . : N Y/N Italic : N Y/N Underline: N Y/N Alignment: C C/L/R Force to Alphabetic N Y/N Apply Right to Left (Hebrew/Arabic): N Y/N F3=Exit F10=View SplF QPRINT 007689/SPLFACDEV/QPADEV000B (0006) F23=Delete
Definition of Total Price field to retrieve
Page 17
Simple XML Conversion
XLM Final Result
<?xml version="1.0" encoding="ISO-8859-1"?> <document title="Sales Report"> <SalesDetail> <Date>02/02/09</Date> <Reference>2112-12234-112</Reference> <Description>Software Nbr 1 </Description> <Amount> 2</Amount> <UnitPrice> 1,000.00</UnitPrice> <TotalPrice> 2,000.00</TotalPrice> </SalesDetail> <SalesDetail> <Date>02/12/09</Date> <Reference>4232-14783-143</Reference> <Description>Software Nbr 2 </Description> <Amount> 1</Amount> <UnitPrice> 500.00</UnitPrice> <TotalPrice> 500.00</TotalPrice> </SalesDetail> . . . . </document>
Result obtained when the converter applies the previously defined rules
Page 18
Simple XML Conversion
Final Result in Firefox
Final Result in Internet Explorer
Page 19
Spool Converter Pro for XML format
Sample Conversions
XML with Multi Record Processing
Page 20
Simple XML Conversion
iSeries Spool Content
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 Invoice Number: Customer Name: 2009-109932 Peter Wilson Jackson
Date Item Reference Description Amount Price/Unit Total Price ============================================================================= 02/02/09 02/12/09 02/15/09 02/16/09 02/18/09 02/20/09 02/25/09 02/26/09 2112-12234-112 4232-14783-143 1212-33443-253 1442-25463-683 6512-13533-843 1532-14353-167 3712-14353-226 1382-25433-842 Software Software Software Software Software Software Software Software Nbr Nbr Nbr Nbr Nbr Nbr Nbr Nbr 1 2 3 4 5 6 7 8 2 1 3 1 3 1 1 1 1,000.00 500.00 600.00 800.00 500.00 2,500.00 3,000.00 300.00 Total 2,000.00 500.00 1,800.00 800.00 1,500.00 2,500.00 3,000.00 300.00 12,400.00
Payment Instructions: North Tree Mercant Bank - Account 555-AHT-1P25Q
Multi record processing allows to retrieve additional information than the retrieved with the main pattern. In red color is marked the data to retrieve in addition to the information retrieved using the previous example.
Page 21
XML with Multi Record Processing
Identify the records to process
SpoolFactory.com Sppafacr10 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 83 XMLFORMAT 2
Action . . . . . . : 10 Tag <record> Active . . . . . . : Y (Y/N) Order # :
Initial Position . : 63 Final Position: Text to Localize . : *NUMERIC Description . . . : Sales Detail Only for XML Multi Record Processing (Optional - Maximum five nesting level) 64
Record Name . . . : SALESREC It belongs to record:
F3=Exit
F23=Delete
As we are going to have several records, we have to associate a name to each record. In our case, we give the name SALESREC to the previously created record.
Page 22
XML with Multi Record Processing
Select the fields to retrieve (Date)
SpoolFactory.com Sppafacr11 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 83 XMLFORMAT 3
Action . . . . . . : 11 Tag <data> Active . . . . . . : Y (Y/N) Order # :
Apply to Positions : Description 3 (From) Until : 10
Only for XML Multi Record Tag Record Associated SALESREC
. . . : Date
Only for Excel Width of Column . : Empty columns previous to this field . : Width of empty columns . . . : Format of Header Field Size of Font . . . . 12 Color of text (F4=Select) Black (Default) Bold . : N Y/N Italic : N Y/N Underline: N Y/N Alignment: C C/L/R Force to Alphabetic N Y/N Apply Right to Left (Hebrew/Arabic): N Y/N F3=Exit F10=View SplF QPRINT 007689/SPLFACDEV/QPADEV000B (0006) F23=Delete
And next step is to associate SALESREC record to all the previously created fields to retrieve. In this example, we perform this action to the field Date but we have to do the same for the rest of fields.
Page 23
XML with Multi Record Processing
New identificaton of records to process
SpoolFactory.com Sppafacr10 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 83 XMLFORMAT 9
Action . . . . . . : 10 Tag <record> Active . . . . . . : Y (Y/N) Order # :
Initial Position . : 3 Final Position: Text to Localize . : Customer Name Description . . . : Customer Only for XML Multi Record Processing (Optional - Maximum five nesting level) 15
Record Name . . . : CUSTOMREC It belongs to record:
F3=Exit
F23=Delete
Now we are going to define a new record for Customer and we give the name CUSTOMREC This is the part of the spool we want to process:
*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 Customer Name: Peter Wilson Jackson
Page 24
XML with Multi Record Processing
New field to retrieve
SpoolFactory.com Sppafacr11 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 83 XMLFORMAT 10
Action . . . . . . : 11 Tag <data> Active . . . . . . : Y (Y/N) Order # :
Apply to Positions : Description 20 (From) Until : 50
Only for XML Multi Record Tag Record Associated CUSTOMREC
. . . : Name
Only for Excel Width of Column . : Empty columns previous to this field . : Width of empty columns . . . : Format of Header Field Size of Font . . . . 12 Color of text (F4=Select) Black (Default) Bold . : N Y/N Italic : N Y/N Underline: N Y/N Alignment: C C/L/R Force to Alphabetic N Y/N Apply Right to Left (Hebrew/Arabic): N Y/N F3=Exit F10=View SplF QPRINT 007689/SPLFACDEV/QPADEV000B (0006) F23=Delete
And next step is to define the field (Name) to retrieve, associating this field to the new record CUSTOMREC
Page 25
XML with Multi Record Processing
XLM Final Result
<?xml version="1.0" encoding="ISO-8859-1"?> <document title="Sales Report"> <Customer> <Name>Peter Wilson Jackson </Name> </Customer> <SalesDetail> <Date>02/02/09</Date> <Reference>2112-12234-112</Reference> <Description>Software Nbr 1 </Description> <Amount> 2</Amount> <UnitPrice> 1,000.00</UnitPrice> <TotalPrice> 2,000.00</TotalPrice> </SalesDetail> <SalesDetail> <Date>02/12/09</Date> <Reference>4232-14783-143</Reference> <Description>Software Nbr 2 </Description> <Amount> 1</Amount> <UnitPrice> 500.00</UnitPrice> <TotalPrice> 500.00</TotalPrice> </SalesDetail> . . . . </document>
And this is the result obtained with the new rules
Page 26
Spool Converter Pro for XML format
Sample Conversions
XML with Nested Levels
Page 27
XML with Nested Levels
New identificaton of records to process
SpoolFactory.com Sppafacr10 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 85 XMLFORMAT3 11
Action . . . . . . : 10 Tag <record> Active . . . . . . : Y (Y/N) Order # :
Initial Position . : 63 Final Position: Text to Localize . : *NUMERIC Description . . . : Date
25 64
Record Name . . . : DATEREC Only for XML Multi Record Processing It belongs to record: SALESREC (Optional - Maximum five nesting level)
Is the content of DATEREC F3=Exit
in the same line that SALESREC
? Y F23=Delete
The obtained XML result could not solve our requirements at the case we need to organize the information in levels. When there are nested levels, for each lower level (record) we have to specify to which level (record) belongs. And we are requested to indicate if the data to retrieve are in the same line that the record to which belongs. At this case we are going to create the record Date to group the fields Day, Month and Year.
Page 28
XML with Nested Levels
New field to retrieve
SpoolFactory.com Sppafacr11 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 85 XMLFORMAT 12
Action . . . . . . : 11 Tag <data> Active . . . . . . : Y (Y/N) Order # :
Apply to Positions : Description 3 (From) Until : 4
Only for XML Multi Record Tag Record Associated DATEREC
. . . : Day
Only for Excel Width of Column . : Empty columns previous to this field . : Width of empty columns . . . : Format of Header Field Size of Font . . . . 12 Color of text (F4=Select) Black (Default) Bold . : N Y/N Italic : N Y/N Underline: N Y/N Alignment: C C/L/R Force to Alphabetic N Y/N Apply Right to Left (Hebrew/Arabic): N Y/N F3=Exit F10=View SplF QPRINT 007689/SPLFACDEV/QPADEV000B (0006) F23=Delete
This field is to define the field Day inside of DATEREC record.
Page 29
XML with Nested Levels
New field to retrieve
SpoolFactory.com Sppafacr11 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 85 XMLFORMAT 13
Action . . . . . . : 11 Tag <data> Active . . . . . . : Y (Y/N) Order # :
Apply to Positions : Description 6 (From) Until : 7
Only for XML Multi Record Tag Record Associated DATEREC
. . . : Month
Only for Excel Width of Column . : Empty columns previous to this field . : Width of empty columns . . . : Format of Header Field Size of Font . . . . 12 Color of text (F4=Select) Black (Default) Bold . : N Y/N Italic : N Y/N Underline: N Y/N Alignment: C C/L/R Force to Alphabetic N Y/N Apply Right to Left (Hebrew/Arabic): N Y/N F3=Exit F10=View SplF QPRINT 007689/SPLFACDEV/QPADEV000B (0006) F23=Delete
This field is to define the field Month inside of DATEREC record.
Page 30
XML with Nested Levels
New field to retrieve
SpoolFactory.com Sppafacr11 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 85 XMLFORMAT 14
Action . . . . . . : 11 Tag <data> Active . . . . . . : Y (Y/N) Order # :
Apply to Positions : Description 9 (From) Until : 10
Only for XML Multi Record Tag Record Associated DATEREC
. . . : Year
Only for Excel Width of Column . : Empty columns previous to this field . : Width of empty columns . . . : Format of Header Field Size of Font . . . . 12 Color of text (F4=Select) Black (Default) Bold . : N Y/N Italic : N Y/N Underline: N Y/N Alignment: C C/L/R Force to Alphabetic N Y/N Apply Right to Left (Hebrew/Arabic): N Y/N F3=Exit F10=View SplF QPRINT 007689/SPLFACDEV/QPADEV000B (0006) F23=Delete
This field is to define the field Year inside of DATEREC record.
Page 31
XML with Nested Levels
New identificaton of records to process
SpoolFactory.com Sppafacr10 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 85 XMLFORMAT 11
Action . . . . . . : 10 Tag <record> Active . . . . . . : Y (Y/N) Order # :
Initial Position . : 63 Final Position: Text to Localize . : *NUMERIC Description . . . : Rest Of Data 64
Record Name . . . : RESTREC Only for XML Multi Record Processing It belongs to record: SALESREC (Optional - Maximum five nesting level)
Is the content of DATEREC F3=Exit
in the same line that SALESREC
? Y F23=Delete
We create the new record RESTREC, belonging to SALESREC, to group the rest of the fields.
Page 32
XML with Nested Levels
Rest of fields to retrive Assign to the new record type
SpoolFactory.com Sppafacr11 Rules Group . . . : Rules Number . . . : Spool Manager Rules Groups Maintenance 85 XMLFORMAT 4
Action . . . . . . : 11 Tag <data> Active . . . . . . : Y (Y/N) Order # :
Apply to Positions : Description 13 (From) Until : 26
Only for XML Multi Record Tag Record Associated RESTREC
. . . : Reference
Only for Excel Width of Column . : Empty columns previous to this field . : Width of empty columns . . . : Format of Header Field Size of Font . . . . 12 Color of text (F4=Select) Black (Default) Bold . : N Y/N Italic : N Y/N Underline: N Y/N Alignment: C C/L/R Force to Alphabetic N Y/N Apply Right to Left (Hebrew/Arabic): N Y/N F3=Exit F10=View SplF QPRINT 007689/SPLFACDEV/QPADEV000B (0006) F23=Delete
Now we associate the rest of the fields to the new record RESTREC. In this screen as example we associate the field Reference, and we have to do the same with the rest of fields.
Page 33
XML with Nested Levels
XLM Final Result
<?xml version="1.0" encoding="ISO-8859-1"?> <document title="Sales Report"> <Customer> <Name>Peter Wilson Jackson </Name> </Customer> <SalesDetail> <Date> <Day>02</Day> <Month>02</Month> <Year>09</Year> </Date> <RestOfData> <Reference>2112-12234-112</Reference> <Description>Software Nbr 1 </Description> <Amount> 2</Amount> <UnitPrice> 1,000.00</UnitPrice> <TotalPrice> 2,000.00</TotalPrice> </RestOfData> </SalesDetail> . . . . </document>
And this is the XML result organized with nested levels
Page 34
References
Company
JVC USA Acum Instec Software Solutions Inc. Grupo Andreani Kuhn Holding Factory 2-U Conte of Florence Golden West Globalsoft Jan Dupont
Country
United States Israel Canada Argentina The Netherlands United States Italy United Kingdom Turkey Belgium
Page 35
www.spoolfactory.com
Page 36