Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How can the rexx being executed get the name of its rexxlib?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
Lesage Francois

New User


Joined: 30 May 2007
Posts: 1
Location: Luxembourg

PostPosted: Wed Jun 06, 2007 4:52 am    Post subject: How can the rexx being executed get the name of its rexxlib?
Reply with quote

Hello,
My Rexx command will be stored (of course) into one of the pds that are allocated in TSO/ISPF to SYSPROC.

I want my REXX to get the name of the particular PDS that it comes from.
I couldn't find a system variable giving it. Is there a service or a command to get this info ?

if someone could give me a clue.. It would be great.
Fran?ois
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jun 06, 2007 5:16 am    Post subject:
Reply with quote

Hello and welcome to the forums,

You might look into ISRDDN - which will find which library(ies) a specified member is in. I'm not sure if this can be invoked via REXX. . .

I've always used if via command line (TSO ISRDDN) which brings up a menu and selections are made from there. I recall being able to include parameter data with the command, but it has been long enough that i don't recall the specifics.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Wed Jun 06, 2007 9:18 am    Post subject: Re: How can the rexx being executed get the name of its rexx
Reply with quote

I did some searching because I know I've seen this question before. I found the topic on some other sites, but none that offered a valid suggestion other than chasing after system control blocks.

The only thing I can think of is to find all of the datasets that are allocated to SYSPROC, then find the one(s) that contains the member name that is being executed. Unfortunately, this method wouldn't be able to account for the same member being present in multiple PDS's.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Jun 06, 2007 10:58 am    Post subject:
Reply with quote

Try PARSE SOURCE.

O.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Wed Jun 06, 2007 11:43 pm    Post subject: Re: How can the rexx being executed get the name of its rexx
Reply with quote

Something like this, perhaps?

Code:

/* REXX */                                           
Parse Source . . execname ddname .                   
Parse Value "" With dsnstr ln. start. end. ddn. ml. 
Parse Value "0 0 0 0" With ddnx ddn# dsnx  .         
                                                     
x = Outtrap("ln.")                                   
"LISTA STATUS"                                       
x = Outtrap("Off")                                   
                                                     
                                               
Do trapx = 1 To ln.0                           
  If Left(ln.trapx,1) <> "" Then Iterate       
  If Substr(ln.trapx,3,1) <> " " Then           
    Do                                         
      ddn#       = ddn# + 1                     
      ddn.ddn#   = Word(ln.trapx,1)             
      start.ddn# = trapx - 1                   
      end.ddn#   = trapx - 1                   
    End                                         
  Else If Left(ln.trapx,1) = " " Then           
    Do                                         
      end.ddn#   = trapx - 1                   
    End                                         
End                                             

Do ddnx = 1 To ddn#                                             
  If Wordpos(ddn.ddnx,ddname) > 0 | ddname = "" Then             
    Do dsnx = start.ddnx To end.ddnx By 2                       
      dsnstr = dsnstr ln.dsnx                                   
      x = Outtrap("ml.")                                         
      "LISTDS '"ln.dsnx"' MEMBERS"                               
      x = Outtrap("Off")                                         
      Do n = 7 To ml.0                                           
        ml.n = Space(ml.n,0)                                     
        If execname = ml.n Then Say execname "is in '"ln.dsnx"'"
      End                                                       
    End                                                         
End                                                             
Exit 0                                                           
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us