Please enable JavaScript to view this site.

Manual InterForm400 English 2023

The enrich definitions of InterForm400 can e.g. be used, if you want to use a conditioned overlay, that is conditioned be a specific string, that may be found in the header of your spooled file page, while scanning detail lines for a condition.

 

The problem is however, that the conditioned overlays are limited to conditions, that compares data on only a single spooled file line.

 

The solution with the enrich definition is to copy the header data onto an interval of detail lines, so that this information is available in the lines, where you need it.

 

The alternatives

There are alternatives to changing the spooled file with an enrich definition. The alternatives are:

1.If you only want to insert a text and/or spooled file data, then you can consider to insert a concat element in a conditioned overlay. If you use a concat element inside a conditioned overlay, then it can refer to both a global spooled file line or a relative spooled file line (in the conditioned overlay). The downside with this is, that it is limited to fixed texts and spooled file data only.

2.You can also consider to use an overlay selector instead to call different overlays depending on the data found in the header. The downside with this is, that you will need to rebuild your overlays and use the function, suboverlay element to avoid having duplicates of the same overlays.

3.You can call a split definition with a user exit program, but a split definition can only add data in up to 10 different lines and it does require a tiny bit of CL programming.

4.You can call a user program in Auto Forms Control via 8=Call program and in this program call the Create pagebuilder program command. This function can alter the spooled file in almost any way, but it does require a bit of RPGLE programming.

 

This section covers:

 

1.Introduction to the enrich definition

2.How to create and edit an enrich definition.

3.How to use an enrich definition in Auto Forms Control.

 

 

Introduction to the enrich definition

The enrich definition works similar to the other finishing definitions: You define it as a finishing definition and then call it in Auto Forms Control, where a new PRSPRINT spooled file (with the selected changes) are generated.

 

 

Create and edit an enrich definition

In order to create or edit an enrich definition you need to work with the finishing definitions. You can do that via these menu selections from the InterForm400 Main menu:

 

5. Work with Auto Forms Control

4. Finish Definitions

 

Here you see a list of all the finishing definitions. The enrich finishing definitions are listed with Enrich in the Type column:

 

 

          Work with Finish Definitions                                 PRS300D 

                                                                               

 Start with . . . . .                                                          

                                                                               

 Type option, Press Enter.                                                     

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

                                                                               

 Opt  Name       Type       Description                                        

      EMAILEMBED Email      Email with images embedded                         

      EMAILEXIT1 Email      Email demo spooled file exit 07 pgm                

      EMAILEXIT9 Email      Email demo spooled file exit 09 pgm                

      EMAILGROUP Email      Email to Group                                     

      EMAILGROU2 Email      Email to Group                                     

      EMAILNEU   Email      email neu                                          

      ENRICH     Enrich     enrich spooled file                                

      GMT96D     PDF Naming Leistungserklärung                                 

      JOBLOG     PDF Naming sddf                                               

      KSE_ENRICH Enrich     Enrich demo spooled file                           

              

                                                                        More...

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

 

 

You can edit an existing Enrich definition with 2=Change.

 

You can also create a new Enrich definition with F6=Add:

 

 

          Create Finish Definition                                     PRS310D  

                                                                                

 Definition name  . . . . . . ENRICHDEMO                                        

 Description  . . . . . . . . Enrich demo spooled file                          

                                                                                

                                                                                

 Type of Finishing  . . . . . 10     01 = Prinserter                            

                                     02 = Stapling per Recipient                

                                     03 = Prepare for inserting                 

                                     04 = PFE Mail-Printer                      

                                     05 = Prepare for email                     

                                     06 = PDF Filenaming                        

                                     07 = Reformat Spooled File                 

                                     08 = XML definition (classic version)      

                                     09 = XML+ definition (XML module required) 

                                     10 = Enrich definition                     

                                                                                

                                                                                

                                                                                

                                                                                

                                                                                

                                                                                

 F3=Exit                                                     F12=Cancel         

                                                                               

 

As shown above you first need to type a name for the definition, a description and select the type: 10=Enrich definition. Press <Enter> to proceed to the next screen:

 

 

          Pick and Place definitions                                   ENR300D 

                                                                               

 Enrich definition name . :   ENRICHDEMO                                       

 Description  . . . . . . :   Enrich demo spooled file                         

                                                                               

 Type options, press Enter.                                                    

   1=Select                                                                    

                                                                               

 Opt    Definition                                                             

        Pick and Place definitions                                             

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

 F3=Exit   F12=Cancel                                                          

                                                                               

 

The screen above is prepared for future enhancement hence the short list. Select Pick and Place definitions with option 1=Select and then you will see this screen:

 

 

          Work with pick and place definitions                         ENR310D 

                                                                               

 Enrich definition name:   ENRICHDEMO                                          

 Description . . . . . :   Enrich demo spooled file                            

 Position to . . . . . .           Sequence number                             

                                                                               

 Type options, press Enter.                                                    

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

                                                                               

 Opt  SeqNbr  Description                                                      

                                                                               

 (No pick and place definitions to display)                                    

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

                                                                           End 

 F3=Exit   F6=Create   F12=Cancel     

 

 

Now you need to press F6=Create to add a new Pick and Place definition:

 

 

          Pick and place definition                                    ENR321D 

                                                                               

 Enrichment def. name . . :   ENRICHDEMO                                       

 Sequence . . . . . . . . .       1                                            

 Description  . . . . . . :   Copy the Customer number to all detail lines     

                                                                               

                                                                               

 Scan on Page                                                                  

   Scan from line . . . . . .  10   Scan to line . . . . .  14                 

   Scan from char . . . . . :  40   Scan nbr of chars  . .  10                 

   Scan for string  . . . . : Customer:                                        

   Pick from char . . . . . :  50   Pick nbr of chars  . . 10                  

                                                                               

                                                                               

 Put on Page                                                                   

   Put from line  . . . . . :  19   Put to line  . . . . .  45                 

   Put from char  . . . . . :  80                                              

                                                                               

                                                                               

                                                                               

                                                                               

                                                                               

 F3=Exit   F12=Cancel                                                          

 

 

The setup above tells InterForm400 to: Scan from line 10 to 14 in position interval 40 to 49 (10 characters wide) for the text 'Customer:'. If that text is found, then extract the text found in the same line from position 50 with the length of 10 (where the customer is found). The found text (The customer number) is to be copied to all the detail lines from line 19 to 45 and placed in position 80 and onwards.

 

In this way the header data can be copied to the relevant detail lines - if you activate the Enrich definition in Auto Forms Control.

 

 

 

Activate an Enrich definition in Auto Forms Control

After you have created an Enrich definition you can now activate it in Auto Forms Control. Here you need to edit the output queue for which you want to add the enrich function. You can do that from the InterForm400 Main Menu and then select these options:

 

5. Work with Auto Forms Control

1. Functions attached to Output Queues

 

Now you select the output queue, that you want to edit with 2=Change. Here you can now add a new sequence line with function type: C = Prepare for Finishing. Press Enter and state the condition for executing the Enrich definition:

 

 

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

   4.0  C          Form type  . . . . . . . . . . . . . . *STD                 

                   Save attribute . . . . . . . . . . . .             *NO *YES 

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

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

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

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

                   Program that opened file . . . . . . .                      

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

                   User-specified data  . . . . . . . . .                   

 

 

The Enrich definition will in this case be executed, if the spooled file has the form type *STD and the spooled file name is INVOICE. Remember to setup a condition, that does not match the new spooled file, that will be created by the Enrich function. You can e.g. use the spooled file name as condition as above. If you are not restrictive enough in the conditions above, then you might create a loop, so that new, enriched spooled files fits the conditions for the Enrich function and then you will end up with a very long output queue....

 

Press Enter to refer to the Enrich definition and state the properties of the new, enriched spooled file:

 

 

Seqnbr Function                                                            

  4.0  C          Prepare for Finishing                                    

                                                                           

                            Finish definition name . . . . .  ENRICHDEMO   

                            Output queue for prepared print   *INPUT       

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

                            Form type  . . . . . . . . . . .  Enriched     

                                                                         

 

With the setup above the new, enriched spooled file will be created on the same output queue as the original spooled file, and the new spooled file will get the form type 'Enriched'. You can now use this form type as a condition in another Auto Forms Control function (e.g. printing, email or PDF).