Page 1 of 1

Extract PDS/Member name

PostPosted: Fri Jan 25, 2013 11:29 pm
by gyannitin
Hi all,

I need to extract the name of the PDS/member from where a REXX module is executed.

Suppose my REXX module 'A' is present in the PDS 'B'.
I am currently viewing a member C whose PDS is 'D'. When I type 'Exec A' in the command line, my REXX program should be executed and it should display the name of the PDS ( that is 'D' here) and member name (that is 'C')

Re: Extract PDS/Member name

PostPosted: Fri Jan 25, 2013 11:41 pm
by MrSpock
Huh? You said:

I need to extract the name of the PDS/member from where a REXX module is executed.


so wouldn't that mean for your example that the result would be the PDS "B" and the member "A"?

Re: Extract PDS/Member name

PostPosted: Fri Jan 25, 2013 11:49 pm
by gyannitin
Nop. Output should be PDS 'D' and member 'C'. Actually I want to execute a Rexx tool on a member. Suppose I have a PS and I want to extract records starting with digit 01. For this I want to open the PS and in the command line type 'EXEC A'. My REXX program 'A' should have that code snippet that will automatically take the PS/PDS/Mem name from where this prog is called/executed.

I hope its not confusing.
All I want is not to hardcode the Filenames in the REXX.

Thanks.

Re: Extract PDS/Member name

PostPosted: Sat Jan 26, 2013 2:29 am
by Pedro
This is a technical forum. Please strive to be more explicit in stating your situation.

Most people would interpret this:
I need to extract the name of the PDS/member from where a REXX module is executed.

as the PDS name containing the rexx exec.

But apparently what you mean is:
I need to extract the name of the PDS/member being edited.


The environment is important...
I want to open the PS

probably means:
I want to view or edit the PS with the ISPF editor.


regarding:
in the command line type 'EXEC A'.

If I can convince you to just type A in the command line, rather than 'EXEC A', then you should write your exec as an ISPF editor macro.
Look at the ISPF Edit and Edit Macros manual to see how editor macros are written.