View previous topic :: View next topic
|
Author |
Message |
oerdgie
New User
Joined: 22 Nov 2007 Posts: 64 Location: Germany
|
|
|
|
Hi Folks,
I like to call a REXX from ISPF member list panel.
The REXX need the dataset name of the pds (USERID.TEST.LIB).
Code: |
EDIT USERID.TEST.LIB
Command ===>
Name Prompt Size Created ...... ......
_________ #ENQ 21 2011/08/30
_________ #LISTDS 22 2011/06/28
_________ #V 10 2008/06/10
_________ ACC 2 2009/10/28
|
Do you have any ideas, how can I get the dataset name auf the pds in the REXX ?
Thanks in advance for help |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
This worked for me:
Code: |
/* rexx */
parse arg DSNAME
Say 'DSNAME=('DSNAME')'
exit |
|
|
Back to top |
|
|
RahulG31
Active User
Joined: 20 Dec 2014 Posts: 446 Location: USA
|
|
|
|
If I understand this correctly then you need the name of the PDS where your Rexx code resides. I was looking for the same thing on the internet and found this which gets you the PDS and member name:
Code: |
/* rexx */
PARSE SOURCE . . MEM DDNAME CHANCE .
IF CHANCE \= '?' THEN DO
SAY 'FIND ME HERE:'
SAY CHANCE'('MEM')'
EXIT
END
X=OUTTRAP('LISTA.')
"LISTA ST"
X=OUTTRAP('OFF')
DO I=1 TO LISTA.0
IF WORD(LISTA.I,1)=DDNAME THEN DO
IS=I-1
LEAVE
END
END
DO I=IS TO LISTA.0 BY 2
PATH=LISTA.I'('MEM')'
ANSWER=SYSDSN("'"PATH"'")
ANSWER=SYSDSN("'"PATH"'")
IF ANSWER='OK' THEN DO
SAY "I'M HERE! :)"
SAY PATH
LEAVE
END
END
|
|
|
Back to top |
|
|
RahulG31
Active User
Joined: 20 Dec 2014 Posts: 446 Location: USA
|
|
|
|
My previous post was a long code that I copied.
You may only need this code:
Code: |
/* rexx */
PARSE SOURCE . . MEM . CHANCE .
SAY CHANCE'('MEM')'
EXIT
END
|
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Quote: |
If I understand this correctly then you need the name of the PDS where your Rexx code resides |
That is not what the original poster asked for. He asked for the PDS name where the selected member resides. |
|
Back to top |
|
|
oerdgie
New User
Joined: 22 Nov 2007 Posts: 64 Location: Germany
|
|
|
|
Hi Folks,
I try to tell you, what I want exactly...
I like to call a REXX from the Command line in the member list.
The REXX has no input parameters.
The REXX should change all members in the member list by calling an edit macro, running a CHANG ALL command for each member.
For that, it's necessary to get a list of all members of the PDS.
For getting all member names of the PDS, I would use LMMLIST.
The LMMLIST needs a DATAID, im getting with LMINIT.
The LMINIT now needs the name of a library, exactly the name of the PDS, I'm looking for.
That's it...
Is there another way to change all members of a PDS via command line, with one command, please tell me.
Many thanks in advance
|
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
I might be missing something here, but why don't you just use the ISRMBRS macro? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Quote: |
I like to call a REXX from the Command line in the member list. |
Are you purposefully trying to make this hard? I do not believe there are any ISPF services that will work from the command line in the member list (1).
You can accomplish what you want from ISPF option 3.4. Get your data set to show in the list. Invoke your rexx exec as a line command from the data set list. Use PARSE ARG to get the name of the data set, as I posted earlier.
(1) you can use the ZSCREENI variable to get the currently shown screen image, which has the data set name in the title line. You have to figure out how to parse the data in the variable. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
Back to top |
|
|
oerdgie
New User
Joined: 22 Nov 2007 Posts: 64 Location: Germany
|
|
|
|
Oh, I didn't know the ISRMBRS Marco. Sounds deeply interesting...
But it's a good objection, why not invoke the REXX from shown 3.4 dataset list ? This solves my problem.
Sometimes things can be so easy...
Thank's very much all of you for help ! |
|
Back to top |
|
|
|