× 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: Re: Basing Pointers
  • From: leif@xxxxxxx
  • Date: Wed, 19 May 1999 19:43:06 -0500

> leif@ibm.net wrote:
>
> >could someone define for me what 'basing pointers' might mean then?
>
> A basing pointer holds the address of a based data structure or standalone
> field. By changing the address stored in the pointer the based data
structure
> can be relocated within the program's storage. This makes it both simpler
and
> more efficient to process lists of data in storage.

Yeah, that is what I thought too. Somebody in this list categorically
stated that it could not be done, not even in MI.
Below is the standard way of doing I/O in MI using the SEPT.
Note how the ADDSPP instruction modifies the basing pointer:


DCL SPC PROCESS-COMM-AREA  BASPCO;
    DCL SPCPTR PCO-POINTER DIR;

DCL SPC SYSTEM-ENTRY-POINT-TABLE BAS(PCO-POINTER);
    DCL SPCPTR .SEPT(2040) DIR;

DCL CON OPEN-ENTRY BIN(2) INIT(12);
DCL CON CLOS-ENTRY BIN(2) INIT(11);

DCL DD UFCB CHAR(214) BDRY(16);
DCL SPCPTR .UFCB INIT(UFCB);

DCL SPC ODP BAS(.ODP);
    DCL DD *          CHAR(16) DIR;
    DCL DD DEV-OFFSET BIN ( 4) DIR;

DCL SPCPTR .DMDEV;
DCL SPC FUNCTION-LIST BAS(.DMDEV);
    DCL DD MAX-DEVICE      BIN ( 2) DIR;
    DCL DD NBR-DEVICES     BIN ( 2) DIR;
    DCL DD DEVICE-NAME     CHAR(10) DIR;
    DCL DD WORKAREA-OFFSET BIN ( 4) DIR;
    DCL DD WORKAREA-LENGTH BIN ( 4) DIR;
    DCL DD LUD-PTR-INDEX   BIN ( 2) DIR;

    DCL DD GET-FCT         BIN ( 2) DIR;
    DCL DD GET-DIR         BIN ( 2) DIR;
    DCL DD GET-KEY         BIN ( 2) DIR;
    DCL DD *               BIN ( 2) DIR;
    DCL DD PUT-FCT         BIN ( 2) DIR;
    DCL DD PUT-GET         BIN ( 2) DIR;
    DCL DD UPD-FCT         BIN ( 2) DIR;
    DCL DD DEL-FCT         BIN ( 2) DIR;
    DCL DD FORCE-EOD       BIN ( 2) DIR;
    DCL DD FORCE-EOV       BIN ( 2) DIR;
    DCL DD *               BIN ( 2) DIR;
    DCL DD *               BIN ( 2) DIR;
    DCL DD REL-LOCK        BIN ( 2) DIR;
    DCL DD *               BIN ( 2) DIR;
    DCL DD *               BIN ( 2) DIR;
    DCL DD *               BIN ( 2) DIR;
    DCL DD CLOSE-FCT       BIN ( 2) DIR;
    DCL DD OPEN-FCT        BIN ( 2) DIR;
    DCL DD *               BIN ( 2) DIR;

/* ------------------------------------------------------- */
    CALLX       .SEPT(OPEN-ENTRY), OPEN, *;
    ADDSPP      .DMDEV, .ODP, DEV-OFFSET;
    CALLX       .SEPT(PUT-FCT), PUT, *;



+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.