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
 

 

Extract PDS name from member list panel.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
Arun_scorpio

New User


Joined: 16 Oct 2009
Posts: 7
Location: India

PostPosted: Sat Oct 17, 2009 7:50 am    Post subject: Extract PDS name from member list panel.
Reply with quote

Hi,

I am trying to retrieve the currently opened PDS in a rexx program from the member list panel. I tried using ISREDIT macro. But the return code was 20 after the first line. Then i tried using parse source. I got '?' as the output. I have pasted the code below. Please let me know if I am doing anything wrong in it. I am pretty new to rexx.

/******REXX******/
"ISREDIT MACRO"
"ISREDIT PDS=DATASET"
SAY PDS
PARSE SOURCE A B C D E
SAY E
Back to top
View user's profile Send private message

Arun_scorpio

New User


Joined: 16 Oct 2009
Posts: 7
Location: India

PostPosted: Sat Oct 17, 2009 8:10 am    Post subject: Reply to: Extract PDS name from memberl list panel.
Reply with quote

I want to add on to the previous post. I executed the code using the syntax
tso findpds from the command line of the member list panel.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Sat Oct 17, 2009 9:30 am    Post subject: Reply to: Extract PDS name from memberl list panel.
Reply with quote

A few links to the appropriate structure for ISPF Macros:

Chapter 6. Creating Edit Macros:

Quote:

Edit macros are ISPF dialogs that run in the ISPF editor environment.

CLIST edit macros must be in partitioned data sets in at least one of these concatenations: SYSUPROC, ALTLIB (for data sets activated as CLISTs), or SYSPROC. Data sets in these concatenations can contain CLIST edit macros, REXX edit macros, or a combination of both. However, REXX edit macros in these concatenations must include a REXX comment line (/* REXX */) as the first line of each edit macro to distinguish them from CLIST edit macros. This comment line can contain other words or characters if necessary, but it must include the string REXX.

REXX edit macros must also be in partitioned data sets. Besides the concatenations in the previous list for CLIST edit macros, REXX edit macros can exist in these concatenations: SYSUEXEC, ALTLIB (for data sets activated as EXECs), and SYSEXEC. Data sets in these concatenations can contain only REXX EXECs.


Running Program Macros:

Quote:

The ISPF editor assumes that any unknown primary command is a macro, and it also assumes that the macro has been implemented as a CLIST or REXX exec.

If a macro named FINDIT is a CLIST or REXX exec macro, for example, you can run it by typing FINDIT on the command line and pressing Enter.


DATASET--Query the Current and Original Data Set Names:

Quote:

The DATASET assignment statement retrieves these items and places them in selected variables:

The name of the data set into which the data currently being edited will be stored

The name of the data set from which the data currently being edited originated

The library concatenation number of the originating data set

| The path name of the file (when editing a z/OS UNIX file)


Syntax

__ISREDIT__(var1,var2,var3)__ = __DATASET


var1
The name of a variable to contain the name of the data set currently being edited. The data set name is fully qualified without quotation marks (').

| When editing a z/OS UNIX file, the path name of the file.


var2
The name of a variable to contain the name of the data set where the data currently being edited originated from. The data set name is fully qualified without quotation marks ('). If the data currently being edited is new, a blank is returned in this variable. If the original data is deleted, the name of the data set where the data currently being edited originated from is still returned in this variable.

var3
The library concatenation number of the original data set. If the data currently being edited is new, zeros are returned.
Back to top
View user's profile Send private message
Arun_scorpio

New User


Joined: 16 Oct 2009
Posts: 7
Location: India

PostPosted: Mon Oct 19, 2009 10:53 am    Post subject: Reply to: Extract PDS name from member list panel.
Reply with quote

Hi Superk,

Thanks for the quick reply. I executed my rexx code during the edit session of a member by giving the program name as the command. I was able get the PDS name. But I want to retrieve the PDS name when i am in the member list panel (i.e after opening the PDS). For this, when i try to issue the same command , it says command not found error. does the edit macro work only during edit/view session of a member ? If yes, is there any other way I could get the PDS name from the member list panel.
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Mon Oct 19, 2009 11:40 am    Post subject: Reply to: Extract PDS name from member list panel.
Reply with quote

Haven't we already been through this in this previous topic?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Oct 20, 2009 8:07 pm    Post subject: Reply to: Extract PDS name from member list panel.
Reply with quote

Did you mean,"I want to pick up the current PDS name within the REXX you call from the command line"...if yes, check for ZSCREENI variable.
Back to top
View user's profile Send private message
Arun_scorpio

New User


Joined: 16 Oct 2009
Posts: 7
Location: India

PostPosted: Wed Oct 21, 2009 12:53 pm    Post subject: Reply to: Extract PDS name from member list panel.
Reply with quote

Superk,
Thanks again. I finalyy found what I have been searching this forum for past few days. Variable 'ZDLDSN' has the currently opened dataset name.

Anuj,
I displayed the variable 'ZSCREENI'. It displayed the entire screen. It is not what I had wanted. But it may come in handy. Thanks for your reply.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Wed Oct 21, 2009 6:32 pm    Post subject:
Reply with quote

ZDLxxxx variables are from option 3.4 data set list. Your solution will not work in other member lists like edit, browse, view, 3.1, etc.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2025
Location: Silicon Valley

PostPosted: Wed Oct 21, 2009 8:57 pm    Post subject: Reply to: Extract PDS name from member list panel.
Reply with quote

Quote:
I displayed the variable 'ZSCREENI'. ... It is not what I had wanted.


I think it is the best method to get the name from a member list. It should work from 3.4, edit, browse, 3.14, etc...
Back to top
View user's profile Send private message
Arun_scorpio

New User


Joined: 16 Oct 2009
Posts: 7
Location: India

PostPosted: Thu Oct 22, 2009 11:56 am    Post subject: Reply to: Extract PDS name from member list panel.
Reply with quote

I agree. But I needed the PDS name only during the member list panel. So instead of parsing the zscreeni variable, I could directly use ZDLDSN variable. Both are very good options. But it is the case of selecting one which is best for your requirement. icon_smile.gif
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 Oct 22, 2009 12:31 pm    Post subject:
Reply with quote

The only thing that I found using ZDLDSN was that when I access a dataset via an alias, it was the dataset alias which was displayed rather than the actual physical dataset name, where the physical dataset name was displayed using ZSCREENI.
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
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm


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