IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Capture current PDS in Rexx code


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sakrat

Active User


Joined: 05 Feb 2014
Posts: 164
Location: India

PostPosted: Wed Apr 23, 2014 12:28 pm
Reply with quote

Hi All,
I wanna capture current PDS name in my rexx macro code.

Suppose if i execute my macro (DELSTP) in command line after opening the PDS in edit mode, that PDS name should be captured in my DELSTP macro code, where further i will be using it for executing the macros in all the members present in the PDS.

Please guide me with some suggesstions.....
Back to top
View user's profile Send private message
Stefan

Active User


Joined: 12 Jan 2006
Posts: 110
Location: Germany

PostPosted: Wed Apr 23, 2014 1:08 pm
Reply with quote

Read about the DATASET edit macro assignment statement in the Edit Macro Manual.
Back to top
View user's profile Send private message
sakrat

Active User


Joined: 05 Feb 2014
Posts: 164
Location: India

PostPosted: Wed Apr 23, 2014 5:12 pm
Reply with quote

Stefan wrote:
Read about the DATASET edit macro assignment statement in the Edit Macro Manual.



Hi,
I tried based on the syntax provided in the manual but i dont get the dataset.
here is my code below. Can you please check and tell and me if there is any wrong in this code.
Code:

/* REXX */
TRACE (?R)
"ISREDIT MACRO"
"ISREDIT (R1,R2) = DATASET"
SAY "THE NAME OF THE DATASET IS:" R1
SAY "IF THIS DATASET NAME:" R2
"ISREDIT END"
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Wed Apr 23, 2014 5:58 pm
Reply with quote

How are you invoking your macro?

What exactly are you typing on the command line?

This code has worked for me for many years:

Code:
/*-----------------------------------------------------*/
/*  FIND THE DATASET & MEMBER NAME OF CURRENT DATASET  */
/*-----------------------------------------------------*/
"ISREDIT (DATA1) = DATASET"
"ISREDIT (MEM1) = MEMBER"
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Wed Apr 23, 2014 6:29 pm
Reply with quote

Show us the trace.
Back to top
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Thu Apr 24, 2014 12:10 pm
Reply with quote

As suggested by Dave, the error might be with how you invoke your macro.
Edit macros will not give desired results if you run them as normal REXX codes using EX.
You need to copy your macro to SYSEXEC/SYSPROC library, and type the name of your macro in the command line after opening a file or member in EDIT or VIEW mode.
Hope this helps.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top