How do you specify a 0xff in a PDL

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf How do you specify a 0xff in a PDL

  • Creator
    Topic
  • #50397
    Kevan Riley
    Participant

      I am looking at data that starts with an (0x02) and ends in 6 0xFF’s

      “7eff ffffffff ff” (the 7e uis a ‘~’).  I would like to use the same structure as the MLP PDL but substituting the for and teh with something like <0xff><0xff><0xff><0xff><0xff><0xff>.

      Something like this:

      define phrase basic-msg;

         ;

         field data = variable-array( not( <0xff> ) );

         <0xff>; <0xff>;

         <0xff>; <0xff>;

         <0xff>; <0xff>;

      end phrase;

      But the 0xff syntax is not allowed, and there is no character name for a 0xFF.

      Kevan Riley

      AHS-IS

    Viewing 4 reply threads
    • Author
      Replies
      • #65954
        Michael Hertel
        Participant

          Try xff or \ff but are you really sure that’s what you want to use?

          0xff is usually filler. (whitespace)

        • #65955
          Kevan Riley
          Participant

            I am still stuck with this.  

            I tried all combinations of single quotes, <>, slashes with and with and with out a leading x or 0x (ie. ff, xff, xff, , , , ‘ff’, ‘xff’, ‘xff’, ‘\ff’, etc).

            The issue is that I can’t figure out how to specify the phrase definition.  It has different, none-tcl, rules and syntax.

            the message is X12 and begins like this (first 4 columns are the Hex values):

            02564030 30303031 4953412a 30302a20   .V@00001ISA*00*

            which is great, the leading x02 is an .  But here is the end of the message:

            37327e49 45412a31 2a303139 39333136   72~IEA*1*0199316

            37327eff ffffffff ff                                      72~……

            All I have to work with here are the FF’s.  The 7e is the “~” for the seg terminator.  These are specified in the current source system as three <255>‘s.  I have to emulate this in Cloverleaf (both reading and writing) which would be a piece of cake if I could just specify the ff’s in the PDL phrase definition.  According to all of the example PDL’s I have see they all have a variable-array of the form variable-array( not()).  which, again, would be great if I could just specify the hex xff here.

            Kevan Riley

            AHS-IS

          • #65956
            Russ Ross
            Participant

              I would be like you trying everything I could think of that makes since and asking for help.

              Perhaps you can try the FF character striaght by generating it and copy/paste it straight into your PDL script and see if that works.

              I was able to generate the base 16 FF character ( which is 255 in base 10 and 377 in base 8 ) for copy/paste in an xterm on my AIX box as follows

              echo ‘377’

              which resulted in displaying the following character

              Russ Ross
              RussRoss318@gmail.com

            • #65957
              Russ Ross
              Participant

                I looked at some of the other PDLs laying around to see if I could find one example of specifying a character outright and I ran across this:

                field data = variable-array( not( ‘}’ ) );

                using that example you might try this

                define phrase basic-msg;

                 ;

                 field data = variable-array( not( ‘

                Russ Ross
                RussRoss318@gmail.com

              • #65958
                Kevan Riley
                Participant

                  Russ, you da’ man!  That worked.  It did not even occur to me to try and produce the “none-printable” character and use that, and I really had my doubts it would actually work in the pdl.  But it does!  the message looks great coming coming in and going out.  Thanks a bunch!  

                  Here is my code for the phrase definition:

                  define phrase basic-msg;

                     ;

                       field data = variable-array( not(‘

              Viewing 4 reply threads
              • The forum ‘Cloverleaf’ is closed to new topics and replies.