× 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: Hooking display file I/O
  • From: "Steve Richter" <srichter@xxxxxxxxxxxxx>
  • Date: Sun, 5 Aug 2001 22:23:53 -0400

Leif,

I respect your technical knowledge and appreciate the work that you do very
much, but your coding style ... , well I hope you dont mind if I post my
version of what you just posted <g>

/* spcptr to the sept.  */
DCL SPCPTR pSept  BASPCO POS(1) ;

/* The array of system pointers that reside in the Sept.  */
DCL SYSPTR SeptPtrs(1000)  BAS( pSept ) ;

/* redefine the array of sysptrs as a char(16000) fld   */
DCL DD SeptContents CHAR(16000) BAS(pSept) ;

/* char fld within auto storage of this pgm, that for demo purposes, the */
/* ptrs from the ibm sept will be copied to.     */
DCL DD YourSeptContents CHAR(16000) AUTO BDRY(16) ;

/* redefine your copy of the sept ptrs as an array of system pointers.  */
DCL SYSPTR YourSeptPtrs(1000) DEF(YourSeptContents) ;

/* Copy the ptrs from the ibm sept to your fld in the auto storage of this
pgm. */
CPYBWP  YourSeptContents, SeptContents ;

/* chg the pco sept ptr. Make it point to your auto storage copy of the
sept. */
SETSPP pSept, YourSeptContents ;

/* from this point on, all system calls that run thru the sept will
reference the system */
/* ptrs in your copy of the sept, not the ibm sept. ( in your job only )  */

/* return from this pgm.  */
RTX  * ;

/* your job bombs <g>  */


some notes:

If you think of the Sept as a usrspc that contains system pointers to
commonly called system pgms, you are not far from the truth.

If you think of the pco ( process control object ) as just like the lda,
you are also not far from the truth.

Your job will bomb after the RTX stmt is executed, because the sept ptr in
the pco of your job, which was set to your copy of the sept in the auto
storage of the pgm, will point to garbage as soon as that auto storage space
is reused by the next pgm that your job calls.

A more lasting affect can be had by copying the sept contents into a usrspc
in say the qtemp of your job. The pointers in that sept will then last for
as long as the job itself.

Any volunteers? <g>

My technical questions:

Does this work on v5r1?

Does it work at security level 50?

Steve Richter



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