The AddParameterBin Method

AddParameterBin ($IOType, , $Size, $Comment, $Name, $Value) - Defines the binary  type parameter.  This parameter allows you to define data that does not require EBCDIC/ASCII conversion for example Unicode (UTF-8) data or Blob/Clob data, to be sent and received as hexadecimal.

The parameter input value, which is binary, should be converted to a hexadecimal string type and the output parameter returned by a program, which is a hexadecimal string should be converted to binary type.






  • in
  • out
  • both

Data direction type



Parameter size



Developer comment



Parameter name



Parameter value

Sample Code

Usage Example

$string = bin2hex($bin);

$param[] = $ToolkitServiceObj->AddParameterBin('both', 20, 'UncodeSample', 'p1', $string);

$result = $ToolkitServiceObj->PgmCall($program, $library, $param, NULL, NULL);

$bin_str = pack("H*", $result[‘io_param’][‘p1’]));