Getting dataset name



IBM's Command List programming language & Restructured Extended Executor

Getting dataset name

Postby Jeri Kattar » Wed Sep 19, 2007 6:47 pm

Hi,
When I am inside a member in a pds, i will be executing a REXX routine. This routine needs to get this member's name like 'SCLMTFS.PREP.SOURCE(one)' into a variable. But this name should not be got from user.Implicitly the varibale should get this name.

Pls help me in this asap.
Thanks in advance
Jeri Kattar
 
Posts: 10
Joined: Wed Sep 19, 2007 6:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Getting dataset name

Postby MrSpock » Wed Sep 19, 2007 8:03 pm

What do you mean by "inside a member in a pds"?

If you are Editing (or Viewing) a dataset or PDS with ISPF EDIT, then you can use an ISPF EDIT Macro to obtain the name of the dataset currently being edited.

If that's not the case, the REXX LISTDSI function (only available if you're running in a TSO/E environment) can resolve an allocated DDNAME to it's dataset name.
User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: Getting dataset name

Postby Jeri Kattar » Thu Sep 20, 2007 3:04 pm

Can u pls give me that ISPF EDIT macro syntax to identify the dataset name.
Jeri Kattar
 
Posts: 10
Joined: Wed Sep 19, 2007 6:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Getting dataset name

Postby MrSpock » Thu Sep 20, 2007 4:21 pm

3.3.21 DATASET--Query the Current and Original Data Set Names[b] from the z/OS V1R7.0 ISPF Edit and Edit Macros guide.

[b]3.3.53 MEMBER--Query the Current Member Name from the z/OS V1R7.0 ISPF Edit and Edit Macros guide.
User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: Getting dataset name

Postby Jeri Kattar » Thu Sep 20, 2007 6:43 pm

Hi,
I have used the following code to display the name of the dataset being viewed or edited. But only the word MEM is getting displayed instead of dataset name.
Please advise.

ADDRESS ISREDIT
"ISREDIT MACRO"
"ISREDIT(MEM) = DATASET"
SAY MEM
Jeri Kattar
 
Posts: 10
Joined: Wed Sep 19, 2007 6:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Getting dataset name

Postby MrSpock » Thu Sep 20, 2007 6:51 pm

Works for me. What does the TRACE show?
User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: Getting dataset name

Postby Jeri Kattar » Thu Sep 20, 2007 6:58 pm

There is no error. But only the word MEM is displayed not the dataset name.
When I am viewing a dataset 'SCLMTFS.PREP.SOURCE(ONE)', the dataset name must be displayed right.
But only the variable name is getting displayed.
Jeri Kattar
 
Posts: 10
Joined: Wed Sep 19, 2007 6:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Getting dataset name

Postby marso » Thu Sep 20, 2007 7:01 pm

I see you put no space between ISREDIT and (MEM). That may cause the problem.
Try also:
"ISREDIT MACRO"
"ISREDIT (PDSName,,) = DATASET"
"ISREDIT (Member) = MEMBER"

PDSName will have the dataset name and Member the member name...
The commas are not really necessary
I think "Address ISREDIT" is not necessary.
User avatar
marso
 
Posts: 12
Joined: Mon Jul 30, 2007 5:04 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Getting dataset name

Postby Jeri Kattar » Thu Sep 20, 2007 7:04 pm

Actually I am not getting any error. But when I try to display the variable value, I am not getting the dataset name.
Instead the variable name is displayed.
Jeri Kattar
 
Posts: 10
Joined: Wed Sep 19, 2007 6:37 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Getting dataset name

Postby Jeri Kattar » Fri Sep 21, 2007 7:11 pm

Hi,
Can anyone help me in this regards.
Jeri Kattar
 
Posts: 10
Joined: Wed Sep 19, 2007 6:37 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post