The purpose of this feature is, that InterForm400® can look for a special string in a spool file and change the form type of the spool file depending on wether the string was found or not. This can be done without any programming.

To maintain SFI definitions use the APF3812/WRKSFID command. (See Sample SFI definition below). To use/run an SFI definition, enter a line in an Auto Forms Control definition using function 8 (Call Program), and specify program RUNSFI and library APF3812. (See Description of the RUNSFI program below).

Create SFI definition

SFI110D

SFI definition

DEMO______

 

Description

My_test__________________________________________

 

 

Search text

Total_errors____0________________________________

Page

*LAST_

*ANY, *FIRST, *LAST

Print line

1__ -_72

 

Position

2__ -_18

 

 

New form type

 

 

 

 

If text found

*SAME

Form type, *SAME

- If not found

ERROR

Form type, *SAME

 

 

 

When AFC invokes the RUNSFI program, it will look for a SFI definition having the same name as the form type of the spooled file. (I.e. if the form type of your spooled file is DEMO, the SFI definition named DEMO will be used).

The RUNSFI program then scans the spooled file for the search text string specified in the SFI definition (within the specified page-, line- and position-limits).

If the text string was found, the form type of the spooled file will be changed to the value specified in the 'New form type If text found' field. Likewise the form type will be changed to the value specified in the '- If not found' field if the text string wasn't found.

Finally the RUNSFI program will hold and release the spooled file - in order to let AFC process the spooled file with the new form type - unless the value for New form type is *SAME, then the spooled file will not be held and released.

Note:

If a SFI definition with the name of the spooled file's form type doesn't exist - no action will be performed. All comparisons in SFI are case sensitive - including the SFI definition / form type comparison.

The Zip Stream File(s) Command

The APF3812/ZIP command can be used for zipping (compressing) stream files in IFS or folders (QDLS).

412User’s Manual for InterForm400®

Page 412
Image 412
Intermate AS/400, i5, iSeries manual Zip Stream Files Command, SFI110D, Last ANY, *FIRST, *LAST, Same, Error