Re:Re: Get storage

Discussion created by ca.portal.admin on Jul 23, 2009
It may come to that. I'm not sure my assembler skills are up to it though.

We have a situation here where user programs need to pass XML to and from
some common routines. The size of the XML can vary from a few hundred bytes
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 that
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 document
at once. So we can't break it up into pieces, which rules out scratch and
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 CICS,
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 will
be more than welcome!