View previous topic :: View next topic
|
Author |
Message |
vvmanyam
New User
Joined: 16 Apr 2008 Posts: 86 Location: Bangalore
|
|
|
|
Hi friends
How to get the PDS name from which the rexx command is executed in the rexx program.
Say if we execute a rexx command from a
PDS mem: TEXT.DATASET(MEMBER)
I go in to that pds and give the command 'TSO TESTREX' on the command line.
Now how to extract the PDS name 'TEXT.DATASET(MEMBER)' in the TESTREX program.
Thanks,
Balu |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Take a look at PARSE SOURCE in the manual.
Search the forum for examples of the same question. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Maybe I'm interpreting this topic wrong, but from what I can see that won't work. I don't know of any way to tie the name of a dataset that you're currently "in" (your term. I presume that means that it's opened in an ISPF Browse/Edit/View session) to an exec running in the TSO/E address space.
In order to get the results that I believe you want, that exec is going to have to be included as part of an ISPF Edit macro, which will know both the name of the dataset and the member (if it's a PDS) that you currently have open. There are many examples of this posted here. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
As stated above
Code: |
/* REXX *** */
PARSE SOURCE . . C . E .
IF C <> '?'
THEN SAY 'YOU ARE EXECUTING ' E||'('||C||')'
ELSE SAY 'YOU ARE EXECUTING ' E |
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Code: |
Address ISREDIT "(DATASET) = DATASET"
Address ISREDIT "(MEMBER) = MEMBER" |
|
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
Figured you'd have to find the allocations so I did a google search for "rexx parse source ddname" and found this. It looks like what was asked for. Don't know if it works but it looks OK.
trivia: it looks like none of the solutions will work for execs compiled to link edited modules because parse source doesn't work the same from link edited module execs. |
|
Back to top |
|
|
vvmanyam
New User
Joined: 16 Apr 2008 Posts: 86 Location: Bangalore
|
|
|
|
I thnak all of you for your response
expat,
I have tried that by using 'PARSE SOURCE' but the soulution isn't working
'C' --> which is the member name is extracted properly
but the PDS name 'E' is only a question mark.
enrico-sorichetti,
Your solution is working perfectly
MBabu:
I have tried the solution in the link provided. It is too big and looks too complicated. But I just tried to exectue and surprisingly its working
Any how my problem is solved, thanks again
Regrads,
Balu |
|
Back to top |
|
|
|