When eliminating unprintability, I have often used a table something like the 
following:
TABLE   DC   256C' '    (X'40', or the blank character; this is the default 
that I want printed if an unprintable is found; it could also be X'FF')
               ORG  TABLE+C'0'
               DC    C'0123456789'                        These are all the 
printable numbers.
               ORG   TABLE+C'A'
               DC    C'ABCDEFGHI'                        Upper case English 
alphabet letters A through I
               ORG   TABLE+C'a'
               DC    C'abcdefghi'                           Lower case English 
alphabet letters a through i
              ORG   TABLE+C'$'
              DC    C'$'                                             U.S. 
Dollar sign character
              etc.
              etc.
              ORG   ,                                              Don't forget 
to put one of these at the end.

The nice thing about this kind of table is that you don't have to know exactly 
where in the 256-byte array of printable characters any given character is 
defined.
But you do need to know that all 10 numbers are contiguous, than only letters 
A-I are contiguous (in EBCDIC), that there is a gap, then the letters J-R are 
contiguous, etc.  You could even program around that by turning the ORG and DC 
into a macro that only defines one character per invocation.
 E.g.:   DEFINE   MACRO   &BYTE
                              ORG   TABLE+C'&BYTE'
                              DC    C'&BYTE'
                              MEND
TABLE    DC    256C' '
       DEFINE  A
       DEFINE B
      DEFINE $
      etc.
      etc.
        ORG   ,                                            Don't forget to put 
one of these at the end.  Or you could add this into the macro and then you 
don't have to remember.

Bill Fairchild

Reply via email to