Please enable JavaScript to view this site.

Manual InterForm400 English 2023

The split definition is mainly used to split a spooled file into several separate spool files, which can be processed independently, but it can also:

 

1.Add additional data found via a user exit program.

2.Do an SQL select where statement to add additional information into the new spooled files.

3.Do a dynamic split and update spooled file attributes with contents from the spooled file.

 

If you want to split up the spooled file for emailing, then you should check the email finish definition, which includes the split functionality.

 

If you want to split up the spooled file into smaller PDF files, then the PDF file naming definition should normally be used as this also includes the split.

 

The split definition is limited to 10 strings, when you add data. The added data cannot overwrite existing spooled file text - it can only be inserted in blank positions. If either limitation is an issue, you should consider the page builder program option instead.

 

The split definition can be triggered via Auto Forms Control with function B=Split spooled file and with the command, APF3812/SPLITSPLF.

 

 

Make sure, that you are not creating a loop in Auto Forms Control when you insert a split definition. If you e.g. create new spooled files with a split definition and these new spooled files are placed back on the same outq, then the new spooled file should NOT be able to trigger the split definition again...

 

 

To work with the split definitions you select these options from the InterForm400 Main menu:

 

5. Work with Auto Forms Control

3. Split Definitions:

 

 

 

        Work with Split Definitions                                  AFC300D  

 

Start with . . . __________ __________                                  

 

Type option, Press Enter.                                                      

  2=Change   3=Copy   4=Delete   5=Display                                  

 

Opt    Split name    Description                                    

 

 

 

 

 

 

 

 

 

 

 

 

                                                                          End  

F3=Exit        F5=Refresh        F6=Add                         F12=Cancel    

 

 

 

Split Definition Entries

 

Press F6 to create a new split definition:

 

 

         Create Split Definition                                     SPL310D

 

Split definition name . : SHIPPING__

Description . . . . . . : Extract_invoices_only____________________________

Respect page range  . . : *YES    *NO, *YES

 

Seqnbr.  Split detail description

______

 

 

 

 

 

 

F3=Exit                 F5=Resequence                            F12=Cancel    

F13=Select spooled file F18=DSPSPLF

 

 

 

 

Respect page range

With this field you can decide if the page range (PAGERANGE) parameter of the input spooled file should be respected by the split definition. If set to *YES, then any page outside the PAGERANGE are ignored. This option is default *NO for backwards compatibility.

 

You can now enter the specific page selection criteria for your spooled file. You can press F13 and F18 to select and display the spooled file used to note the lines and positions used for the split - or you can consider to open the spooled file in the graphical designer and find the lines and positions here.

 

 

F13=Select spooled file

Press this function key to select a spooled file from this screen:

 

 

 

Select spooled file              SSF300D

           

  Job name . . . . . .                

    User . . . . . . .              

    Job number . . . .                

  File name  . . . . .                

  Spooled file no. . .      Number, *ONLY, *LAST

                                       

                                       

Name of output queue to search if splf file is unknown:

                                           

    Output queue . . .                            

      Library  . . . .                            

                                                       

                               

F3=Exit   F12=Cancel                                

 

 

You select the spooled by typing the output queue in which the spooled file is placed in the bottom of the window, and then select the spooled file with ‘1' - or by typing in the spooled file identification in the top of the screen.

 

F18=DSPSPLF

After selecting the spooled file you can now display it with F18:

 

 

                                                      Display Spooled File

File  . . . . . :   EDTPRT                                                  

Control . . . . .                                                          

Find  . . . . . .                                                          

*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+.

                                                                      1    

      Herring Marine Research                                              

      Seaweed Street 14                                                    

      9000 Battleaxe                                                      

      DK-Denmark                                                          

      ---------------------                                                

      Att: Wolly Weed                                                      

 

 

 

 

Editing the split definition

When entering a sequence line you will get the following screen:

 

 

 

                       Change Split Definition                    SPL310D

 

Split definition name . : SHIPPING_

Description . . . . . . : Extract invoices only

 

Seqnbr.  

 

 

 

 

 

 

Seqnbr    Split detail description

 1,0     First, last and Middle                              

          AND/OR Print line  Position   Oper  Compare value

                   1        1 -  5 EQ First__________________________

          OR    1        1 -  4 EQ Last___________________________

          OR    1        1 -  6 EQ Middle__________________________

           ____    ___       ___ - ___  ____  ________________________________

           ____    ___       ___ - ___  ____  ________________________________

           ____    ___       ___ - ___  ____  ________________________________

F3=Exit                                       F11=Delete          F12=Cancel        

 

 

 

Split detail description                

Description of the pages selected by this detail line.

 

AND/OR                

Relate this statement to the previous statement. Normal boolean logic applies.

 

Print Line

The print line in the spooled file to use for the compare.

 

Position                

The positions in the spooled file used for the comparision.

 

Oper                        

The operator relating to the compare value.

The operators used are standard operators known from e.g. Query/400:

 

EQ

Equal to compare value

NE

Not equal to compare value

LT

Less than compare value

LE

Less than or equal to compare value

GT

Greater than compare value

GE

Greater than or equal to compare value

 

 

Compare Value        

The character string or numeric value (without delimiters) which the operator should compare with.

 

If you want to call a sequence line for all pages in a spooled file you need to specify a condition above, that is true for all the pages. Such a dummy condition could be this:

 

 

Seqnbr.  Split detail description                                            

  1,0   all                                                                

        AND/OR  Print line  Position  Oper  Compare value                    

                 1      1 -  1 EQ                              

        OR        1      1 -  1 NE                              

                        -                                  

                        -                                  

                        -                                  

                        -                                   +

                                                                             

F3=Exit                        F11=Delete                   F12=Cancel        

F13=Select spooled file                                                      

 

 

The condition simply says: Either there is a blank in position 1 in line 1 or there is not.

(Which of course is always true ;-))

 

Please notice, that no delimiter is used for the compare value.

 

If you leave the condition for the page selection above blank, then no pages will be selected for the split.

 

Call program or SQL

For the next step you can call a user program or do SQL lookups to add additional data to the spooled file.

 

 

Split: Define the spool file attributes

 

 

          Change Split Definition                                     SPL310D

 

Split definition name  . : SHIPPING_

Description  . . . . . . : Extract invoices only

 

Split detail description : Split Invoice/Credit

 

Output queue . . . . . . . . . . . . __________  *INPUT, *NONE, Name

  Library  . . . . . . . . . . . . .   ___________

Page size

  Length, Lines per page . . . . . . ______      *INPUT, 1-255

  Length, positions per line . . . . ______      *INPUT, 1-378

Lines per inch . . . . . . . . . . . ______      *INPUT, 3, 4, 6, 7.5, 8, 9, 12

Lines per inch . . . . . . . . . . . ______      *INPUT, 3, 4, 6, 7.5, 8, 9, 12

Characters per inch  . . . . . . . . ______      *INPUT, 5, 10, 12, 13.3, 15...

Overflow line number . . . . . . . . ______      *INPUT, 1-255

Font ID  . . . . . . . . . . . . . . ______      *INPUT, *CPI, 3, 5, 11, 12...

Degree of page rotation  . . . . . . ______      *INPUT, *AUTO, *COR, 0, 90...

Form type . . . . . . . . . . . . .  ______      *INPUT, Character value, *STD

Spool file name  . . . . . . . . . . ______      *INPUT, *USER, *JOBNAME, Name

User data  . . . . . . . . . . . . . ______      *INPUT, *USER, *JOBNAME ...

Hold spooled file  . . . . . . . . . ______      *INPUT, *NO, *YES

Save spooled file  . . . . . . . . . ______      *INPUT, *NO, *YES

Expiration date  . . . . . . . . . . *INPUT      *INPUT, *NONE, 1 - 366

F3=Exit                                                     F12=Cancel

 

 

 

Output queue

The output queue where the resulting spool entry from the split should be sent to. The value *NONE means that the pages are not printed, but the user exit program is called. This allows for a user exit program to take data from pages which are not printed, and transfer them to the following pages.

 

The rest of the values are corresponding to the spool file attributes found in a printer file (PRTF).

 

Expiration date

Expired spooled files can be deleted using the OS400 command DLTEXPSPLF.

The following values ​​are possible:

*INPUT

The expiration date of the new split spooled file matches that of the spooled file you entered.

*NONE

The new spooled file has no expiration date.

Number

The number of days (from the date the Split-definition is called) before the spooled file expires.

 

Blank fields equals *INPUT, which means the attributes of the original spool entry will be copied to the resulting spool entry from the split. A user exit program can overwrite these values, if any of the fields are filled out, when returning from the exit program.

 

The original spool entry will after the split remain untouched with status *RDY and could be processed immediately by other AFC definitions, even another Split definition.

 

 

Example Using Split

 

The following makes use of the demo spool entry delivered with InterForm400. You can print this from the menu 12. Service Functions.

 

The distinction between Document and modules letters is the text “Document” or “modules.” which is located on each page in line 15 position 34 - 41:

 

 

                             DISPLAY SPOOL FILE

File  . . . . . :   QPRINT                            Page/Line  3/15

Function  . . . .   +1                                Columns    1 - 78

Search for  . . .                                                        

*...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+...

       Re. Your new InterForm400 Document Management System.                    

       -----------------------------------------------------                    

       Congratulations with your new InterForm400 software.                    

       InterForm400 will enable you to print Electronic Forms and perform      

       advanced data remapping and copy management of your existing SCS        

       print data. InterForm 400 exploits the advanced features of            

       standard HP-PCL printers and is the chosen document management          

       solution for over 2000 installations.                                  

       The following license code(s) will be needed to activate                

       InterForm400 permanently to your system(s):                            

       Product          Model   i-Group     Serial No.     License Code        

       ----------------------------------------------------------------        

       InterForm400     515       i050       4449079       F2 E7 20 AA        

       InterForm400     810       i100       44B2031       AA BB 01 23        

       InterForm400     890       i600       44D3971       1A BC DE 44        

       InterForm400     520       i100       44A1460       79 10 22 F1        

F3=Exit     F12=Cancel     F19=Left     F20=Right     F24=More keys    

 

 

 

We now enter item 3. Split definitions on the Auto Forms menu.

 

 

 

        Create Split Definition                                      SPL310D  

                                                                               

Split definition name  . . IFLETTER__                                            

Description  . . . . . . . Extract Document letters__________________________    

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

F3=Exit                                                     F12=Cancel        

 

 

 

Here we press F6 to add a Split definition, which we assign the name IFLETTER

 

 

         Change Split Definition                                     SPL310D

 

Split definition name . : IFLETTER

Description . . . . . . : Extract Document letters

 

Seqnbr.   Split detail description

 

 

 

 

 

 

 

Seqnbr    Split detail description  

  1,0     Split Document/modules_______                                

          AND/OR Print line  Position   Oper  Compare value

           ____    _15       _34 - _41  EQ__  Document_­­_______________________

           ____    ___       ___ - ___  ____  ________________________________

           ____    ___       ___ - ___  ____  ________________________________

           ____    ___       ___ - ___  ____  ________________________________

           ____    ___       ___ - ___  ____  ________________________________

           ____    ___       ___ - ___  ____  ________________________________

F3=Exit                     F4=Prompt      F11=Delete       F12=Cancel

 

 

We press 1 and Field Exit to create a new sequence line, and we fill in, that this split definition should run, if the text in line 15 from position 34 to 41 equals (EQ) Document (case sensitive).

 

When we press Enter a screen for specifying a user exit program is shown. The exit program can be used for collecting data from other applications or databases, for insertion in the document. We are not using this facility, so the value *NONE is kept.

 

         Change Split Definition                                      SPL310D  

                                                                               

Split definition name  . : IFLETTER                                          

Description  . . . . . . : Extract Document Letters                  

                                                                               

Split detail description : Split Document/modules

                                                                               

User exit program                                                              

  Program name . . . . . . *NONE_____    *NONE, name                          

    Library  . . . . . . .   __________  name                                  

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

F3=Exit                                                     F12=Cancel        

                                                                               

 

When we press Enter again, a screen is shown, where we can state the spool file attributes of the spooled file created by the split function. Note that the original spooled file used for making the split will remain untouched:

 

          Change Split Definition                                     SPL310D

 

Split definition name  . : IFLETTER_

Description  . . . . . . : Extract Document letters

 

Split detail description : Split Document/modules

 

Output queue . . . . . . . . . . . . AFC_INPUT1  *INPUT, *NONE, Name

  Library  . . . . . . . . . . . . .   APF3812____

Page size

  Length, Lines per page . . . . . . ______      *INPUT, 1-255

  Length, positions per line . . . . ______      *INPUT, 1-378

Lines per inch . . . . . . . . . . . ______      *INPUT, 3, 4, 6, 7.5, 8, 9, 12

Lines per inch . . . . . . . . . . . ______      *INPUT, 3, 4, 6, 7.5, 8, 9, 12

Characters per inch  . . . . . . . . ______      *INPUT, 5, 10, 12, 13.3, 15...

Overflow line number . . . . . . . . ______      *INPUT, 1-255

Font ID  . . . . . . . . . . . . . . ______      *INPUT, *CPI, 3, 5, 11, 12...

Degree of page rotation  . . . . . . ______      *INPUT, *AUTO, *COR, 0, 90...

Form type  . . . . . . . . . . . . . IFLET_____  *INPUT, Character value, *STD

Spool file name  . . . . . . . . . . __________  *INPUT, *USER, *JOBNAME, Name

User data  . . . . . . . . . . . . . __________  *INPUT, *USER, *JOBNAME ...

Hold spooled file  . . . . . . . . . *NO___      *INPUT, *NO, *YES

Save spooled file  . . . . . . . . . ______      *INPUT, *NO, *YES

F3=Exit                                                     F12=Cancel

 

 

 

We have defined that the spool entry containing the Document letters should be sent to queue AFC_INPUT1, which means back to our AFC input queue. We define *NO for hold spooled file which means the spool entry will here get status *RDY.

 

We are changing the form type to IFLET. This is done to enable the AFC functions to process the spool entry on basis of the form type. The original spool entry containing both Document and modules letters will still be available with the original form type DEMO.

 

We press Enter and F3 to exit this screen. We press F5 to verify the creation of the Split definition and press F3 to leave the Split menu.

 

In an AFC definition we can activate the split definition IFLETTER, by using function B:

 

 

         Update AFC-functions attached to output queues            AFC305D    

 

Output queue . . . . :   AFC_INPUT1                                            

  Library  . . . . . :     APF3812                                            

 

Seqnbr Funct Form type  Save                             New output queue      

 

       

 

 

       

 

 

Seqnbr Function                                                                

  1,0    B        Split spooled file                                          

                                                                               

                            Split definition name  .     IFLETTER__  

                                                                               

 

 

 

                                        F11=Delete          F12=Cancel

 

 

The Split definition will cause the demo spool entry to have pages extracted and another SCS spool entry with form type IFLET is created and placed after the original spool entry in the queue.

 

We can now merge the new spool entry with an overlay conditioned by the Formtype IFLET or by using an Overlay Selector:

 

         Update AFC-functions attached to output queues              AFC305D  

                                                                               

Output queue . . . . . . :   AFC_INPUT1    

  Library  . . . . . . . :     QUSRSYS                                        

                                                                               

Seqnbr Funct Form type  Save                             New output queue      

 0001    B     DEMO                        

               Split, definition: IFLETTER

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

Seqnbr Function   Attributtes of input file for which to execute the function  

  2,0   1  

                  Form type  . . . . . . . . . . . . . . IFLET                

                  Save attribute . . . . . . . . . . . .                      

                  Jobname  . . . . . . . . . . . . . . .                      

                  Spooled file name  . . . . . . . . . .                      

                  Device file  . . . . . . . . . . . . .                      

                    Library  . . . . . . . . . . . . . .                      

                  Program that opened file . . . . . . .                      

                    Library  . . . . . . . . . . . . . .                      

F3=Exit            F13=Fold/Unfold                         F12=Cancel        

                                                                               

 

 

 

Seqnbr Function

  1,0    1                  Merge with overlay                        

 

                            Output queue for merged print  . AFC_OUT1___      

                              Library  . . . . . . . . . . .   APF3812___    

                            InterForm 400 printer type . . . HP4________      

                            Unicode output . . . . . . . . . *INPUT   *INPUT,*YES

                            Find overlay in forms type table N     (Y N)                            

F3=Exit           F13=Fold/Unfold       F11=Delete          F12=Cancel