z/OS ISPF Services Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


TRANS—translate CCSID data

z/OS ISPF Services Guide
SC19-3626-00

The TRANS dialog service translates data from one Coded Character Set Identifier (CCSID) to another. A maximum variable size of 32 767 bytes of data can be translated. There is no automatic transformation of single-byte to double-byte data or double-byte to single-byte data. This service is available through the ISPEXEC and ISPLINK interfaces. See the z/OS ISPF Dialog Developer's Guide and Reference.

Command invocation format

Read syntax diagramSkip visual syntax diagram
>>-ISPEXEC--TRANS--FRMCCSID(from-ccsid-number)------------------>

>--TOCCSID(to-ccsid-number)--FROMVAR(from-variable-name)-------->

>--+-------------------------+--+---------------------+--------><
   '-TOVAR(to-variable-name)-'  '-LENGTH(data-length)-'   

Call invocation format

Read syntax diagramSkip visual syntax diagram
>>-CALL--ISPEXEC--(buflen,--buffer)----------------------------><

or

Read syntax diagramSkip visual syntax diagram
>>-CALL--ISPLINK--('TRANSbbb'----------------------------------->

>--,from-ccsid-number,to-ccsid-number,from-variable-name-------->

>--,-+-to-variable-name-+--,-+-data-length-+-);----------------><
     '-'b'--------------'    '-'b'---------'      

Parameters

from-ccsid-number
Required parameter. The from-ccsid-number is a 5-digit decimal (5 character position) number that specifies the current CCSID of the variable data before translation.
to-ccsid-number
Required parameter. The to-ccsid-number is a 5-digit decimal (5 character position) number that specifies the CCSID the variable data will be translated to.
from-variable-name
Required parameter. Specifies the name of a dialog variable that contains the source data to be translated. The translated data is returned in this variable if the TOVAR parameter is omitted.
to-variable-name
Optional parameter. Specifies the name of a dialog variable that receives the translated data. A truncation error occurs if this variable is not large enough to hold the translated data. Only the translated data is stored in this variable. The translated data is returned in the dialog variable identified by the FROMVAR parameter if this parameter is omitted.
data-length
Optional parameter. The length of data in the source variable that is translated. This number must be an integer from 0 to 32␠767. A zero value results in this parameter being ignored. For call invocation, this parameter must be a fullword fixed binary number. If this parameter is specified, the smaller of its value and the length of source variable data is used. If this parameter is omitted, the length of the source variable data determines the amount of data that is translated. Only the translated data is stored in the receiving variable.

Return codes

 0
Service completed successfully.
 4
Translate tables do not support the requested "to ... from" combination. For a list of extended code page translate tables provided by ISPF, see the z/OS ISPF Dialog Developer's Guide and Reference.
 8
From variable not found.
16
Variable services indicated a translation error or truncation occurred storing the translated data.
20
Severe error.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014