// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import java.io.UnsupportedEncodingException;

public class EbcdicScanner {
    public static void test(String cp) {
        try {
            byte[] b = "\n".getBytes(cp);
            if(b[0] == 0x25) {
                System.out.println(cp);
            }
        } catch (UnsupportedEncodingException e) {
            // ignore
        }
    }
    public static void main(String[] args) {
        for(int i = 0; i < 10000; i++) {
            test("Cp" + i);
        }
    }
}
