PL/I does not have variables that correspond to the SQL binary data types. To create host variables that can be used with these data types, use the SQL TYPE IS clause. The SQL precompiler replaces this declaration with a PL/I language structure in the output source member.
>>-+-DECLARE-+--+-variable-name-----------+---------------------> '-DCL-----' | .-,-------------------. | | V | | '---(--variable-name--)-+-' >--SQL TYPE IS--+-BINARY---------+--(--length--)--;------------>< +-VARBINARY------+ '-BINARY VARYING-'
The following declaration:
DCL MY_BINARY SQL TYPE IS BINARY(100);
Results in the generation of the following code:
DCL MY_BINARY CHARACTER(100);
The following declaration:
DCL MY_VARBINARY SQL TYPE IS VARBINARY(250);
Results in the generation of the following code:
DCL MY_VARBINARY CHARACTER(250) VARYING;