Check Target Release (QSZCHKTG) API


  Required Parameter Group:

1 Target release Input Char(10)
2 Supported i5/OS (OS/400) releases list Input Char(*)
3 Number of supported i5/OS (OS/400) releases Input Binary(4)
4 Validated target release Output Char(6)
5 Equivalent supported i5/OS (OS/400) release Output Char(6)
6 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: No

The Check Target Release (QSZCHKTG) API verifies that you specified a valid target release value. You can use this API to check a target release value for CL commands that support a TGTRLS keyword parameter. If the target release is a known i5/OS (OS/400) release, this API returns the validated target release. If you specify *CURRENT or *PRV for the target release value, this API returns the equivalent VxRxMx release value.

This API also determines, from the supported i5/OS (OS/400) releases list parameter, which supported release is the most recent release that is less than or equal to the validated target release.


Authorities and Locks

None


Required Parameter Group

Target release
INPUT; CHAR(10)

The target release value being checked. The value must be *CURRENT, *PRV, or a 6-character release value in the format VxRxMx where x is a digit from 0 through 9. The 6-character release value must be a known release of i5/OS (OS/400). All values must be left-aligned and padded with blanks.

Supported i5/OS (OS/400) releases list
INPUT; CHAR(*)

The list of i5/OS (OS/400) releases that the caller of this API supports. Each list entry must be a 6-character release value in the format VxRxMx (where x is a digit from 0 through 9) or the special value *SAV.

A 6-character release value must be a known release of i5/OS (OS/400). All values must be unique and must be in ascending order. If V3R2M0 and V3R6M0 are both in the list, V3R2M0 must precede V3R6M0. The earliest valid i5/OS (OS/400) release value is V1R3M0.

Assume that the calling function supports the creation of two different versions of an object. The first version can be used on a system that runs i5/OS (OS/400) V3R1M0 (or any later release). The second version can only be used on a system that runs i5/OS (OS/400) V3R7M0 (or any later release). The function would pass V3R1M0V3R7M0 for this parameter and would pass a value of 2 for the number of supported i5/OS (OS/400) releases parameter.

If *SAV is specified, it must be the only entry in the list. This special value indicates that the caller supports the same set of i5/OS (OS/400) releases as the i5/OS Save Library (SAVLIB) and Save Object (SAVOBJ) commands.

Number of supported i5/OS (OS/400) releases
INPUT; BINARY(4)

The number of list entries passed in the supported i5/OS (OS/400) releases list parameter. This parameter must have a value of 1 or greater. The value must be 1 if *SAV is specified in the supported i5/OS (OS/400) releases list.

Validated target release
OUTPUT; CHAR(6)

The validated target release being returned. If the input target release is *CURRENT or *PRV, this parameter contains the equivalent VxRxMx value. If the input target release is a known i5/OS (OS/400) release, the API copies the value to this parameter and returns the value. If the input target release value is not *CURRENT, *PRV, or a known i5/OS (OS/400) release in VxRxMx format, the API returns blanks for this parameter.

Equivalent supported i5/OS (OS/400) release
OUTPUT; CHAR(6)

The release list entry being returned, from the supported i5/OS (OS/400) releases list parameter, that is the most recent release that is less than or equal to the validated target release. If the input target release value is not valid, the API returns blanks. If the input target release is less than the first list entry in the supported i5/OS (OS/400) releases list parameter, the API sends message CPF0C35 and returns blanks.

If *SAV is specified in the supported i5/OS (OS/400) releases list, the API returns the validated target release.


Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error Code Parameter.


Error Messages

Message ID Error Message Text
CPF0C31 E &1 not valid for number of supported i5/OS (OS/400) releases.
CPF0C32 E List of supported i5/OS (OS/400) releases not valid.
CPF0C33 E Target release &1 not valid.
CPF0C34 E Release &1 is not a valid i5/OS (OS/400) release.
CPF0C35 E Target release &1 is not a supported release.
CPF24B4 E Severe error while addressing parameter list.
CPF3CF1 E Error code parameter not valid.


API introduced: V3R7
Top | Software Product APIs | APIs by category