Appendix A. Using the phonetic conversion subroutine DFHPHN

You can use the DFHPHN macro to perform phonetic conversion of 16-character names ( the DFHPHN macro is no longer supported). The result is a 4-byte phonetic equivalent. DFHPHN is supplied in CICSTS31.CICS.SDFHLOAD. For online code, DFHPHN takes the following parameters:

lang
A symbolic reference to a 1-byte argument indicating the programming language being used. This is X'F0' for COBOL, C/370™, and assembler, and X'F1' for PL/I. If an error occurs during the processing of this request, then X'50' is returned in this argument; if no error occurs, X'00' is returned. This argument must be reset to indicate the programming language, before it can be reused.
name
a symbolic reference to the field that contains the 16-character name you want to convert.
phon
a symbolic reference to the field that contains the 4-byte phonetic equivalent of the name passed from the subroutine to the calling program.

For example;

Language            Command
 
COBOL               CALL 'DFHPHN' USING lang name phon.
C/370              In the program prior to the main()[ statement, code:
 
                    #pragma linkage(DFHPHN,OS)
                    void DFHPHN();
 
                    In the program AFTER the main(){ statement, code:
 
                    DFHPHN(lang,name,phon);
PL/I                CALL DFHPHN (lang,name,phon);
Assembler           CALL DFHPHN,(lang,name,phon)
 

The phonetic code conversion subroutine (DFHPHN) also assists you to load and access data sets offline. The steps in creating such a data set would typically be:

  1. Create the keys
    1. Read a record from the source data set
    2. Generate the "phon" using a call to the DFHPHN subroutine
    3. Write the record to a temporary sequential data set
  2. Sort the temporary data set on the 4-byte phonetic code
  3. Load the key-sequenced VSAM data set
    1. Read the sorted temporary data set
    2. Write to the keyed data set
[[ Contents Previous Page | Next Page Index ]]