uscctc(3F)

USCCTC, USCCTI - Converts EBCDIC character data to ASCII character data, and vice versa

As shipped in IRIX 6.5.19. Last changed in IRIX 6.5.19.

NAME
     USCCTC, USCCTI - Converts EBCDIC character data to ASCII character
     data, and vice versa

SYNOPSIS
     CALL USCCTC (src, isb, dest, num, npw [,val])

     CALL USCCTI (src, dest, isb, num, npw [,val])

DESCRIPTION
     This routine is in libffio.so which is linked by default when
     compiling programs with the MIPSpro 7 Fortran 90 compiler or when
     compiling programs with the -craylibs option to the MIPSpro F77
     compiler.

     USCCTC converts EBCDIC character data to ASCII character data; USCCTI
     converts ASCII character data to EBCDIC character data.  All
     non-printing characters are converted to blanks.

     The arguments must be of type integer with KIND=8.

     The following is a list of valid arguments for this routine.

     src       Variable or array of any type (except CHARACTER) containing
               the character data to be converted.

     isb       An integer variable or constant containing the starting byte
               offset to begin the data conversion.  Bytes are numbered
               from left to right, with the leftmost byte as byte 1.  The
               isb argument applies to the src (USCCTC) or dest (USCCTI)
               argument.

     dest      Variable or array of any type (except CHARACTER) to receive
               the character data to be converted.

     num       An integer variable or constant containing the number of
               characters to be converted.

     npw       An integer variable or constant containing the number of
               characters to be placed in each word of dest (USCCTC) or
               obtained from each word of src (USCCTI).  A positive value
               for npw (1 to 8) indicates left-justification.  A negative
               value (-1 to -8) indicates right-justification.  For USCCTC,
               left-justified output is also blank-filled.  Note that npw
               values of 8 and -8 are equivalent.

     val       An optional integer or logical variable or constant which,
               if specified and nonzero (.TRUE.), indicates that all lower
               case input is to be folded to upper case output.  The
               default, if the argument is not specified, is no case
               folding.

NOTES
     The following conditions must be met for any character data to be
     converted:
          num >= 0
          isb > 0
          0 < |npw| < 9

     If num is not an even multiple of 8, the USCCTI routine will place the
     remaining converted characters in the final word of dest while
     preserving the rest of the original contents of the word.

CAUTIONS
     The same variable or array can be specified for src (input) and dest
     (output) if and only if isb is 1 and npw is 8 (or -8).  The results of
     overlapping conversions using any other values for isb and npw are
     undefined.

EXAMPLES
     The following Fortran code converts 800 characters from EBCDIC to
     ASCII.  The ASCII characters are placed one per word, right-justified.

          INTEGER EBCDIC(100)
          INTEGER ASCII (800)

          CALL USCCTC(EBCDIC, 1, ASCII, 800, -1, .FALSE.)