There's a TSO/E vector table that has the address of the REXX routines.

 // get the address of the TSO/e vector table
 CVT  * cvt  = *(( CVT ** ) CVTPTR);
 TSVT * tsvt = cvt->cvttvt;


// IKJTSVT.H  - TSO/E Vector Table mapping
//
// Contains addresses of branch entered routines and control blocks.
//
??=ifdef __COMPILER_VER__
  ??=pragma filetag("IBM-1047")
??=endif

#ifndef TSVT_H

  #define TSVT_H

#ifdef __cplusplus
  extern "C" {
#endif

  #pragma pack(1)

#ifdef __cplusplus
  extern "OS_UPSTACK" {
#else
  #pragma linkage(tsvt_rexxfunc_t,OS_UPSTACK)
#endif

  typedef int tsvt_rexxfunc_t( char *, ... );

#ifdef __cplusplus
  }
#endif

#ifdef __cplusplus
  extern "OS_UPSTACK" {
#else
  #pragma linkage(tsvt_irxterm_t,OS_UPSTACK)
#endif

  typedef int tsvt_irxterm_t();

#ifdef __cplusplus
  }
#endif

  typedef struct tsvt TSVT;

  struct tsvt {
    char   tsvttsvt[4]; // acronym in EBCDIC 'TSVT'
    char   tsvtlev;     // TSVT version
    char   tsvtflg1;    // flag indicators
    char   tsvtrsv1[2]; // reserved
    void * tsvtnct;     // address of the most current notice
    void * tsvtvacc;    // address of the CLIST variable access routine
    void * tsvtasf;     // address of the authorized service
    void * tsvtltbl;    // address of logon address table
    void * tsvtfla1;    // address of logon initialization
    void * tsvtctio;    // address of CLIST I/O LAR
    void * tsvtctab;    // address of load module containing
    void * tsvtt440;    // address of CLIST variable access
    void * tsvtt441;    // address of general variable access
    void * tsvtputl;    // address of PUTLINE routine
    void * tsvtptgt;    // address of PUTGET  routine
    void * tsvtgetl;    // address of GETLINE routine
    void * tsvtstck;    // address of STACK   routine
    void * tsvttsl;     // address of TMP LAR
    void * tsvtscan;    // address of scan routine
    void * tsvtpars;    // address of parse routine
    void * tsvtef02;    // address of message writer routine
    void * tsvttpvt;    // address of TPVT
    void * tsvtrcvy;    // address of recovery routine ikjcmdrc
    void * tsvttran;    // IKJTRANS
    char   tsvtbcmt[8]; // member token for broadcast notice XCF group
    void * tsvtcaf;     // clist attention facility addr rel 3
    struct {
      char  tsvtlver;    //- VERSIONLEVEL
      char  tsvtlrel[2]; //- RELEASE NUMBER
      char  tsvtlmod;    //- MODIFICATION LEVEL
      } tsvttsol;
    void *tsvtctdb;  // ADDRESS OF DOUBLE BYTE CHAR ROUTINE
    void *tsvtrif;   // BROADCAST DATA SET INTERFACE
    void *tsvtraf;   // LOGON RACF SUPPORT ROUTINE ADDRESS
    void *tsvtrtrp;  // TSO ROUTER ADDRESS
    void *tsvttbls;  // ADDRESS OF TABLE LOOK UP SERVICE
    void *tsvtadtb;  // ADDRESS OF ALTLIB
    void *tsvttblr;  // ADDRESS OF TABLE LOOKUP SERVICE RTN

    tsvt_rexxfunc_t *irxestk1; // Address of IRXESTK1
    tsvt_rexxfunc_t *irxtvars; // Address of IRXTVARS
    tsvt_rexxfunc_t *irxinit;  // Address of IRXINIT
    tsvt_rexxfunc_t *irxiolar; // Address of IRXIOLAR
    tsvt_rexxfunc_t *irxsto00; // Address of IRXSTO00

    void * ikjct44x;  // Address of IKJCT44X
    void * ikjefts2;  // Address of IKJEFTS2

    tsvt_rexxfunc_t *irxexec;  // Address of IRXEXEC
    tsvt_rexxfunc_t *irxinout; // Address of IRXINOUT
    tsvt_rexxfunc_t *irxload;  // Address of IRXLOAD
    tsvt_irxterm_t  *irxterm;
    tsvt_rexxfunc_t *irxsubcm; // Address of IRXSUBCM
    tsvt_rexxfunc_t *irxmsgid; // Address of IRXMSGID
    tsvt_rexxfunc_t *irxexcom; // Address of IRXEXCOM
    tsvt_rexxfunc_t *irxterma; // Address of IRXTERMA

    void * tsvtetvp;  // Address of Exit & Vector Table
    void * tsvttsfi;  // Address of IKJEFTSI
    void * tsvttsft;  // Address of IKJEFTST
    int    tsvtpcn1;  // PC number for IKJPCENV
    void * tsvtsnta;  // System copy of the SNTAB
    void * tsvtsvta;  // System copy of the SVTAB
    int    tsvtsyml;  // Length of system SNTAB and SVTAB
    int    tsvtxcfu;  // Lock for parmlib updating
    void * tsvtmstr;  // Address of Master ASCB
    int    tsvtbecb;  // ECB for IKJBCMSG
    void * tsvtappc;  // Addr of APPC callable service table
    void * tsvturps;  // Address of IKJURPS module
    int    tsvtpcn2;  // PC number for IKJCMDPC
    void * tsvtmsr0;  // Address of IKJMSR0 module
    void * tsvtmdt_;  // Address of module table
    int    tsvtsecb;  // ECB for broadcast switches
    void * tsvtswas;  // Address of ASCB for address space
    void * tsvtswwa;  // Address of switch processing work area
    void * tsvtswcb;  // Address of switch control block
    int    _filler1[7]; // Reserved
    double tsvtend;     // ASSURE TSVT ENDS ON DOUBLE WORD
    };

  // Values for field "tsvtend" */
  #define TSVERETR 1    // RETURN VARIABLE VALUE
  #define TSVEUPDT 2    // UPDATE VARIABLE
  #define TSVELOC  3    // LOCATE / LOCATE NEXT
  #define TSVERSVD 4    // RESERVED
  #define TSVNOIMP 18   // NO IMPLICIT                  @ZA87430
  #define TSVROK   0    // EVERY THING OK
  #define TSVRNORS 4    // VARIABLE RETURNED SHOULDN'T
  #define TSVREVAL 8    // VARIABLE RETURNED REQUIRES
  #define TSVRLAB  12   // VARIABLE RETURNED IS A
  #define TSVRNAUP 16   // SYSTEM VARIABLE - CAN'T BE
  #define TSVRNOM  20   // FOR LOCATE - NO VARIABLE
  #define TSVRPROC 24   // VARIABLE RETURNED IS A PROCEDURE
  #define TSVRSVD2 30   // RESERVED                     @E21D2G9
  #define TSVRGETF 32   // GETMAIN/FREEMAIN FAILURE
  #define TSVRNSIZ 36   // SYMBOL NAME TOO LARGE
  #define TSVRENV  40   // INCORRECT ENVIRONMENT
  #define TSVRPARM 44   // INVALID ENTRY CODE
  #define TSVRDUP  48   // DUPLICATE SYMBOL FOUND
  #define TSVRUNDF 52   // UNDEFINED VARIABLE
  #define TSVRGLER 56   // TOO MANY GLOBAL VARIABLES
  #define TSVRUNDG 60   // UNDEFINED GLOBAL VARIABLE
  #define TSVRINVR 64   // VARIABLE NOT VALID AS A CALL BY
  #define TSVRUNDR 68   // UNDEFINED CALL BY REFERENCE VARIABLE
  #define TSVIREXX 80   // VARIABLE NAME IS NOT VALID FOR REXX
  #define TSVREXXE 81   // AN UNEXPECTED RETURN CODE WAS
  #define TSVTNCTU 0x80 // Instorage copy of system notices
  #define TSVTNETL 0x40 // None of the TSO/E Exits
  #define TSVTUPDP 0x20 // IKJBCMSG posted for parmlib update
  #define TSVTSWCH 0x10 // IKJBCMSG posted to switch the

  #pragma pack(reset)

#ifdef __cplusplus
  }
#endif

On Thu, Nov 16, 2023 at 10:55 AM Charles Mills <charl...@mcn.org> wrote:

> > There isn’t an R0 issue. IRXINIT(‘FINDENVB’) will fetch the environment
> block.
>
> IIRC I needed the entry R0 to get the address of IRXINIT so I could call
> it.
>
> Charles
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to