Submitted by Kim Egekjaer on Tue, 11/03/2009 - 00:00
Forums

Keeping the functionality described in "Conditioned overlays, part 4" (http://www.system-method.com/node/632) in mind, you can actually use this to build conditions that you might not think was possible...

If you want to insert a double condition like this: If a text in the spooled file is larger than something AND also smaller than another value THEN call a conditioned overlay. To illustrate this I have created a simple setup for the InterForm400 demo spooled file. You might remember that there in position 57-60 in line 13 is a 4 digit number, which is either of these values: 1001, 1003 and 1004. Just to illustrate a condition like above I imagine we would like to call a conditioned overlay if the found text is larger than 1001 AND also smaller than 1004. For this small interval it would not make sence to do it in this way, but this is just to illustrate the functionality.

The solution is to use a conditioned remap window in the main overlay, that repositions the text and removes the original text in the input spooled file so that the conditioned overlay only 'see' 4 blanks:

Design InterForm 400 overlay                                 APF300D 

 Overlay name: MAIN        Overlay text:                                       

 Seqnbr. Type  Overlay definition                                              

  0001    9    Remap window 13     pos 57-060  top 2.031  left 5.202 U         

  0002    ?    If lin 013-013 pos 057-060 > 1001                Then O1002_1003



 Seqnbr. Type                                                                  

    1.0   9    Remap window Input line       13 - 13   Position  57 -  60      

               Print:       From upper edge  2.031  Line spacing . .   40      

                            From left edge   5.202  Ignore blank lines   N (Y N)

                            Adjustment      U       (U L R C N B E +)          

                            Rotation        000                                

                            Font              11      F4=List                  

                            Blank original  B      B = blank original version  

                 Condition: Position         57 -  60                          

                            Is > = < N      > 1003                             

 F11=Delete                 Blank after            B = Blank condition after

 

So if the text found is larger than 1003, then it will be 'removed' and printed. This means that the conditioned overlay only will see 4 blanks here if the value is larger than 1003.

The conditioned overlay is called with this setup:

Seqnbr. Type                                                                  

   2.0   ?    If . . . . .  Input line    13 -  13                            

                            Position      57 -  60                            

                            Is > = < N   > 1001                               

              Then . . . .  Overlay      O1002_1003 Nos. of lines to remap 01 

                            Upper edge     .040  A/+/- -                      

                            Left edge            A/+/- A                      

                            Blank after          B = blank original text

So here the condition is that the found text must be larger than 1001. So combined the condition will be as requested (1001<x<1004).