I can't answer that, the code is ftom Doug Nadel.
The SWA part is as follows:

GET_SWAREQ: Procedure Expose a.
  If Right(C2x(Arg(1)),1) <> 'F' Then /* SWA=BELOW ? */
      Return C2d(Arg(1)) + 16 /* YES, Return SVA+16 */
  sva = C2d(Arg(1)) /* CONVERT TO DECIMAL */
  tcb = PTR(540) /* TCB PSATOLD */
  jscb = PTR(tcb + 180) /* JSCB TCBJSCB */
  qmpl = PTR(jscb + 244) /* QMPL JSCBQMPI */
  qmat = PTR(qmpl + 24) /* QMAT QMADD */
  Do While sva > 65536
      qmat = PTR(qmat + 12) /* NEXT QMAT QMAT+12 */
      sva = sva - 65536 /* 010006F -> 000006F */
      End
END_GET_SWAREQ:
  Return PTR(qmat + sva + 1) + 16


Thomas


Den tors 22 aug. 2024 18:31Seymour J Metz <sme...@gmu.edu> skrev:

> Does it dual path the SWA? BPXWDYN takes care of all the housekeeping in
> every environment.
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
> עַם יִשְׂרָאֵל חַי
> נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר
>
> ________________________________________
> From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf
> of Thomas Berg <00000619bfe39560-dmarc-requ...@listserv.ua.edu>
> Sent: Thursday, August 22, 2024 10:31 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Simple Rexx question
>
> Hi,
>
> I have a rexx that extract info about allocations from current memory. I.
> e. it works outside TSO.  (I haven't used it in 8 years so YMMV...)
> If you are interested I can send it to you.
>
> Extract from desc text:
>
> /* REXX
> ------------------------------------------------------------------------
>  Name: EFQALLOC
>  Type: TSO REXX Function
>  Function: Returns information about current allocations.
>
>            Partially based on code stolen from Doug Nadel.
>
>  Syntax: EFQALLOC( < sel <, < options > <, output >>>)
>
>            sel Selection criteria in the form of a mask or a
>                     complete DD- or DSname.
>                     (If 'sel' is longer than 8 bytes or contains a '.'
>                      it is supposed it's a DSname else that it's a
>                      DDname.)
>            options Format or/and sort order of the result.
>                     Could be: SORT SORTDD SORTDS SORTVOL SORTFLAG DD DSN
>                       VOL FLAG ONLYDD ONLYDS ONLYVOL ODD ODS OVOL DELDUPL
>            output Indicates where the output should be sent.
>                     - If empty and 'sel' is specified with one distinct
>                     DDname it's returned as a result if called as a
>                     function or subroutine.
>                     - If 'RETURNVALUES' or an abbreviation thereof is
>                     specified it's returned as a result if called as a
>                     function or subroutine. In this case the resulting
>                     rows (if more than one) is delimited by ';' or as
>                     specified as a second parm after 'RETURNVALUES'.
>                     Example: res = EFQALLOC(,,'RETURN /')
>                     - Otherwise if empty or 'S' or 'STACK' or
>                     'DATASTACK' it's written to the datastack.
>                     - Otherwise if not empty it's written to that
>                     DDname, or if a DSname, to that DS.
>  Exempel: rcode = EFQALLOC('ISP*','SORT DD','SYSUT2')
>            rcode = EFQALLOC('ISPPROF')
>            rcode = EFQALLOC()
> ----------------------------------------------------------------------
>
>
>
> Availible info:
>
> Parse Value X2b(C2x(c)) With ,
>                 is 2 , /* DSABIS INDEXED SEQUENTIAL ORGANIZATION */
>                 ps 3 , /* DSABPS PHYSICAL SEQUENTIAL ORGANIZATION*/
>                 da 4 , /* DSABDA DIRECT ACCESS ORGANIZATION */
>                 cx 5 , /* DSABCX COMMUNICATIONS LINE GROUP */
>                 cq 6 , /* DSABCQ DIRECT ACCESS MESSAGE Queue */
>                 mq 7 , /* DSABMQ PROBLEM PROGRAM MESSAGE Queue */
>                 po 8 , /* DSABPO PARTITIONED ORGANIZATION */
>                 un 9 , /* DSABU UNMOVEABLE */
>                 gs 10 , /* DSABGS GRAPHICS ORGANIZATION */
>                 tx 11 , /* DSABTX TCAM LINE GROUP */
>                 tq 12 , /* DSABTQ TCAM MESSAGE Queue */
>                    13 , /* * */
>                 vs 14 , /* DSABAM VSAM */
>                 tr 15 , /* DSABTR TCAM 3705 */
>                 . 16 , /* * */
>                 . 17 , /* * */
>                 dy 18 , /* DSABDALC DYNAMICALLY ALLOCATED */
>                 pe 19 , /* DSABPALC PERMANENTLY ALLOCATED ATTRIBUTE */
>                 dv 20 , /* DSABDCNV DYNAMICALLY CONVERTED */
>                 cv 21 , /* DSABCONV CONVERTIBLE ATTRIBUTE */
>                 dc 22 , /* DSABDCAT DYNAMICALLY CONCATENATED */
>                 pc 23 , /* DSABPCAT PERMANENTLY CONCATENATED */
>                 gm 24 , /* DSABCATM CONCATENATED GROUP MEMBER */
>                 iu 25 , /* DSABNUSE IN-USE ATTRIBUTE */
>                 op 26 , /* DSABOPEN DATA SET HAS BEEN OPENED */
>                 rm 27 , /* DSABIRM D.S. REVERSED MERGED FOR INPUT */
>                 uc 28 , /* DSABUNAL UNALLOCATE When CLOSED */
>                 vl 29 , /* DSABVLF VIRTUAL LOOKASIDE FACILITY */
>                 ch 30 , /* DSABJCHG DSNAME OR VOLSER CHANGED IN */
>                 ni 31 , /* DSABNODI When = 1, no dataset integrity */
>                 . 32 , /* DSABATCT Use alternate TCTIOT offset */
>                 . 33 , /* * */
>                 df 34 , /* DSABDEFR DEFERRED MOUNTING */
>                 pa 35 , /* DSABPASS PASS/RETAIN IND */
>                 vi 36 , /* DSABVAM VIO DATA SET */
>                 vr 37 , /* DSABVMSC VIO PAGING SPACE RELEASED */
>                 ca 38 , /* DSABCATL DATA SET IS A CATALOG */
>                 js 39 , /* DSABJSCT JOBCAT OR STEPCAT DATA SET */
>                 vv 40 , /* DSABVVDS VVDS - ICF CATALOG */
>                 xt 41 , /* DSABTIOX DSAB HAS XTIOT ENTRY */
>                 cd 42 , /* DSABCKDS THIS IS A CHECKPT DATA SET */
>                 sv 43 , /* DSABCKVL VOLUME CONTAIN CKPT DS IS SECURE*/
>                 si 44 , /* DSABCKSI SECURITY INTERF. XIST F CKPT DS */
>                 hi 45 , /* DSABHIER HIERARCHICAL FILE INDICATOR */
>                 an 46 , /* DSABGANM ALTERNATE NAME SECTION GETMAINED*/
>                 la 47 , /* DSABLCAT LAST DATASET IN DD CONCATENATION*/
>                 . 48 , /* DSABAUCB Actual UCBs are to be used */
>                 . 49 . /* DSABCASL DSAB TO BE COPIED INTO
>
>
> Thomas
>
> Den ons 21 aug. 2024 21:28Billy Ashton <
> 00000665bda14df5-dmarc-requ...@listserv.ua.edu> skrev:
>
> > Hi all, I have a simple question, but my searches are eluding me (maybe
> > I don't know what to ask for).
> >
> > In my Rexx program, before I try to do an EXECIO against it, I want to
> > do something to make sure the DD statement is there and control the
> > error. I tried ListDSI, but that only works on DASD files and not on
> > instream (DD *) data.
> >
> > How can I test that I have the ABCXYZ DD statement allocated, if it is
> > DD * or DD DATA? Likewise, how can I test for DD JKLMNO that is
> > allocated to SYSOUT=* to be sure it is there (as I am writing via EXECIO
> > to it)?
> >
> > Thank you and best regards,
> > Billy Ashton
> >
> > ----------------------------------------------------------------------
> > 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
>
>
> ----------------------------------------------------------------------
> 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