× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



There is a problem. The user space can only be 16MB and if the data from the
system API calls exceeds that is blows up with a mysterious error. Took days
for IBM to finally come back to me and say what the problem was. This is
only a problem is you have a bunch of programs in a library (who doesn't).

My solution was to loop through creating a generic name starting with AAA,
AAB, AAC, etc all the way though all the combinations so I only got a subset
of each program.

I much prefer doing system Api's in ILE/RPG. I have access to pointer math
which makes processing the user spaces easy and code is so much easier to
read.

On Thu, Mar 31, 2011 at 4:38 PM, James Lampert <jamesl@xxxxxxxxxxxxxxxxx>wrote:

Thanks for the suggestions, and for letting me know early-on, that there
wasn't anything out there I was missing, that would have been easier
than what I ended up doing.

I came up with something. And managed to do it all in a single OPM CL pgm.

First, I call QCLRPGMI, on the off-chance that it's an OPM program. If
the source information is nonblank, I'm done.

If it's blank, then I create a user space in QTEMP (it's remarkable how
callable system APIs are from CL!), then I call QBNLPGMI, pouring into
that user space.

Then I call QUSRTVUS of 4 bytes at position x'0000007D' (7C + 1), add 1
to the 4-byte binary value I find there (that "%BIN"
function/pseudovariable is remarkably useful), do another QUSRTVUS at
that position (with a length of x'00000046') and pull the source
information from the first module (given that any additional modules in
the programs we're interested in would have been pulled in from a
binding directory listed on an H-spec, we can be reasonably sure that
the entry-point module is the first one linked, and since they're
guaranteed to be returned in the order linked, we know it's the one we
want).

--
JHHL
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.