Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Capture current PDS in Rexx code

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
sakrat

Active User


Joined: 05 Feb 2014
Posts: 159
Location: India

PostPosted: Wed Apr 23, 2014 12:28 pm    Post subject: Capture current PDS in Rexx code
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    Post subject:
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: 159
Location: India

PostPosted: Wed Apr 23, 2014 5:12 pm    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Wed Apr 23, 2014 5:58 pm    Post subject:
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

Senior Member


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

PostPosted: Wed Apr 23, 2014 6:29 pm    Post subject: Reply to: Capture current PDS in Rexx code
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us