Extract PDS/Member name



IBM's Command List programming language & Restructured Extended Executor

Extract PDS/Member name

Postby gyannitin » Fri Jan 25, 2013 11:29 pm

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')
gyannitin
 
Posts: 2
Joined: Fri Jan 25, 2013 11:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Extract PDS/Member name

Postby MrSpock » Fri Jan 25, 2013 11:41 pm

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"?
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: Extract PDS/Member name

Postby gyannitin » Fri Jan 25, 2013 11:49 pm

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.
gyannitin
 
Posts: 2
Joined: Fri Jan 25, 2013 11:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Extract PDS/Member name

Postby Pedro » Sat Jan 26, 2013 2:29 am

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.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post