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: 662
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: 2033
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 JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


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