In a home-grown application I have had work with, we create a file in the IFS directory as an ASCII file. THen open it in EBCDIC mode with textconv option. Then at each line we need to write a CR/LF we write to the file x’0D’ for the CR in EBCDIC and x’25’ for the LF in EBCDIC. The textconv option takes care of getting the ASCII values in the proper format.
this uses the c procedures open(), write(), and close().