CIFF archive extract task

The CIFF archive extract task extracts all the items for a unit-of-work and creates a CIFF-formatted file. This task writes the CIFF formatted file to the target output directory that is configured in the task configuration parameters. Usually, the target output directory is configured with the source directory for an outbound Gateway Server. The CIFF task writes all the records in EBCDIC character format.

You need to do the following steps to implement this archive extract task.
  1. Register the task.
  2. Configure the task.

Register the task

Use the task registry page in the Services Framework user interface. For more information, see Register a task. The following table shows the fields that are needed to register the task.
Table 1. Fields to register the CIFF archive extract task.
Field Description Value Example
Task classname The Java class name for the task. com.ibm.fxh.archivetask.ciff.CiffTask  
Task name A descriptive name for the task. Customer specified. CIFF archive extract
Description A detailed description about what the task does. Customer specified. Task that retrieves the transactions for the UOW and creates a CIFF file for archiving.
The following table shows the runtime characteristics that this task supports.
Table 2. Runtime characteristics
Characteristic Setting Description
Manual Run Allowed This task can be run manually.
Scheduled Run Not Allowed This task cannot be scheduled.
Concurrent Run Allowed This task can run concurrently.

Configure the task

Services Framework tasks need to be configured before they can be used. The following list describes the configuration that the image archive tasks need.
  • Set the appropriate configuration parameters for the task. The parameters for this task are shown in the following tables.
  • The file is delivered to a configured target directory. This directory is normally configured as the source directory for an outbound Gateway.
Use the Services Framework task configuration page to provide the configuration parameters for the task. For more information, see Configure a task.
The following table shows the common parameters for the Services Framework tasks.
Table 3. Common parameters for Services Framework tasks
Parameter Description Example
Task The name of the registered task. CIFF archive extract task
Configuration The descriptive name for the configuration. CIFF archive extract configuration
Description A detailed description to explain what the configuration does. This parameter is not mandatory. If entered, it must be 512 characters or less.  
Activate task This parameter identifies if the configuration is active. Yes, No
Process end of day This parameter indicates whether the task is to be called during end of day processing. Set this value to yes to call the task. Yes
Process cleanup Set this value to no because the task does not need to process cleanup. No
Delete on complete This parameter indicates whether the activity for this task is deleted when it is complete. If set to yes, the activity for this task is deleted when it successfully completes and is not deleted when it has errors or warnings. If set to no, the activity for this task is not deleted when it completes. Deleted task activities do not appear on the task activity page. Yes, No
Allow Monitor This parameter indicates whether Services Framework collects performance data for the task configuration. Yes, No
The following table shows the common parameters for an image archive task.
Table 4. Image archive task common parameters
Parameter Description Examples or default
Target Output Directory This parameter specifies the final output location.  
Target Working Directory This parameter specifies the intermediate output location.  
Extension on the trigger file This parameter specifies the file extension for the trigger file. .eof
Extension on the routing file This parameter specifies the file extension for the routing file. .rte
Transmission Definition This parameter specifies the transmission definition name. CiffExtract
UOW Complete State This parameter specifies the state of the batch (ICL) to be set when complete. ARCHIVED
Index Definition Filename This parameter specifies the CSV file name that defines the index data.  
User Exit This parameter specifies the Java class name of the user exit.  
Image Retrieval Mode This parameter specifies whether the mode of image retrieval is either local or remote. Local
Image Segments to Retrieve This parameter specifies the image segments to retrieve. FBW, RBW
Missing Image Percentage This parameter specifies the threshold of missing images that is allowed. 1.0,10
Substitute Image This parameter specifies the TIFF file that is used as a substitute image. SorryDoc.tif
Substitute Image Maximum Size This parameter specifies the maximum file size of the substituted image. 100000
The following table shows the parameters for the CIFF archive extract task.
Table 5. CIFF archive extract task parameters
Parameter Description Examples or default
Create Seg Zero Segment 0 is a record in the CIFF item image record.
  • If this record is needed, the task creates and fills it.
  • If this record is not needed, the segment 0 length is set to 0.
Y or N
Environment Ids The IDs to use for the primary and secondary environment ID file name pattern placeholder values. Specify the values for the IDs as a comma-separated list. The first value is substituted for the %PENV% file name pattern placeholder and the second value is substituted for the %SENV% placeholder.

In the example value for this parameter, the value PROD is substituted for %PENV% and the value TEST is substituted for %SENV%.

PROD ,TEST
Max Image Size The maximum size of the image in the output file, which is specified in bytes. Any image beyond this size is written to the file without that image segment. 0 indicates that no maximum image size is specified. 0

File name pattern placeholder values

The Services Framework tasks use the transmission definition’s file name pattern attribute to name the output archive files. The pattern specifies the placeholder tags that are substituted with respective values when the task runs, pertinent to the unit of work, date, or time.

The following table shows the common file name pattern placeholder values that the task supports.
Table 6. Common file name pattern placeholder values
Name Placeholder Description
Uow Type %TYPE% This placeholder substitutes the value for the type of unit of work. The following are some examples.
  • Entry = ENT
  • Transmission = TRA
  • Batch (ICL) = BAT
Uow Id %ID% This placeholder substitutes the value for the ID of the unit of work.
Entry # %EN% This placeholder substitutes the value for an entry number of the unit of work. This number is only replaced if triggered by entry, or by using entry for manual invocation.
Business Day %BD% This placeholder substitutes the value for the business day in the YYYYMMDD format.
Category %BC% This placeholder substitutes the value for the category.
Current Day %DT% This placeholder substitutes the value for the current day or time.
File Sequence # %FILENUM% This placeholder substitutes the value for the file sequence number. The value starts at 0 and increments if a unit of work rolls to another file during the same invocation. This placeholder is 2 digits and is padded on the left with zeros.
The following table describes the list of placeholder values that the CIFF archive extract task supports.
Table 7. CIFF archive extract task file name pattern
Name Placeholder Description
Primary Env Id %PENV% This placeholder substitutes the primary ID string as specified in the task configuration.
Secondary Env Id %SENV% This placeholder substitutes the secondary ID string as specified in the task configuration.

CIFF user exit interfaces

The CIFF archive extract task supports the CiffWriterUserExitInterface. The actions that are done by this interface are shown in the following list.
  • Customize the specific CIFF records built by the CIFF task.
  • Generate the CIFF processing options record that can be added to the file.
The CIFF task supports a custom user exit interface solely for the customizing of CIFF file records. The full interface name is com.ibm.fxh.archivetask.userexit.CiffWriterUserExitInterface.
Note: You can specify only one user exit name in the task configuration for this task. Therefore, a single user exit can implement both the ArchiveWriterUserExitInterface and the CiffWriterUserExitInterface interfaces. It is acceptable for a user exit to implement the ArchiveWriterUserExitInterface, but the CiffWriterUserExitInterface inherits from the ArchiveWriterUserExitInterface. So, methods from both the interfaces must be implemented.
The methods that are implemented for CiffWriterUserExitInterface are described in the table.
Table 8. CiffWriterUserExitInterface Methods
Method Description
byte[] customizeHeaderRecord( ImageResourceData, UowInfo, byte[] ) This method is called after the following steps.
  1. The header record is built with default values.
  2. An item for the unit of work is read from the database.
byte[] customizeProcOptsRecord( ImageResourceData ) This method is called after the header record is written to the file. If the user exit does not need to create a processing options record, it returns null and no processing options record is written to the file.
byte[] customizeIndexDefinitionRecord( ImageResourceData, byte[] ) This method is called after the index definition record is built. This record is based on the task’s index definition file that is specified on the task configuration.

Manually run the task

The CIFF archive extract task can run manually. The following table shows the parameters that are used for manual invocation of the CIFF archive extract task.
Table 9. Manual task configuration parameters
Parameter Description Value
UOW Id This parameter indicates the ID for the unit of work. This ID is associated with the parameter UOW Type. This parameter is mandatory.
Note: If the UOW Type is Entry, the UOW ID field is found on the Entry details page and is not the entry number.
1
UOW Type This parameter indicates the type of unit of work the ID refers to. This parameter is mandatory. Batch/ICL
Set State This parameter indicates whether the batch state associated with the unit of work is set when the processing is complete. The default value is Y. Y or N
State to Set This parameter specifies the state to use when the processing is complete. This parameter overrides the state that is specified in the task configuration. If no value is specified, the task uses the state in its task configuration.  
Prevent if State is Set This parameter indicates to prevent the task from processing if the state is already set. The default value is Y. Y or N
Continue Extract if Too Many Missing Images This parameter indicates whether to continue with the task processing if the task configuration’s missing image percentage exceeds the threshold. The default value is N. Y or N
Continue Extract if Image Mismatch Failures This parameter indicates whether to continue with the task processing if image mismatch conditions are detected, even if the task is removing the mismatched images and replacing them with the substitute image. The default value is N. Y or N