HP OpenVMS Systems

ask the wizard
Content starts here

ASCII to EBCDIC data conversions?

» close window

The Question is:

I have a COBOL program which converts a file from ASCII format to EBCDIC format
We do not have COBOL compiler any more and need to rewrite it in C. How would I
 do it in C?

The Answer is :

  By calling LIB$TRA_ASC_EBC from C rather than COBOL, most likely.
  The two arguments -- the source string and the destination string,
  respectively -- are OpenVMS string descriptors.
  If you are unfamiliar with string descriptors and C, please see
  the "what is a descriptor" section of the OpenVMS FAQ.
  Pointers to EBCDIC-related conversion tools are also included in
  the OpenVMS FAQ.

answer written or last revised on ( 29-MAR-2001 )

» close window