The APF3812/AFPTOASCII command converts AFPDS spool files to ASCII spool files.
This command operates in the same manner as function 3 = Transform AFPDS to *USERACII in Auto Forms Control.
Note, if you want to make use of this function, and the AFPDS spool files are using resource libraries not listed in the system library list, then the job description, APF3812/AUTO_FORM must be changed in order to include these libraries in the library list.
WARNING: As the only command in InterForm400, the AFPTOASCII command does NOT support selection between identical spooled files. (Where the job ID, spooled file name and spooled file number are all identical for more than one spooled file).
TIP: If you alternatively use the AFPDS spooled files directly in InterForm400 only the text visible via DSPSPLF will be used, but all functions in InterForm400 are supported.
The command APF3812/APF3812 is intended to be included in CL-programs, so a spool entry created in a program, can be merged with an overlay within a job.
The command contains the following parameters: (Press F9 to display all the parameters - including OUTDOC, OUTFLR and REPLACE.)
Merge spooled file and overlay (APF3812)
Type choices, press Enter.
InterForm 400 file set . . . . KARTSET __________ Character value Overlay name . . . . . . . . . KLICHE __________ Character value or Overlay Selector name . . . SELNAM ________ Character value Primary/Secondary set . . . . VRSION ____ *PRI, *SEC Spooled file . . . . . . . . . FILNVN __________ Name, *NONE Job name . . . . . . . . . . . JOB __________ Name, * User . . . . . . . . . . . . ___________ Name Job number . . . . . . . . . ______ 000000-999999 Spooled file number . . . . . SPLNBR _____ Number, *ONLY, *LAST Code page . . . . . . . . . . CODPAG _____ Number, *INPUT Unicode output . . . . . . . . UNICODEOUT *INPUT *INPUT, *YES Output queue . . . . . . . . . OUTQ __________ Name, *JOB, *INPUT Library . . . . . . . . . . ____________ Name, *LIBL Form type . . . . . . . . . . FORMTYPE __________ Character value, *STD, Copies . . . . . . . . . . . . COPIES ______ 01-255, *INPUT Printer type . . . . . . . . . PRTTYP __________ IBM4019, IBM4029, Interface . . . . . . . . . . INTERF __________ SYSTEM, SYSTEM850.. Output spooled file name . . . SPLFNAME __________ Name, *INPUT Drawer . . . . . . . . . . . . DRAWER ________ *PRINTER, *INPUT, Seperator drawer . . . . . . . SEPDRAWER _____ *NONE, 1, 2, 3, 4, 5, 6, User data . . . . . . . . . . USRDTA __________ Character value, *INPUT, Hold output spooled file . . . HOLD ____ *NO, *YES Save output spooled file . . . SAVE ____ *NO, *YES Output . . . . . . . . . . . . OUTPUT _______ *PRINT,*VIEWER,*STMF,*OUTDOC User defined PJL . . . . . . . PJL *NO *YES, *NO PJL Printer group . . . . . . PJLGRP Character value PJL Function . . . . . . . . . PJLFNC Character value To stream file . . . . . . . . TOSTMF ______________________________________ ___________________________________________ Output document . . . . . . . OUTDOC ____________ Character value Output folder . . . . . . . . OUTFLR ______________________________________ ___________________________________________ Replace document . . . . . . . REPLACE *NO *NO, YES Bottom F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys
|
The OUTPUT parameter is used to select what kind of output you want:
Using this value, the output is a merge PCL spool file. The file is placed in the output queue specified in the OUTQ parameter.
*VIEWER
This will merge and open Swiftview to display the result. (Should only be used in an interactive job).
*STMF
Outputs to a PCL file (or .prn file if you specify that extension) stream file in the IFS. The TOSTMF field is to contain the path and file name.
*OUTDOC
This value requires, the OUTDOC, OUTFLR and REPLACE parameters to be filled out. A PCL file (or .prn file if you specify that extension), which name is defined in OUTDOC will be created in the folder defined in OUTFLR.
It is possible to add a initial user defined PJL sequence (if you are not using stapling). To add such PJL command you need to select a PJL printer type for the merge, activate this by setting the PJL field to *YES and then you can select the exact PJL sequence you have defined via PJLGRP and PJLFNC.
When you press F19-DSPPFM in overlay design you can see the temporary file: QTEMP/APF3812P. With the command APF3812/CPYCPISPLF you can create another file with the same contents. It is mainly intended for spooled files with variable CPI. The CPI of the spooled file is placed in position 199-201.
Software developers can update a copy of an existing SCS spooled file by using the InterForm400® PageBuilder feature.
The Page Builder feature is invoked by entering the Create PageBuilder Spooled File command (APF3812/CRTPBSPLF).
Prior to using the PageBuilder feature, a PageBuilder program must be created. This program must be specified for the PAGBLDPGM parameter on the CRTPBSPLF command.
Description of the Create PageBuilder Spooled File command, CRTPBSPLF
Create PageBuild Spooled File (CRTPBSPLF)
Type choices, press Enter.
PageBuilder program . . . . . . PAGBLDPGM __________ Name Library . . . . . . . . . . . __________ Name Data parameter definition: DTAPARM _ Find 'string' . . . . . . . . __________ Value, *PAGE, *ANY String length . . . . . . . . *STR__ 1-256, *STR Return length . . . . . . . . *STRLEN 1-256, *STRLEN Minimum line . . . . . . . . . ______ 1-255 Maximum line . . . . . . . . . ______ 1-255 Minimum starting position . . ______ 1-378 Maximum starting position . . ______ 1-378 + for more values _ Spooled file . . . . . . . . . . FILE __________ Name Job name . . . . . . . . . . . . JOB *_________ Name, * User . . . . . . . . . . . . . __________ Name Number . . . . . . . . . . . . ______ 000000-999999 Spooled file number . . . . . . SPLNBR *LAST_ 1-9999,*ONLY,*LAST Application ID parameter . . . . APPIDPARM _______________________________ _______________________________________________ Output queue . . . . . . . . . . OUTQ *INPUT____ Name, *INPUT Library . . . . . . . . . . . __________ Name, *LIBL Form type . . . . . . . . . . . FORMTYPE *INPUT____ Character value Output spooled file name . . . . SPLFNAME *INPUT____ Name, *INPUT
F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys
|
•First the CRTPBSPLF command calls the PageBuilder program (specified by the PAGBLDPGM keyword) with parameter 1 = ‘STR’.
•Then the CRTPBSPLF command reads all pages from the input spooled file specified by the FILE, JOB and SPLNBR keywords.
•For every page in the spooled file the PageBuilder program is called having parameter 1 = ‘PAG’ and parameter DATA01-DATA10 equal to the data found on the active page according to the values for the DTAPARM keyword - unless you use *PAGE then the contents of the current page is transferred in an array 378 char wide by 255.
•The PageBuilder program now updates parameters (DATA01-DATA10) according to program logic - or the array if you use *PAGE.
•The CRTPBSPLF command creates a new page in a new SCS spooled file with the updated values (DATA01-DATA10).
•After processing all pages your PageBuilder program is called once more having parameter 1=’END’
The parameters of the command are these:
PAGBLDPGM
The PageBuilder program that the command is to call for each page.
DTAPARM
Use this to define each of parameters DATA01-DATA10. Insert a '+' in the first or last line to insert and define another DATA field. Each of the DATA fields are defined like this:
Find 'string':
Type in e.g. *PAGE to transfer the contents of whole spooled file page to the page builder program without the use of DATA01-DATA10. Use of *ANY tells that you do not want to search after any specific text. Other values are interpreted as a string to search for in each spooled file page.
NOTE: If you use *PAGE for Find string, the rest of the fields for DTAPARM are ignored.
String length:
The length of the string to search for/compare with in 'Find string'. Use of *STR indicates that you want to use the length of the that string.
Return length:
The number of characters to insert in the spooled file from the DATAxx, that is returned from the page builder program.
Minimum/maximum line:
The interval of lines in the spooled file to search for the string. If you know what line you want to use just specify this for both.
Minimum/maximum starting position:
The interval of positions to search in the spooled file for the 'Find string'.
Pass data from position:
You can pass some spooled file data from the line where the string of text is found onto the page builder program (in DATAxx). Here you state the starting position of this text. Use *STRPOS to use the position where 'Find string' text is found.
Pass data length:
Works like the previous field. This just determines the length of the spooled file data to move to the page builder program.
FILE
Spooled file name of the *SCS spooled file to operate on.
JOB
Job name, user profile and job number of the spooled file.
SPLNBR
Spooled file number.
APPIDPARM
Application ID parameter. This is transfered onto the page builder program as a parameter. This can be useful if you e.g. want to call the same pagebuilder program from different uses of the CRTPBSPLF command.
OUTQ
The output queue where the new and changed spooled file will be created. *INPUT will make the command create the new spooled file on the same output queue as the original spooled file.
FORMTYPE
The formtype of the new, changed spooled file.
SPLFNAME
The name of the new spooled file.
Example:
CRTPBSPLF PAGBLDPGM(LIB1/BPSAMP) DTAPARM((‘INVOICE NO’ 10 10 1 80 51 51) (*ANY 9 9 11 11 12 12)) FILE(QSYSPRT) JOB(*) SPLNBR(*LAST) APPIDPARM(‘MY ID’)OUTQ(DIAG)
This will process the last QSYSPRT spooled file for the current job, calling the program BPSAMP in library LIB1 for every page in this spooled file.
Keyword DTAPARM describes where to find the values for parameters DATA01-DATA10 (see PageBuilder program parameters below) which are passed to program BPSAMP.
(‘INVOICE NO’ 10 10 1 80 51 51) = specification of DATA01.
Value will be ‘INVOICE NO’ (or blank if not found in line 1-80 position 51).
Length = 10 characters.
Length = 10 characters, when returned from the program BPSAMP,
(*ANY 9 9 11 11 12 12) = specification of DATA02.
*ANY indicate whatever found (in line 11 position 12).
Pass 9 characters to program BPSAMP
Return 9 characters from program BPSAMP.
NOTE: The DATA01-DATA10 parameters can be used for searching for a specific text in the spooled file. Note however that they return/find only the FIRST occurrence on the page.
PageBuilder program parameters:
Parameter |
# |
Length |
Description |
1 |
3 |
I |
CRTPBSPLF call option STR, PAG or END |
2 |
64 |
I |
Value from the APPIDPARM keyword |
3 |
256 |
I/O |
DATA01 (input from spool file - DTAPARM) |
4 |
256 |
I/O |
DATA02 (input from spool file - DTAPARM) |
.... |
256 |
.... |
.... |
12 |
256 |
I/O |
DATA10 (input from spool file - DTAPARM) |
For examples of sources for a Page Builder Program see member PAGBLDPGM and PAGBLDPGM2 in source file APF3812/APISRC. PAGBLDPGM2 illustrates how to use the *PAGE option.
The APF3812/CVTPCLSPLF command converts a PCL spool file to a SCS spool file. This command has been created mainly for converting J.D. Edwards OneWorld spool files to SCS, making it possible to merge the spool file in InterForm400.
Convert PCL Spooled File (CVTPCLSPLF)
Type choices, press Enter.
Spooled file . . . . . . . . . . FILE __________ Name Job name . . . . . . . . . . . . JOB *_________ Name, * User . . . . . . . . . . . . . __________ Name Number . . . . . . . . . . . . ______ 000000-999999 Spooled file number . . . . . . SPLNBR *LAST_ 1-9999, *ONLY,. PCL command subset . . . . . . . PCLSUBSET 001 001 PCL application . . . . . . . . PCAPPL *ANY_____ *ANY, *ONEWORLD, Output queue . . . . . . . . . . OUTQ *INPUT____ Name, *INPUT Library . . . . . . . . . . . __________ Name, *LIBL Form type . . . . . . . . . . . FORMTYPE *INPUT____ Character value User data . . . . . . . . . . . USRDTA *INPUT____ Character value Save output spooled file . . . . SAVE *INPUT *INPUT,*YES,*NO Code page . . . . . . . . . . . CODPAG *INPUT_ *INPUT, *SYSVAL, Input page width . . . . . . . . INPWID *DFT____ 1-28, *DFT, *A4, Maximum page length . . . . . . OUTPAGLEN 255___ 10-255 Maximum page width . . . . . . . OUTPAGWID 360___ 80-360 Bottom F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys
|
If you want to create XML files with InterForm400 from input spooled files, then you need first to create an XML (or XML+) finishing definition. The actual conversion can be triggered either via the X-function in Auto Forms Control, or with this command, APF3812/CVTSPLFXML. The parameters to the command selects a spooled file and the XML/XML+ finishing definition. The command can also be called interactively to enable debugging of an XML+ conversion.
In InterForm400 you can duplicate (or copy) a spooled file in 3 ways:
1.Save and restore a spooled file.
2.Via option 4=Copy spooled file in Auto Forms Control.
3.Via the command, APF3812/DUPSPLF.
The last option is covered below.
Prerequisites
1.The spooled file must be uniquely identified via the spooled file name, job and spooled file number.
2.The job/user running the command need to have use authority to the program, QSYS/QSPCRTSP. If that is not the case, then you can either change the authority of this program or e.g. change the owner of the program, APF3812/AFC704 to a user, that does have use authority and specify, that the AFC704 program should use adopted authority:
CHGPGM PGM(APF3812/AFC704) USRPRF(*OWNER) CHGOBJOWN OBJ(APF3812/AFC704) OBJTYPE(*PGM) NEWOWN(QSECOFR) (Instead of QSECOFR you can specify another user profile with use authority to this program) |
The command has these parameters:
Duplicate Spooled File (DUPSPLF)
Type choices, press Enter.
Input spooled file . . . . . . . FILE Name Job name . . . . . . . . . . . . JOB * Name, * User . . . . . . . . . . . . . Name Job number . . . . . . . . . . 000000-999999 Spooled file number . . . . . . SPLNBR *ONLY Number, *ONLY, *LAST To Output Queue . . . . . . . . TOOUTQ Name Library . . . . . . . . . . . *LIBL Name, *LIBL Hold output spooled file . . . . HOLD *INPUT *INPUT, *NO, *YES Save output spooled file . . . . SAVE *INPUT *INPUT, *NO, *YES Owner of new spooled file . . . OWNER *INPUT Name, *INPUT
Bottom F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys
|
FILE
The spooled file name, that is to be copied.
JOB
The job, that created the spooled file, that you are going to copy. (* selects the current job).
SPLNBR
The spooled file number of the spooled file to be copied.
TOOUTQ
The destination output queue and library.
HOLD
Sets the hold attribute of the new spooled file.
*INPUT: The hold attribute will be the same as the input spooled file.
*NO: The new spooled file will not be held.
*YES: The new spooled file will be created with HELD(*YES) thus it will not be printed nor processed in Auto Forms Control.
SAVE
Sets the save attribute of the new spooled file.
Note, that the status column of the new spooled file (as shown on WRKSPLF or WRKOUTQ main screens) will only change into *SAV after the spooled file with SAVE(*YES) has been printed.
OWNER
The user, that is set as the owner of the new spooled file. You can specify *INPUT to set the owner of the new spooled file to be the same as the owner of the original spooled file. Alternatively you can set a specific user profile.
When you want to merge a spooled file and print the result on an IPL (Intermec Printer Language) compatible printer, then you should consider to merge in Auto Forms Control and use either printer type IPL203 or IPL300.
NOTE: You should consider to switch to the ZPL or IDP print data stream instead of IPL. IPL is no longer recommended.
If you want to merge the spooled file via a command, then you can consider the command: APF3812/MRGSPLFIPL.
The command is VERY simular to the MRGSPLFZPL command.
This command, APF3812/MRGSPLFPDF can be used for creating PDF files containing the result of a merge in InterForm400. This PDF file can even be e-mailed as an attached file, directly from your System i.
NOTE: In order to get PDF output you need to purchase the PDF module for InterForm400.
The Merge Spooled File ZPL Command, APF3812/MRGSPLFZPL can be used e.g. to merge into a Zebra spooled file from an Auto Forms Control user exit program. This command is the Zebra printer equivalent to the commands APF3812/APF3812 and APF3812/MRGSPLFPDF. For details of the parameters see the APF3812/APF3812 command. Only additional parameters compared to the APF3812/APF3812 command are these:
Print mode
(PRINTMODE):
*TEAROFF mean that you will manually tear of the labels.
*REWIND can be used for rewinding all printed labels onto another roll. This requires special hardware installed.
*PEELOFF will print only one label at a time waiting for the current label to be peeled off. (This also requires additional hardware).
*CUTTER (requires hardware cutter) normally cuts the media for each print job unless you use *CONTINUOUS - then *CUTTER will cut out each label.
Labels / Continuous
(MEDIATRACK):
Controls the feed of the labels on the printer. Select *LABELS if the media contains of separate labels. select *CONTINUOUS if the media is not separated into labels (in this case you would probably select *CUTTER for the print mode parameter). Other values are: *WEBLABEL and *MARKLABEL - for various ways to mark the edge of a label on the media.
Media type
(MEDIATYPE):
Select *TRANSFER if you use a non heat sensitive media otherwise use *THERMAL.
NOTE: Creation of ZPL output from InterForm400 requires the purchase of the ZPL module for InterForm400.
The command, APF3812/MRGTPLVAR - Merge template with variables generates a new stream file in the IFS based on an input stream file, that may contain the variables, *V1-*V97. This can be e.g. be used a useful tool to interface with Interarchive and other archive solutions with a PDF file naming definition.
The command is covered in this video:
To use it you first need to build an input, template stream file. It can be XML, CSV, TXT or whatever you prefer. Here you refer to the dynamic variables (originating e.g. from an input spooled file) as *V1-*V97:
Merge template with variables (MRGTPLVAR)
Type choices, press Enter.
From template stream file . . . TPLFIL ‘/MyDir/index_template.xml’
To output stream file . . . . . OUTFIL ‘/Archive_in/Index.xml’
Variable *V1 . . . . . . . . . . V1 ‘Company Name’
Variable *V2 . . . . . . . . . . V2 ‘1234'
Variable *V3 . . . . . . . . . . V3
Variable *V4 . . . . . . . . . . V4
Variable *V5 . . . . . . . . . . V5
Variable *V6 . . . . . . . . . . V6
More... F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys
|
The CCSID of the output stream file will be the same as the input stream file.
You should ensure, that the CCSID of the input template stream file is correct e.g. with WRKLNK OBJ('/apf3812home/work/index_template.xml') and then use option 8=Display attributes:
Display Attributes
Object . . . . . . : /apf3812home/work/index_template.xml
Type . . . . . . . . . . . . . . . . . : STMF
Owner . . . . . . . . . . . . . . . . : KSE System object is on . . . . . . . . . : Local Auxiliary storage pool . . . . . . . . : 1 Object overflowed . . . . . . . . . : No
Coded character set ID . . . . . . . . : 1252 Hidden file . . . . . . . . . . . . . : No PC system file . . . . . . . . . . . . : No Read only . . . . . . . . . . . . . . : No
Need to archive (PC) . . . . . . . . . : Yes Need to archive (System) . . . . . . . : Yes
More... Press Enter to continue.
F3=Exit F12=Cancel F22=Display entire field
|
In the example above the CCSID of the file is 1252, which is also known as ANSI or LATIN1. If the template file was created in another CCSID than the IBM i thinks, then you need to correct it before running the command. If e.g. the template stream file really is UTF-8 encoded, then you need to change the CCSID of the stream file before running the command into 1208 e.g. with this command:
CHGATR OBJ('/MyDir/index:template.xml') ATR(*CCSID) VALUE(1208)
The list of CCSID is found here:
http://www-01.ibm.com/software/globalization/ccsid/ccsid_registered.html
The command can be called from a closing exit program in the PDF file naming definition.
You can merge (or concat) two PDF files together with the command, APF3812/PDFCONCAT. A valid license, which includes the Advanced PDF module is required. Java version 1.7 is also needed. Java 1.7 is available for OS400 version 7.1 and higher.
The command has two parameters:
BASESTMF
The PDF file onto which the second PDF file is to be added. This file will be changed after running the command.
ADDSTMF
The PDF file, that should be added (concatenated) onto the BASESTMF file.
Example for use of the command:
PDF Concat (PDFCONCAT)
Type choices, press Enter.
Base PDF streamfile . . . . . . BASESTMF > '/apf3812home/view/kse.pdf'
Add PDF streamfile . . . . . . . ADDSTMF > '/apf3812home/view/ik.pdf'
|
The APF3812/PRTASCF command prints a ASCII file to an output queue as a SCS spool file. The ASCII file must be placed in IFS. The contents of the ASCII file must be PRTCTL(*FCFC), which means the first character of each line is a control code for the printer. E.g. a ‘1' in position 1 is specifying, that this line is to be printed as the first line of a new page. All other lines must have a blank in this position.
This command can substitute the OS/400 commands: PRTASCSTMF and CVTPCLSPLF. The input for CVTPCLSPLF and PRTASCF have to be symbol set ISO-8859-1 (Latin 1).
The command, APF3812/SGNPDFF (Sign PDF file) is able to add a signature to an existing PDF file. The signpad module is required for this command. The command (and signpad) will await the signing of the document. After the pen has touched the screen, the signer has 5 seconds to complete the signing. The command looks like this:
Sign PDF file (SGNPDFF)
Type choices, press Enter.
PDF stream file . . . . . . . . STMF > '/apf3812home/view/kse.pdf'
Signature pad . . . . . . . . . SGNPAD > SALES DESK
Signature box: SGNBOX Page . . . . . . . . . . . . . 1-32000, *LAST, *FIRST Top (II.PPP) . . . . . . . . . > 10.120 Number Left (II.PPP) . . . . . . . . > 1 Number Height (II.PPP) . . . . . . . > 1 Number Width (II.PPP) . . . . . . . . > 4 Number Preview . . . . . . . . . . . . PREVIEW *NO *NO, *YES
Bottom F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys
|
The parameters are:
STMF
The stream file (PDF file) that is to have the signature added. The file will be replaced with the new, signed file.
SGNPAD
The signpad to be used for the signing. This can be either the serial number of the signpad or the alternative name you can give it in the signpad administration.
SGNBOX
The box or frame to use for the signing. The frame can either be specified on the command or a frame defined in the overlay. For the SGNBOX you can specify either:
A specific page number (in the PDF file) for which the signature is to be added combined with the actual position and size of designated signature frame.
Or:
*LAST or *FIRST for the page. This means: Use either the last or the first frame in the used overlay(s) for signing. If you use this, then no values for Top, Left, Height and Width are allowed.
PREVIEW
If you state preview=*YES, the whole PDF file will first be displayed on the signpad. The signer can read the whole document before signing the document.
The command APF3812/SPLITSPLF makes it possible to split an *SCS spooled file without Auto Forms Control. You only identify the spooled file and an InterForm400 split definition:
Split Spooled File (SPLITSPLF)
Type choices, press Enter.
Split definition . . . . SPLITDEF __________ Name Job Name . . . . . . . . JOB __________ Name, * User Name . . . . . . __________ Name Job Number . . . . . . ______ 000000-999999 Spooled File Name . . . FILE __________ Name Spooled File Number . . SPLNBR *LAST 1-999999, *ONLY, *LAST
Bottom F3=Exit F4=Prompt F5=Refresh F12=Cancel F13=How to use this display F24=More keys
|
Split definitions will normally be executed through a function B in Auto Forms Control.
After running the SPLITSPLF command in your own program you can e.g. find the new resulting spooled files if you give each resulting spooled file a unique spooled file name and refer to the last created spooled file with that name created by the current job e.g.:
CHGSPLFA FILE(<Spooled file name>) JOB(*) SPLNBR(*LAST) OUTQ(<Library>/<New output queue>)
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.