View previous topic :: View next topic
|
Author |
Message |
sakrat
Active User
Joined: 05 Feb 2014 Posts: 164 Location: India
|
|
|
|
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 |
|
|
Stefan
Active User
Joined: 12 Jan 2006 Posts: 110 Location: Germany
|
|
|
|
Read about the DATASET edit macro assignment statement in the Edit Macro Manual. |
|
Back to top |
|
|
sakrat
Active User
Joined: 05 Feb 2014 Posts: 164 Location: India
|
|
|
|
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 |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Show us the trace. |
|
Back to top |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
|
|
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 |
|
|
|