awk and EBCDIC

Hello,

I am trying to insert a line in an EBCDIC encoded file.
I intend to translate my ASCII line into EBCDIC, then use awk to insert this line into my file after it found a known EBCDIC occurence within the file (contained in a control file, in EBCDIC).

But I am having difficulties telling awk to locate that pattern, as it always returns me no result even if I negate the special characters contained in it.

The pattern looks like this:

�^Ţ^֤^�^�^�����~���^�^���^���^���^��^�^�^���^��^�^��^���^�^���

And it is confirmed to be part of the file I am trying to amend.

My question is if there would be a way to tell awk to take this EBCDIC pattern line "as if" other than using the \ character since it doesn't seem to work)?

Any advice on using sed/perl/grep are welcome too as I can use these programs.

Why not convert all your EBCDIC to ASCII, do your AWK stuff, then convert it all back to EBCDIC?

IIRC, dd man dd(1M) may help in EBCDIC->ASCII conversion

Rgds

This file cannot be converted to ASCII so I have to treat it as EBCDIC from start to the end.