× 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.


  • Subject: an introduction to MI by example II part B
  • From: Gene Gaunt <issgg@xxxxxxx>
  • Date: Tue, 16 Nov 1999 21:22:55 -0700

Well if this is a small-size race (just for fun), here's my entry to get the 
caller's library name.

dcl spcptr ?Library    parm;
dcl dd     Library     bas(?Library) char(10);
dcl ol     MainList    (?Library) parm ext min(1);
dcl spcptr ?Mat        auto init(Mat);
dcl dd     Mat         auto char(12816) bdry(16);
dcl dd     MatSize     def(Mat) pos(1) bin(4) init(12816);
dcl dd     Level       def(Mat) pos(9) bin(4);
dcl dd     Item(2:101) def(Mat) pos(17) char(128);
dcl sysptr ?Pgm(2:101) def(Item) pos(33) aeo(128);

-- return library name of caller

entry     Main (MainList) ext;   -- start here
matinvs   ?Mat, *;               -- get call stack
matptr    ?Mat, ?Pgm(Level);     -- get pointer info
cybla     Library, Mat(12:10);   -- extract library
pend;                            -- implicit RTX

+---
| This is the MI Programmers Mailing List!
| To submit a new message, send your mail to MI400@midrange.com.
| To subscribe to this list send email to MI400-SUB@midrange.com.
| To unsubscribe from this list send email to MI400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: dr2@cssas400.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.