Image Print Transform Exit Program


  Required Parameter Group:


  Exit Point Name: QIBM_QIMG_TRANSFORMS

  Exit Point Format Name: XFRM0100

  QSYSINC Member Name: eimgeph

The Image Print Transform (IPT) exit point can be used to transform user ASCII data streams for the following reasons:

An exit program that takes the requested data stream format as input and produces the requested output data stream format must be registered to this exit point by using the Add Exit Program (QUSADDEP, QusAddExitProgram) API or the ADDEXITPGM command.

Image Print Transform (IPT) tries to determine the input data stream format and the output data stream format. Once the two data stream formats have been determined, the Retrieve Exit Information (QUSRTVEI, QusRetrieveExitInformation) API is called to determine if any exit programs have been registered that support the specified input and output data stream format combination. The following input and output data stream combinations are used in the exit program data field of the selection criteria for the API:

Note: If the input or output data stream format is unrecognized, "UNKNOWN UNKNOWN" is used in the exit program data field of the selection criteria for the Retrieve Exit Information (QUSRTVEI, QusRetrieveExitInformation) API. IPT will query up to the first ten registered exit programs using the "UNKNOWN UNKNOWN" value in the data field in an attempt to find an exit program that can successfully transform the input data stream format to the requested output data stream format. If, after querying up to ten exit programs, an exit program is not found that can handle the transform, IPT returns to the caller, stating it cannot transform the image.

IPT queries the exit point to determine if one matches both the requested input and output data stream formats. If one or more is found, IPT then queries only the first exit program listed in the Retrieve Exit Information (QUSRTVEI, QusRetrieveExitInformation) API response to see if it can handle the requested transform, using a value of 20 (process file) in the process option field of the process values parameter. If the exit program can handle the transform, it is called again with the actual transform request. If there is no exit program registered with the specified input and output data stream formats (that is, something other than "UNKNOWN UNKNOWN" in the data field area), or if there are no registered exit programs that can handle the requested transform, IPT then queries the first ten exit programs registered using "UNKNOWN UNKNOWN" in the data field area and handles it as described above. If there are no exit programs found that can handle the transform, IPT handles the request as normal, by either transforming it if it is able to or notifying the caller that the data cannot be converted.

See the Add Exit Program (QUSADDEP, QusAddExitProgram) API or the Add Exit Program (ADDEXITPGM) command for more information.


Authorities and Locks

None.


Required Parameters

Transform values
INPUT; CHAR(*)

Conversion information that is input to the exit program from Image Print Transform. For the format and description of this information, see Transform Values to Exit Program.

Process values
I/O; CHAR(*)

Process information that is input to the exit program from Image Print Transform. In addition, there is process information passed back from the exit program. For the format and description of this information, see Process Values to Exit Program.

Input Data Stream
INPUT; CHAR(*)

The data stream to be transformed by the exit program. The input data stream is broken into manageable sized buffers and sent to the exit program one at a time.

Output Data Stream
OUTPUT; CHAR(*)

The data stream that has been transformed by the exit program. If the data stream is larger than the buffer sent, the exit program sends it back in a buffer at a time and IPT puts it back together.


Transform Values to Exit Program

XFRM0100 Format

The following table shows the format of the XFRM0100 structure for the transform values parameter. For more details about the fields in the following table, see Field Descriptions.


Field Descriptions

Bits per pixel. Number of bits per pixel to be used in the output image.

Possible values are:

Bottom unprintable area. The number of pixels of unprintable area on the bottom border.

Convert color to gray. Whether to reduce the output data stream's pixel information content from color to gray. If this field is set to No, the pixel information content of the output data stream will be that of the input data stream. Setting this to Yes reduces the output pixel information content to gray scale if it would have been color and will otherwise have no effect.

Convert gray to black and white. Whether to reduce the output data stream's pixel information content from gray to black and white. If this field is set to No, the pixel information content of the output data stream will be that of the input data stream. Setting this to Yes forces the output to black and white.

Possible values are:

Horizontal justification from left border. Distance in pixels from left border to justify the image.

Input decompression value. Compression algorithm used on input data stream.

Possible values are:

Input file format. Format of the input print or image data stream. Possible values are:

Internal job identifier. The internal job identifier of the job that created the spooled file. This field will be set to blanks when the input stream is not a spooled file.

Internal spooled file identifier. The internal spooled file identifier of the spooled file being processed. This field will be set to blanks when the input stream is not a spooled file.

Invert image. If yes, black becomes white and white becomes black. This parameter has no effect for color output. It also has no effect for color images output as gray on a Printer Control Language (PCL) color printer.

Possible values are:

Job system name. The name of the system where the job that created this spooled file ran. This field will be set to blanks when the input stream is not a spooled file.

Left unprintable area. The number of pixels of unprintable area on the left border.

Output compression value. The algorithm used to compress the output image or print data stream. Possible values are:

Output file format. The format of the output data stream. Possible values are:

Output page orientation. How the output is oriented on paper. Possible values follow:

Output page size. The paper size to be used for the output image or print data stream. See the table following the values for dimensions of each size value. Possible values are:



Output horizontal resolution. The number of horizontal pixels per inch.

Output vertical resolution. The number of vertical pixels per inch.

Paper length. Length of paper to use; units in inches.

Paper width. Width of paper to use; units in inches.

Right unprintable area. The number of pixels of unprintable area on the right border.

Reserved. The field is reserved.

Spooled file create date. The date the spooled file was created on the system in the CYYMMDD format. See field Date file opened in API QUSRSPLA under field descriptions for more information on the date format. This field will be set to blanks when the input stream is not a spooled file.

Spooled file create time. The time the spooled file was created on the system in the HHMMSS format. See field Time file opened in API QUSRSPLA under field descriptions for more information on the time format. This field will be set to blanks when the input stream is not a spooled file.

Spooled file job name. The name of the job that the file being processed was spooled under. This field will be set to blanks when the input stream is not a spooled file.

Spooled file job number. The job number that the file being processed was spooled under. This field will be set to blanks when the input stream is not a spooled file.

Spooled file name. The name of the spooled file being processed. This field will be set to blanks when the input stream is not a spooled file.

Spooled file number. The number of the spooled file being processed. This field will be set to zero when the input stream is not a spooled file.

Spooled file user name. The user profile that the file being processed was spooled under. This field will be set to blanks when the input stream is not a spooled file.

Structure length. The length of the structure. Currently, this is set to decimal 256.

Structure version. The format identifier of the transform parameter structure. Currently, this is set to "XPRM0100".

Top unprintable area. The number of pixels of unprintable area on the top border.

Vertical justification from top border. Distance in pixels from top border to justify the image.

Writer message queue library name. The name of the library in which the writer message queue resides. This field will be set to blanks when no writer message queue is associated with the file or buffer.

Writer message queue name. The name of the message queue to which the writer issues messages. This field will be set to *NONE when no writer message queue is associated with the file or buffer.


Process Values to Exit Program

The following table shows the structure for the process values parameter. For more details about the fields in the following table, see Field Descriptions.


Field Descriptions

Finished transform. (OUTPUT)  Signals when transform of the input data stream has completed. Possible values are:

Input data stream length. (INPUT)  Length of data being sent to transform. The maximum value is 16700000. If the total is larger than this maximum, it will be sent a buffer at a time.

Length of returned data. (OUTPUT)  Length of transformed data returned by the exit program. If this field is larger than the output buffer length, it must be returned as separate buffers in the correct order. This is accomplished by setting the finished transform field to No for all output data streams returned except the last one, which must have the finished transform field set to Yes. If a terminating error occurs in the process of transforming, the exit program may set the length to a negative value, and the process will be halted.

Output data stream length. (OUTPUT)  Length of buffer for transformed output data stream.

Process option. (INPUT)  The action for the exit program to take. The first option is process (20). Possible values are:

Reserved. Space reserved for future use.

Structure length. (INPUT)  The length of the structure. Currently, this is set to decimal 36.

Structure version. (INPUT)  The format identifier of the transform parameter structure. Currently, this is set to "IPRM0100".

Transform ability. (OUTPUT)  Used by the exit program, when running during process option 20, to notify Image Print Transform whether the exit program can transform the data stream.

Possible values are:



Exit program introduced: V5R1

[ Back to top | Print APIs | APIs by category ]