Support This Project Get i5/OS Programmer's Toolkit at SourceForge.net. Fast, secure and Free Open Source software downloads

Miscellaneous Tools

Go back to main page of project i5/OS Programmer's Toolkit .

Tools and utilities that are hard to be categorised are listed as the following:

The CVTHC Program

Like its MI cousin (the CVTHC (Convert Hex to Charater) instruction), the CVTHC program converts each hex digit (4-bit value) in the source character string to a character (8-bit value) in the receiver character string. It's a tiny OPM MI program which contains only 18 OPM MI instructions. The source of the CVTHC program is cvthc.emi.

The reason of the CVTHC program's birth is quite simple, it is handy for an OPM or ILE HLL program to convert a hexadecimal value to character format. The CVTHC MI instruction cannot be used in a bound program (an ILE program). Also, an OPM HLL program cannot use MI instructions, and hence cannot utilize the CVTHC instruction. Although service program QSYS/QC2UTIL1 exports a procedure, cvthc, that implements the functionality of the CVTHC instruction, the cvthc procedure is really inconvenient to use, since the user must bind to *SRVPGM QSYS/QC2UTIL1 directly or indirectly via the *BNDDIR QSYS/QC2LE. While, using the CVTHC program in a ILE HLL program is convenient, you need to do nothing but an external program call.

The CVTHC program has three parameters:

The following are pieces of HLL programs that utilize the CVTHC program.


Support This Project
Generated on Mon Oct 3 04:10:44 2011 for i5/OS Programmer's Toolkit: System-builtin Headers for ILE RPG by  doxygen 1.5.9