ascii to ebcdic or ebcdic to ascii translation
Posted: Wed Dec 21, 2011 4:11 pm
I'm using a column import that takes a schema file and reads in a file that's partially ascii and partially ebcdic. Most columns are either ascii or ebcdic and can be specified which in the schema file but I have one that consist of both ascii and ebcdic characters so I have to read it in that way. Is there a way of translating data character by character from within a single column. I was thinking about using the looping portion of the transformer and then translating it. Is there a better way or can this even be done?
record {binary, big_endian, record_format={type=implicit}, delim=none, final_delim=none}
(
irlstno:uint32;
ircmstrt:uint8 {link_keep};
ircfnm:uint8 {link_keep};
ircuser:uint8 {link_keep};
irstrt:string[max=255] {ebcdic, reference='ircmstrt'};
iruser:string[max=255] {reference='ircuser'};
}
record {binary, big_endian, record_format={type=implicit}, delim=none, final_delim=none}
(
irlstno:uint32;
ircmstrt:uint8 {link_keep};
ircfnm:uint8 {link_keep};
ircuser:uint8 {link_keep};
irstrt:string[max=255] {ebcdic, reference='ircmstrt'};
iruser:string[max=255] {reference='ircuser'};
}