Sei sulla pagina 1di 49

Spool Converter Pro

User Guide

Spool Converter Pro


Spool Converter Professional
iSeries/AS400

User Guide
Version 3.1.x

http://www.spoolfactory.com

Index

- Introduction - Software Installation - Application Preferences - Command Mode


- Description - Calling to user programs - Available commands

- User Interface Mode (Spool Manager)


- Work with output queue - Work with groups of rules - Work with transformation rules - User preferences

- Examples - Images Catalogue - References

http://www.spoolfactory.com

Introduction

The distribution of information by electronic means has become something habitual and necessary. The evolution has gone from paper to electronic formats for distribution by means of electronic mail and publication on the Web. Being conscious of it, we analysed the viability of creating a tool that allowed the conversion of spool files to other formats: PDF, HTML, TXT, CSV, XML and Excel. PDF because it is a standard, HTML for Web publication, TXT is a single format, CSV for compatibility with Excel, XML because this format will have a great potential in the future, and Excel (Xml for Excel 2003) due to is a very demanded by the users. Although the market offers many PC-based solutions, the alternatives in native AS400 are really few. This motivated the development of a software component which utilized native AS400 commands to allow the conversion of spool files to different formats. Once this objective was attained, the opportunity was presented to offer something beyond the simple conversion of formats. In other words, if an AS400 document is not pleasant visually, or contains elements that make it seem old fashioned, a simple format conversion will not solve these deficiencies. For that reason, the tool was equipped with a simple system of rules that can change the appearance of a report by means of the use of colours, fonts, sizes, text transformation, text elimination, etc. This exposition caused the appearance of the tool called Spool Converter Pro. The system of rules used by Spool Converter Pro can be extended with new features. The next version of Spool Converted Pro will provide the facility to create overlays (similar to AFP utilities) in an easy, very easy, way with new graphic elements: lines, boxes, signatures, logos and color images. All this in native mode. (A Java program will be available to generate a special format of the images in a format that AS400 can understand in native mode). A practical example of the use of this tool is the case of a company that has changed its name and does not have access to program source code. By means of a text transformation rule we can easily change the old name to the new one. Another example is the requirement to modernize an existing customer invoicing document with an overlay of lines, boxes, company logo and signature of the Financial Director. This will be very easy with a single group of rules. Spool Converter Professional provides two user interfaces: a menu-driven interface, similar to IBMs WrkSplF, where spool files and conversion rules can be maintained, and a command-line interface for experienced users and programmers.

http://www.spoolfactory.com

Software Installation

Restoring Objects
Create library SPLFACTORY On the command line, type CRTLIB SPLFACTORY Create savf file SAVFSPLCVT in library SPLFACTORY On the command line, type CRTSAVF SPLFACTORY/SAVFSPLCVT Transfer the SAVFSPLCVT savf file from your PC to the iSeries library SPLFACTORY. See section at right for an explanation. Restore the objects from the savf file to the SPLFACTORY library. On the command line, type: RSTOBJ OBJ(*ALL) SAVLIB(SPLFACTORY) DEV(*SAVF) SAVF(SPLFACTORY/SAVFSPLCVT) RSTLIB(SPLFACTORY)

Upload savf to the iSeries using FTP


All the objects necessary to run Spool Converter Professional are contained in the iSeries savf named SAVFSPLCVT. Important: the savf file can be available with other name. Use your PCs FTP client to send the savf file to the iSeries file SPLFACTORY/SAVFSPLCVT. ftp yoursystemname (system will ask user & pwd) bin cd SPLFACTORY put SAVFSPLCVT quit

Upload images for using in PDF format


Java utility available at: http://www.spoolfactory.com/AS400GifConverter.zip

For how to use it, please, refer to user guide.

List of available commands


SPLFACTORY/SPLFACTORY SPLFACTORY/SPLFACPRE SPLFACTORY/SPLPDFPRO SPLFACTORY/SPLHTMPRO SPLFACTORY/SPLTXTPRO SPLFACTORY/SPLCSVPRO SPLFACTORY/SPLXMLPRO SPLFACTORY/SPLEXCPRO Spool Manager Application Preferences Spool Spool Spool Spool Spool Spool to to to to to to PDF HTML TXT CSV XML EXCEL

Useful tips
If you obtain the Acrobat Reader 110 error opening PDF files: With SPLFACPRE command fill with Y the field named There are problems with PDF If not solved, contact with SpoolFactory team. After spool conversion you can specify an user program to be called (for example, to send the file by ftp) For PDF format you have some useful and powerful features: Cover Sheet Bookmarks Windows Form Designer Countries with special alphabets (for Pdf): Contact with SpoolFactory team

Spool Conversion is for *SCS spooled files

http://www.spoolfactory.com

Application Preferences
Use the SPLFACPRE command to go to the screen of application preferences, where the following information is required: Key 1, Key2, Key3 and Key4 They are the keys to register the product The registry can be permanent or temporary The registry keys remove the advertising warning when the conversion rules are used The PDF, HTML and TXT generation can works in Shareware mode. In Shareware mode there is a limitation to process spooled files with a maximum of 100 pages, and an advertising warning appears in the reports Language There are two languages available: English and Spanish *NOMAX Option By default, with Y value. It indicates if is allowed to create files without limits of size and number of members There are problems with PDF Valid values: Y and N In some countries there are problems opening the generated PDF with Acrobat Reader. If it happens, you can test filling this field to Y and trying again the PDF generation If previous doesnt work, fill the field with N and try the next Execute SPLFACPRE command Press F10 to access to special characters screen Press F10 to generate a spooled file for testing With this spooled file, convert it to TXT (using Spool Converter software) and transfer it to PC Open the file with a text editor, and find the lines where are located the next two characters [ (Open Bracket). We need the 3 digits number at left of the line (In advance, first number) ] (Close Bracket). We need the 3 digits number at left of the line (In advance, second number) Execute again SPLFACPRE command, and F10 to access to special characters screen, and at left table you must store these numbers in the first fields, which corresponds with Open Bracket and Closed Bracket When done, generate a PDF again. The problem would must be solved CSV Separator Allows to specify the field separator for CSV files depending of our configuration Valid values: , and ; XML Encoding Value for XML files, for example, ISO-8859-1

http://www.spoolfactory.com

Application Preferentes (cont.)


Encoding (for XML) For example: UTF-8 (default), ISO-8859-1 (for latin characters), Base Font different of Courier - Experimental Only for PDF format PDF reports are generated with Courier font, but in some situations can be necessary to use a different font, for example OCR for optical characters recognition, or a font for supporting a special alphabet as Hebrew, Thai or Vietnamese As it is experimental, if you want to use this option, you must to contact with SpoolFactory Barcode Font Only for PDF format Consult with SpoolFactory about this possibility

SPLFACPRE Command

http://www.spoolfactory.com

Command Mode
This mode uses the commands to convert spool files to the following document formats: PDF, HTML, TXT, CSV, XML and Excel (Xml for Excel 2003). In order to use the Command Mode, the user should be familiar with basic spool operations concepts. Otherwise we recommend the use of the Spool Manager menu interface described in the next section. With these commands, you can include the conversion process in the CL programs that generate the reports, or you can create new CLs that automates the conversion process. The required data are similar to the used ones by the system command CPYSPLF (Copy Spool File), and that identify the spool file to convert. You can place the converted report in a traditional iSeries file, or in the IFS. If you want to place the converted report in a traditional iSeries file, you must fill the next fields: file name, library and member. If the file already exists, it must have a record length of 500. If the file does not exist, it will be created in run time. If you want to place the converted report in the IFS, you must fill the next fields: the file name without extension, and the path. For example: IFS File: IFS Path: (Also it is valid myfile /home/ /home

This will give like result (if PDF format is selected) /home/myfile.pdf If you specify an extension file, for example myfile.pdf the final result will be myfile.pdf.pdf An interesting option is the possibility of calling to a user program to make some actions with the generated file. This user program will receive 13 parameters: Name of AS400 file (10 characters) Library (10 characters) Member (10 characters) Name of IFS file (30 characters) Path of IFS file (30 characters) Path & Name of IFS file (100 characters) Format (10 characters) Possible values: PDF, HTM, TXT, CSV, XML, EXC Spool File (10 characters) Spool Job Name (10 characters) Spool User (10 characters) Spool Job Number (6 characters) Spool Number (6 characters) User data (200 characters) A possible utility for this system of control would consist, for example, in sending the resulting file to a FTP server. There is a parameter, Character of end of line. This parameter will be used in the future. It only allows the *CRLF value.

http://www.spoolfactory.com

With the parameters seen so far, the generated file will be a simple format conversion. But the real power of the tool resides in transforming the colour, type style, font and wording of the report by means of simple search and replace rules. These individual 'search and replace' rules are then grouped together into "Rule Groups" that are applied to the spool file during the conversion process. The creation of rules and groups is explained in the section titled "Menu Mode (Spool Manager)". The commands allow the user to indicate the name of the rule group which should be applied to the spool file during transformation. It also allows the user to indicate the format of the transformed file: PDF, HTML, TXT, CSV or XML. Next is the list of available commands, depending on the format to generate: SPLFACTORY/SPLPDFPRO Spool to PDF (*See note) SPLFACTORY/SPLHTMPRO Spool to HTML SPLFACTORY/SPLTXTPRO Spool to TXT SPLFACTORY/SPLCSVPRO Spool to CSV SPLFACTORY/SPLXMLPRO Spool to XML SPLFACTORY/SPLEXCPRO Spool to Excel (Xml for Excel 2003)

Example of SPLPDFPRO Command

http://www.spoolfactory.com

User Interface Mode (Spool Manager)


This mode uses the Spool Manager menu to allow the user to browse output queues, define transformation rules and convert spool files to the following document formats: PDF, HTML, TXT, CSV and XML. SPLFACTORY command in SPLFACTORY library allows you to go to Spool Manager. In the command line SPLFACTORY/SPLFACTORY The main menu has 3 options: Work with output queue Allows the user to browse the spool files of the selected output queue. The actions available are Display the Spool File (DSPSPLF) Generate the standard conversion (without transformation) Generate a professional conversion (applying transformation rules) Select a spool file for test Work with groups of rules Allows the user to maintain the list of transformation rules and rule groups. Once a rule group is selected, the list of rules will be displayed, with the possibility of creating new rules or of modifying the already existing ones. A spool file can be selected to make the tests. From the screen of rules modification/creation it is possible to view this spool file. User preferences Allows the user to maintain default values used by the SpoolFactory system. Each user can maintain a list of preferences separate from all other users. Not included the feature to fit the width of documents in PDF format. If the data of this screen are not completed, conversion formats will not be able to be generated from the Spool Manager when we work in design mode. Work with images catalog (Logos) Allows the user to add images to the catalog. At the end of the document is explained how to add an image to the catalog. Work with charts (Experimental Tool) Experimental tool to generate charts based on the content of spooled files. At top appears the license. By default, the software works in Shareware mode. If you want to try the software with all the functionalities, you can request temporal keys.

http://www.spoolfactory.com

Main Screen - Spool Manager (SPLFACTORY command)

http://www.spoolfactory.com

Work with Output Queues


First which it is asked for to us is the output queue and the library of the same one, where the spool files reside with which we want to work. If the field output queue we left it in blanks, will obtain all the spool files of the user (the equivalent one to WRKSPLF command). When pressing <Enter>, the list of spool files is obtained available.

On the upper portion of the screen appear the actions that we can perform with the spool files: Option 5: Display the Spool File Option P: Generate PDF format Option H: Generate HTML format Option T: Generate TXT format Option C: Generate CSV format Option X: Generate XML format Option E: Generate Excel format (Xml for Excel 2003) Option 1: To select spool file for tests

http://www.spoolfactory.com

Work with Output Queues (cont.)

Option 5 is equivalent to DSPSPLF system command (Display Spool File).

When one of the formats is selected, it appears a screen with the options to generate the report. After calling to the converter, a message is displayed with the result of the conversion.

http://www.spoolfactory.com

Work with Group of Rules


This option shows the current list of rule groups, giving the opportunity to create new rule groups or to modify the existing ones. Use the PF6 function key to create new rule groups. The actions available for existing rule groups are: Option 1: Work with transformation rules Option 2: Modify the name and description of a rule group

http://www.spoolfactory.com

Work with Transformation Rules


This option shows the rules of a group, giving the option to create new rules or modify the existing ones. In order to create a new rule the function key PF6 is used. To modify a rule Option 2 is used. To assist with the development of a rule group, Spool Converter Pro allows you to 'bookmark' a sample spool file for testing. The id of the selected spool file is kept in the user preferences. Use the PF10 key to select the spool file. Use the PF11 key to immediately apply the rule group to the spool file for testing. The tests are executed for the group of rules with which we are working, ignoring the group that the user has specified in the user preferences. When we create a new rule, we are required to fill the action to perform. At the moment, the actions available are: Accin Format text (colour and fonts) Delete line Change text Move Line Insert text Lowercase Header page Footer page Tag TITLE Tag RECORD Tag DATA Draw Line Draw Box Insert Image Draw Circle Background Colour Green Bar Report Justify/Align text Page Attributes Bookmarks Insert Function Cover Sheet Annotation Formatos a los que se aplica PDF, HTML, TXT PDF, HTML, TXT PDF, HTML, TXT PDF, HTML, TXT PDF PDF, HTML, TXT PDF, HTML, TXT PDF, HTML, TXT CSV, XML, Excel CSV, XML, Excel CSV, XML, Excel PDF PDF PDF PDF PDF PDF PDF PDF PDF PDF PDF

http://www.spoolfactory.com

Work with Transformation Rules (cont.)


Two optional fields are available: Active: valid values are Y(Yes) and N(No). This field allows us to temporarily deactivate a rule without actually removing it from the rule group. Order: if this field is blank, the rules are processed by entrance order. If we want our own classification we must use this field. The first rules that are processed are those that do not have a value in this field. If in the screen with the list of rules we have selected a spool file for testing, we can access to it with the function key PF10. It is useful because mostly of rules are based on string localization in determined positions of the report, and it is an easy way to access to the spool when we are creating/modifying the rules.

Example: List of rules of a group

Example: List of available rules

http://www.spoolfactory.com

Rule: Format Text


With this action we can change the appearance of a text string or a whole line. First, specify a text string that will positively identify the line to be processed. Next, specify the beginning and ending positions of the text string specified above. Next, indicate whether the reformatting will apply only to that string or to the entire line. Finally, specify the replacement font style, font size or special effect that will be applied to the string or line. For example, if we have a report with the title: (The first line identify the positions of reference in the record) 1xxx5xxxx10xxx15xxx20xxx25xxx30xxx35xxx40xxx45xxx50xxx55xxx60 LIST OF CUSTOMERS One of the ways to locate this line can be by means of the LISTED word that is between positions 14 and 30. The following fields of the screen identify what change of format we want to do when the line is located: Apply to L-Line or T-Text We can format the whole line or only a string Apply to characters in the positions from/until If we have indicated that we want to apply format only to a text string we must indicate the positions from/until of the line to which we want to apply the format Font to apply
Courier (Default) Helvetica Times Roman Courier Bold Helvetica Bold Times Bold Courier Bold Italic Helvetica Bold Italic Times Bold Italic Courier Italic Helvetica Italic Times Italic

Font size (Default is 12) Font color. At the moment, the available colors are: - Black (Default), Red, Green, Blue, White, Yelow, Silver, Gray, Maroon, Purple, Pink, Dark Green, Caqui, Navy, Turquesa, Azul Claro The possibility exists of applying special effect to the text Stroke Filled of color

http://www.spoolfactory.com

Rule: Delete Line


With this action we can eliminate the complete contents of a line by replacing it with blank space characters. The content of the rest of the report does not move upwards. Do this by specifying a text string that will positively identify the line to be processed.

Rule: Change Text


With this action we can change the value of text strings. First, specify the text string that is to be changed. Next, specify the beginning and ending positions of the text string specified above. Finally, specify the replacement text string.

http://www.spoolfactory.com

Rule: Move Line


With this action we can move the location of a text string on a line. First, specify the text string that is to be moved. Next, specify the beginning position of the text string specified above. Finally, specify the displacement value and direction of movement.

http://www.spoolfactory.com

Rule: Insert Text


With this action (only for PDF format) we can insert a text string at any point on the report, with the possibility of applying certain effects, like filled color, and inclination, in addition to size, font and color. This text will be inserted in all the pages of the report. In this case, the position of beginning of the text is indicated by (X,Y) coordinates within the report. These coordinates do not correspond with the classic concept of report of 80, 132 or 198 columns and 60 lines, but corresponds with the graphical format that characterizes to documents in format pdf. In our case, a document pdf has like valid values: X-Axis: between 1 and 1400 at the most in the case of information of 198 positions Y-Axis: between 1 and 700 Another consideration is that in the vertical coordinates, the page beginning corresponds to the numerical values more highest, and the end of page to lowest. Thus for example, if we wanted to put a text in the lower left part of the page we could indicate: Position x: 10 Position y: 10 If we would need to insert a text with a length greater than shown at screen, pressing PF4 at this field we will access to a screen with a wide field. In addition, this rule has other two features: the possibility to modify the default values of the distance between characters and between words. It could be interesting when we want that a text occupies a greater length that it would occupy in a normal situation.

http://www.spoolfactory.com

Rule: Lowercase
With this action (for PDF, HTM and TXT format) we can change the text of a string or an entire line from upper case to lower case. First, specify a text string that will positively identify the line to be processed. Next, specify the beginning and ending positions of the text string specified above. Finally, indicate whether the processing will apply only to that string or to the entire line. The initial capital letter of each word is always respected. For example, if we have the following line of text when applying the rule would be SOFTWARE COMPANY Software Company

Rule: Header Page


With this action (for PDF, HTM and TXT format) we can place a heading on the top of every page of the report, with the possibility of specifying the beginning position and applying size, font and color. This rule slightly modifies the size of the report not to interfere in the already existing text. Variable size header is possible by using the built-in function *INSERTLINES(nn) in the field Header Text, where nn is the number of lines to insert at header page. Must be specified two numeric digits.

http://www.spoolfactory.com

Rule: Footer Page


With this action (for PDF, HTM and TXT format) we can place a footing on the bottom of every page of the report, with the possibility of specifying the beginning position and applying size, font and color. This rule slightly modifies the size of the report not to interfere in the already existing text.

Rule: Tag <title>


With this action (for XML, CSV and Excel format) we identify the title of the report.

http://www.spoolfactory.com

Rule: Tag <record>


With this action (for XML, CSV and Excel format) we identify the line of detail where the data will be obtained.

Rule: Tag <data>


With this action (for XML and CSV format) we identify each one of the fields of the line of detail identified with Tag <record>. In the case of archives CSV and Excel, it identifies each one of the columns of data to generate.

http://www.spoolfactory.com

Rule: Draw Line


With this action (for PDF format) we can draw a line vertically, horizontally or diagonally on the page. First, specify the (X,Y) coordinates of the starting and ending positions of the line. See section above for the instructions on how to specify coordinates. Next, specify the colour of the line. Finally, indicate the width of the line.

http://www.spoolfactory.com

Rule: Draw Box


With this action (for PDF format) we can draw a box of any size on the page. First, specify the (X,Y) coordinates of the starting and ending positions of the box. See section above for the instructions on how to specify coordinates. Next, specify the colour of the line and the filling colour of the box. Finally, indicate the width of the border of the box.

http://www.spoolfactory.com

Rule: Insert Image


With this action (for PDF format) we can place a graphic image anywhere on the page. First, specify the name of the image file. The files must be available in the Spool Converter Pro "Images Catalogue". See section below for instructions on how to load images to the catalogue. Next, specify the (X,Y) coordinates of the starting position of the image. See section above for instructions on how to specify the coordinates. Finally, specify the width and height of the image in pixels. By default, original values of the image are selected. Signature Image Image with modified size

http://www.spoolfactory.com

Rule: Draw Circle


Draws a circle with the indicated coordinates of the center, and the radios length. Can be defined the wide of the line, the line color, and the filled color.

http://www.spoolfactory.com

Rule: Background Color (Green Bar Report)


Allows put background color to a whole line or to a part of it. This rule is based too in string localization, to define the lines of the report in which this rule will be applied.

An interesting application of this rule, is with field Apply every, and represents every how many lines we want to apply the rule. By default the value is 0, and it is applied to all the lines which have the localization condition. But if we fill other value, for example 1, it will be applied in an alternate way, in our example every 1 line. With this option, we can get the Green Bar Reports.

http://www.spoolfactory.com

Rule: Justify/Align Text


Allows to justify or to align text. Possible values to align are: Left, Right and Center. This rule is based in string localization, for defining the lines of the report in which this rule will be applied. Align text has three possible values: centre, left, right Justify text will do that the existing text, at positions which the rule is applied, will occupy the whole available length, with a separation of the characters of the text, doing that the text will be without blank spaces at the initial and final specified positions. It is important to specify that this rule will work fine only for default font and default size: Courier 12.

http://www.spoolfactory.com

Rule: Change Page Attributes


Allows change the horizontal and/or vertical page size. It is possible too to specify the separation between lines. As example, it could be useful in a contract form, if we dont desire blanks spaces in the borders ( to avoid the possibility to include annotations).

http://www.spoolfactory.com

Rule: Bookmarks
This rule allows to generate bookmarks. Bookmarks are very useful to navigate in large reports. It is possible to generate bookmarks in two possible ways. By page number: the only needed information is the text will appear before the page number Examples: Page, Page Number, etc By content of a variable located in the report The variable is located specifying line, column, and length When the value of this variable changes, then a bookmark entry is created For example, if we have a report of sales classified by countries, and the value of the country is in the header of each page, then we can create an index with the values of the countries. When the user click in a country, then will appear located the page of the selected country

In next example, has been applied an easy rule to create an index using bookmarks. The original report is the result of a Query obtained from a file with a list of objects. The report is classified by object type, performing a new page when changes the value. In this case, has been specified we can to create the bookmarks with the value contained at the line (row) and column where this data is located, specifying too the length of the data. In the case of the first page, which contains the title of the report, no value exists in the specified positions. By this, a default value is used: TOP.

http://www.spoolfactory.com

Rule: Insert Function


This rule is similar to the Insert Text rule, but instead of inserting a text, we insert the value of a function. By now, there are available three functions for date with different formats: DATE01: DD/MM/AA DATE02: MM/DD/AA DATE03: DDth Month, AAAA

http://www.spoolfactory.com

Rule: Cover Sheet


This rule allows to include a cover page for a report. We have to specify a group of rules that contains the design for the cover sheet.

Cover sheet example

For more information about this rule: http://www.spoolfactory.com/SpoolConverterPro_CoverSheet.pdf

http://www.spoolfactory.com

Rule: Annotation
With this rule we can insert an annotation, a little box containing a text. We can decide if the annotation can appear in all the pages (by default), in the first or in the last page. When we click in the annotation, the text of the annotation appears in the document.

For more information check this document containing examples: http://www.spoolfactory.com/SpoolConverterPro_Annotations.pdf

http://www.spoolfactory.com

Example with graphic elements


Next example has been done from the output of DSPOBJD system command.

http://www.spoolfactory.com

User Preferences
The "User Preferences" screen will record common default values for many Spool Converter Pro operations. In the file names a fixed name can be given that will be applied to all the generated information, reason why they will be overwritten, or to give the option * NAME that will give to the report the name of the file of Spool. For example, with option * NAME, the file of Spool QSYSPRT it would be possible to be identified in the integrated system of archives IFS like /home/QSYSPRT.PDF The End of Line Characters parameter is reserved for future uses. At the moment, the only valid value is *CRTLF. The program can be identified to call after generating the report. This program will receive five parameters, the name of the file, the library and the member of generated AS400 file, name of the IFS file and path of the IFS file. We can specify the group of rules to apply by default. The date format is used at the time of showing the list of spool files in which it appears the date of creation. The field Format for Testing is for specifying the format to generate when we generate a conversion in design mode. And with the PF10 function key, we can select the spool file for working in design mode.

http://www.spoolfactory.com

Considerations when generating the rules Changes of text format and content
When a spool file is converted, the execution of one rule can affect the way in which the next rule operates. For example, if we have the line LIST OF OPERATIONS We locate the LIST word and we apply the lowercase rule. We will obtain List Of Operations If we want to apply a new rule with this line again, and we use the same word to locate the line, we cannot try to locate the LIST word since it will not find it. It will be necessary to locate the List word. For that reason it is important to consider the order in which the rules will be executed, remembering that if we do not an order to the rules, they will be executed according to the internal numeration assigned when creating them. If some rules in a rule group are ordered and others are blank, the rules with no order will be executed first. Also, if in the previous case we changed the LIST string by the string ABCD, the next rules that affect this line will have to make the location with the chain ABCD or with another different chain in other positions that allow us to identify the line. A similar case happens if we located LIST in the positions from the 11 to the 14, and we applied a displacement (move line rule) of 2 positions to the left from position 11. The following search of the LIST text it would have to be of positions 9 to the 12.

An aspect important to consider, is that when changes of formats are applied to a part of the text of the line, and not to the complete line, internally the application uses a complex system of text segmentation that later does not allow to apply changes to the complete line. For example, if we display the spool file Display Spooled File File . . . . . : QPRINT Control . . . . . Find . . . . . . *...+....1....+....2....+....3....+....4....+....5 FIRST LINE OF TEXT We applied one rule (change format) that locating the line where it is the word FIRST puts to positions 7 to the 11 (word FIRST) the format of red color. If later we do the same location, indicating that we want to apply to all the line the green color, the combined result of the two rules, executing itself in the order that we have commented, will be the following one FIRST LINE OF TEXT

http://www.spoolfactory.com

Considerations when generating the rules (cont.) Fonts and Size


It is necessary to consider that the application of fonts can affect the clarity of the report. In the lines of detail it is not advisable to use proportional fonts. Instead, use a fixed font (example: Courier) that does not affect the alignment of columns on the report. We must keep in mind that the applying of size fonts can affect to the appearance of the report. At detail lines is not recommended to use proportional fonts. Instead this, we must to use a fixed font (Courier) which doesnt affect to the appearance of the report, due to with a fixed font all the characters use the same width, including blank space. In the next example, there are two details lines (first line is for description of fields) in Courier (the default font) Name George Peter Surname Robinson Grant Identification 8871234-J 8888912-L

If we use Times font, the result would be Name Surname George Robinson 8871234-J Peter Grant 8888912-L Identification

If in a point of the report we do a change of format applying a size of very great letter, the rest of the report based on the applied change will not be fit, reason why we can invade the text placed in the superior part. The big fonts can be applied to texts well that have blanks spaces in the superior lines.

Message File
At the moment, in the generation of the message two possible codes of the file of messages SPLFACMSGF are returned, with a descriptive text of the result of the operation. The codes are: SPL0000 SPL0001 When operation has finished correctly When any error happens during the process

In the future, a different code will be generated for each different possible result, in order to automate the error management.

http://www.spoolfactory.com

Examples
If we have a spool in which the lines of head are of the style: (The first line identifies the reference positions in the record) 1xxx5xxxx10xxx15xxx20xxx25xxx30xxx35xxx40xxx45xxx50xxx55xxx60 NAME CUSTOMER NUMBER ADDRESS AMOUNT

We can indicate that when in position 6 until position 9 find the text NAME, changes the color of all the line blue NAME CUSTOMER NUMBER ADDRESS AMOUNT

Also we can cause that the font is Courier Bold Italic NAME CUSTOMER NUMBER ADDRESS AMOUNT

In positions 24 to 40 we will cause that it appears City NAME CUSTOMER NUMBER City AMOUNT

Finally we can apply to this line the lowercase rule Name Customer Number City Amount

Also if we have a title like the following one LIST OF CUSTOMERS ================= We can leave it of the following way

List of Customers
Applying a change text rule, a format rule and a delete line rule (the line with = characters)

http://www.spoolfactory.com

The part of lines of detail of a report must have some differentiating element that identifies them. In the next example it could be the comma decimal of Amount in position 56. 1xxx5xxxx10xxx15xxx20xxx25xxx30xxx35xxx40xxx45xxx50xxx55xxx60 NAME CUSTOMER John Smith NUMBER 22341234 ADDRESS London AMOUNT 1,000.21

Once identified the type line of detail, we could apply new rules, being for example: Name Customer John Smith Number 22341234 City London Amount 1,000.21

All the information do not count on elements identifiers in the lines of detail, reason why next more complex generic rules will be implemented as it can be the identification of alphabetical or numerical strings in determined positions. By now, there are two experimental values, that you can specify to find a lines: *NUMERIC It finds numerical values in the specified positions It works to identify only numerical characters For example, from positions 1 to 5, we can find a *NUMERIC value 19283 valid *NUMERIC 1.123 NOT valid *NUMERIC *NUMEDIT It finds numerical edited values in the specified positions It works to identify only numerical edited characters For example, from positions 1 to 5, we can find a *NUMEDIT value 12345 valid *NUMEDIT 1,345 valid *NUMEDIT 1, .5 valid *NUMEDIT It finds values containing blank spaces in the specified positions The header and footer rules do not need to locate strings of text.

*BLANKS

http://www.spoolfactory.com

Next are two examples of a report generated by means of a Query procedure. The details see with more clearness, opening the archives pdf that are enclosed with Acrobat Reader. The first example of report pdf is generated with the standard version, and the second with the professional version.

Generation with the Standard version

http://www.spoolfactory.com

Next are two examples with the professional version. The second example, that is most complex, has 36 of transformation rules. Of those rules, 11 has been used to change thousand point and decimal comma of the American format to the Spanish.

http://www.spoolfactory.com

Here are two examples more of the print of the source code of a program, generated with the two versions. For the second example 6 rules of transformation have been used.

http://www.spoolfactory.com

Images Catalogue
Images are stored in a physical file of AS400. Previously it is necessary transform the image in an understandable format for AS400. With application is included a little Java utility to execute in PC, that allows, from a image in gif format, generate a text file that contains the information of the image, in order to upload it to AS400 (for example, with Ftp) to incorporate the image to the images catalogue. It is distributed the Zip file AS400GifConverter. It is necessary to decompress it in C: unit, in root directory, with the original folders specified in Zip file.

You must extract the files in C: with the original directories.

http://www.spoolfactory.com

When it is decompressed, we will obtain the AS400GifConverter directory which contains a sub-directory named gifconverter with the Java classes and an executable named gifconverter.bat. This bat file launch the visual application to convert the Gif format. Executing gifconverter.bat

We specify the Gif file to convert, and its name in AS400.

http://www.spoolfactory.com

Finally, we select Generate button to convert the image.

In the bottom windows, it is given the image resolution, the name of the generated file, and the size in chars of the generated text file. The generated file will named with the name of the image in AS400, follows of _RGB and with extension TXT. In our example LOGODEMO_RGB.TXT If image name in AS400 is not specified, by default will given NONAME, and the result file will be NONAME_RGB.TXT The bottom window remember us too the steps to do to incorporate the image to the AS400 images catalogue. Next, these steps will be described. When we have the file text with the information of the image, we must upload it to AS400 (for example with Ftp), and put it in the AS400 file SPFPIMGAUX in SPLFACTORY library. Next we will execute in AS400 the SPLFACIMG command in SPLFACTORY library. A list of available images will appear. With F6 key we will indicate that we want add a new image. The process will detect if there is an available image to load, giving the image name, and asking us confirmation to add to the catalogue. If image exists, the new image will replace to the existing image. At next pages are shown some screens.

http://www.spoolfactory.com

Screens of Images Catalogue

http://www.spoolfactory.com

Screens of Images Catalogue (cont.)

http://www.spoolfactory.com

An interesting feature is that we can modify in AS400 the image properties (Option 2=Change). We can modify the RGB components of the image, or dark or light the image. If we dont like the result, we can load again the original image in the catalog ue. The information of the image must be in file SPFPIMGAUX.

At next page are showed some examples obtained with this functionality. Original Image

Modified Images Luminosity

Modified Images RGB Values

http://www.spoolfactory.com

References

JVC Americas Corp. USA

Factory 2-U USA

Jan Dupont Blgica

Circular Processing, Inc. USA

Instec Software Solutions Inc. Canad

Mutua Catalana - Espaa

Conte of Florence - Italia

Industrias Gama, S.A. Espaa

Logstica Andreani Argentina

Caja de Jubilaciones y Pensiones Bancarias de Montevideo - Uruguay

http://www.spoolfactory.com