IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Extract PDS name from ISREDIT


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Thu Mar 05, 2009 7:20 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Mar 05, 2009 7:51 pm
Reply with quote

Take a look at PARSE SOURCE in the manual.

Search the forum for examples of the same question.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Mar 05, 2009 8:05 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Mar 05, 2009 8:17 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Mar 05, 2009 9:21 pm
Reply with quote

Code:
Address ISREDIT "(DATASET) = DATASET"
Address ISREDIT "(MEMBER)  = MEMBER"
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Thu Mar 05, 2009 11:24 pm
Reply with quote

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
View user's profile Send private message
vvmanyam

New User


Joined: 16 Apr 2008
Posts: 86
Location: Bangalore

PostPosted: Fri Mar 06, 2009 10:27 am
Reply with quote

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 icon_biggrin.gif

Any how my problem is solved, thanks again

Regrads,
Balu
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts optim extract file - SAS DB2 2
No new posts How to extract the data for current y... DFSORT/ICETOOL 8
No new posts Extract record using 2 input file int... JCL & VSAM 2
Search our Forums:

Back to Top