ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Suggestions

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

  • Suggestions

    Need some suggestions on how to solve this problem.

    I have a buffer that is 65535 characters long. It holds characters that will be parsed out in 102 record length. Therefore 102 * 642(messages) = 65484. I will have 51 characters left.

    My second buffer, which is the same size 65535 holds a continuing of the message. So the first 51 characters will be the last 51 characters of the new message. .

    What is the best way to program this.

    DAC.

  • #2
    Re: Suggestions

    Why not just shrink your buffer by 51 characters? Or only put 65484 into it. Just because the buffer is 65535 doesn't mean you HAVE to fill it.
    Your future President
    Bryce

    ---------------------------------------------
    http://www.bravobryce.com

    Comment


    • #3
      Re: Suggestions

      what i would do...(not that it's the best way...)
      define a field that is 102a that is based on a pointer:
      (untested)

      Code:
      dmyptr            s               *               
      dmyfld            s            102a   based(myptr)
      dmydata           s          65535a               
      dx                s             10i 0             
      dfldcount         s             10i 0             
       /free                                            
                                                        
         FldCount = %Size(mydata) / 102;                
         for x = 1 to fldcount;                         
          myptr = %Addr(mydata) * 1;                    
          // process the data in the myfld field        
          EndFor;
      I'm not anti-social, I just don't like people -Tommy Holden

      Comment

      Working...
      X