Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Extract PDS name from ISREDIT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Extract PDS name from ISREDIT
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: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 05, 2009 7:51 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Thu Mar 05, 2009 8:05 pm    Post subject: Reply to: Extract PDS name from ISREDIT
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: 8593
Location: Back in jolly old England

PostPosted: Thu Mar 05, 2009 8:17 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Thu Mar 05, 2009 9:21 pm    Post subject: Reply to: Extract PDS name from ISREDIT
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: 401
Location: Mumbai

PostPosted: Thu Mar 05, 2009 11:24 pm    Post subject: Reply to: Extract PDS name from ISREDIT
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Spool Extract for Z /os 1.04 version Khadhar Basha CLIST & REXX 3 Thu Sep 28, 2017 3:14 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Extract Data till prev hour balaji81_k DB2 16 Fri Aug 25, 2017 9:25 pm
No new posts ISREDIT MACRO NOT WORKING! :cry: kirank889 TSO/ISPF 3 Thu Aug 03, 2017 5:46 pm
No new posts What is the Extract Function in JCL dharmaraok JCL & VSAM 3 Wed Jun 14, 2017 9:12 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us