Using the shell with EBCDIC literal values in AIX or Windows

Literal values used in the FIELDn, INDEXn, and TRIGGERn parameters must be expressed in hexadecimal strings when the input data is anything other than ASCII. Because the input data in Example of an AIX parameter file for EBCDIC input data is EBCDIC, hexadecimal strings are required, and must be entered if you specify your parameters within a parameter file. If the parameters are not specified in a parameter file, you can use AIX or Windows commands (such as axeb or iconv) to convert ASCII literal values into EBCDIC literal values. For example, to convert the ASCII literal Name for the second index attribute (INDEX2), do these tasks:

  1. Create a shell environment variable to hold the EBCDIC literal:
    • With the axeb command, enter:
      • attr2=$(echo -n "Name" | axeb)
    • With the iconv command, enter:
      • attr2=$(echo -n "Name" | iconv -fIBM-850 -tIBM-037)
  2. On the command line or in a shell script, specify the second index attribute by entering:
    • INDEX2="'$attr2'",field2
Note: This example is for use with the Korn Shell (ksh). If you are using a different shell, see the documentation for the shell you are using in AIX Commands Reference.

By using this method to convert the ASCII literals to the EBCDIC literals, no mistakes are made when the literals are converted to a hexadecimal string.