Re:Re: Get storage

  • 1.  Re:Re: Get storage

    Posted 07-23-2009 06:25 AM
    It may come to that. I'm not sure my assembler skills are up to it

    We have a situation here where user programs need to pass XML to and
    some common routines. The size of the XML can vary from a few hundred
    to infininitely large. We are currently using a work record for this
    purpose, which is the defined as the 32K (the maximum work record size).
    This is unsatisfactory for a couple of reasons:
    - All of the user programs have to allocate the 32K in their working
    storage which wastes a lot of space in many cases.
    - 32K is not enough in other cases. Some XML documents are so large
    it's not practical to try to fit them into pre-defined program storage.

    The XML parse and generate commands need to work on the entire XML
    at once. So we can't break it up into pieces, which rules out scratch
    queue records. Plus we need to keep it fairly simple, so as not put an
    undue burden on the programmers.

    With a pointer and a length, you can define the storage field as one
    byte in
    the linkage section, and manipulate the data using offsets. This works
    great with the XML parse command. I have done something similar in
    but I had access to the pointer and length values there. I don't here.

    I think an assembler program may be the only option. Other suggestions
    be more than welcome!