I am trying to read an incoming mainframe file that contains a variable length field that contains EBCDIC data.
To read this field, I am currently using $VARYING informat, but this is only suitable for reading variable length ASCII fields. What I am looking for is an informat that reads a variable length field AND converts to readable format in the output.
Here is my code :-
/* P31 - NAME_LINE_1 */
if Bitmap_1a='..............................1.'B then
b_ADDESS_LINE_1 $VARYING23. b_ADDESS_LINE_1_len
data_length = data_length - b_NAME_LINE_1_len - 2;
The problem with the above code is that it populates the output with the EBCDIC, but I need the variable field converting to ASCII. Is there a way to convert a variable length field from EBCDIC to ASCII without relying on the informat / format statements?