ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Hex Characters from Data Entry

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hex Characters from Data Entry

    Hi All:

    I came accross this for the first time today and I'm hoping someone has some insight.

    I have a note file where users can free-form key notes. One note contained a Hex '15' and a Hex '1A'. The x'1A' character looked like it should have been a ' character.

    This program and DFU both blow up with un-displayable characters.

    This is the only program that updates/writes to that file so these hex characters had to have been keyed in somehow.

    I suspect a combination of keys with the alt key but I cannot duplicate the error.

    Any Insight is welcome

    Thanks
    GLS
    The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

  • #2
    Re: Hex Characters from Data Entry

    For the Client Access Emulator it is alt-x then enter a hex character of 4-9 or A-F followed by a second hex character 0-9 or A-F.

    Note that this does not allow you to enter a value less that x'40' which would be a screen attribute.

    I suspect that your user is copying from a non-CA screen and pasting into the emulator. I have seen some strange garbage were text was copied and pasted from a Outlook Email into a large text field in the CA emulator.

    CA should not allow pasting < x'40' but it does.
    Denny

    If authority was mass, stupidity would be gravity.

    Comment


    • #3
      Re: Hex Characters from Data Entry

      System21 puts alpha chars into numeric fields by sticking the numeric fields into a data stracture and then writing it to file, and this on consolidated invoices! Same problem then as you with DFU and WRKQRY. One can change the contents using SQL though.
      Regards

      Kit
      http://www.ecofitonline.com
      DeskfIT - ChangefIT - XrefIT
      ___________________________________
      There are only 3 kinds of people -
      Those that can count and those that can't.

      Comment


      • #4
        Re: Hex Characters from Data Entry

        Thank you Gentlemen.

        I now suspect it was copy/pasted from an E-Mail. I cannot trace it as it was entered in July of 2007)

        The fix used is as follows:
        Code:
        if %scan (x'15': PNND01) > *zeros;                       
           PNND01 = %replace(' ':pnnd01:%scan (x'15': PNND01):1);
           found = *on;                                          
        endif; 
        if %scan (x'1A': PNND01) > *zeros;                        
           PNND01 = %replace(' ':pnnd01:%scan (x'1A': PNND01):1); 
           found = *on;                                           
        endif;  
        .....      
        if found=*on;      
           update noterec; 
           found=*off;     
        endif;
        Thanks again for all of your efforts
        GLS
        The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

        Comment

        Working...
        X