View previous topic :: View next topic
|
Author |
Message |
mosinjamadar
New User
Joined: 26 Sep 2007 Posts: 42 Location: pune
|
|
|
|
Hi all
I am using below code to get data set name ie (flat fle or name of PDS)
for writing a macro but it is not working giving RC=20
Please help me out
/* REXX */
ADDRESS ISREDIT "MACRO PROCESS"
ADDRESS ISREDIT "(DATASET) = DATASET"
SAY 'LAST LINE' DATASET |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Works for me.
I'd like to see your runtime TRACE output. Although, I've noticed that the ISREDIT calls with give a RC=20 if the exec isn't run as a macro. |
|
Back to top |
|
|
mosinjamadar
New User
Joined: 26 Sep 2007 Posts: 42 Location: pune
|
|
|
|
below is my traced output ,I have even assigned PDS to SYSEXEC by executing another rexx code
/* REXX */
'ALLOC DA(''TAV.TAVMJJ.REXX'') F(SYSEXEC) SHR REUSE'
3 *-* ADDRESS ISREDIT "MACRO PROCESS"
>L> "MACRO PROCESS"
+++ RC(20) +++
4 *-* ADDRESS ISREDIT "(DATASET) = DATASET"
>L> "(DATASET) = DATASET"
+++ RC(20) +++
5 *-* SAY 'DATA SET NAME ' DATASET
>L> "DATA SET NAME "
>L> "DATASET"
>O> "DATA SET NAME DATASET"
DATA SET NAME DATASET
*** |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
line 3. syntax is incorrect for the MACRO keyword.
line 4. i doubt that you are in view or edit mode of a dataset |
|
Back to top |
|
|
mosinjamadar
New User
Joined: 26 Sep 2007 Posts: 42 Location: pune
|
|
|
|
HI all
Its working fine there was problem in Alloc command, thats why macro didnt work
but i want to know
Is there any specific reason why REXX/ISPF Macro dont work when my file or pDS member is in BROWSE mode if so please let me know
or anyother way we can run REXX/ISPF macro in browse mode
Regards |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
the answer is in he name, EDIT macros,
if they were supposed to work in browse they would be called BROWSE mcros |
|
Back to top |
|
|
mosinjamadar
New User
Joined: 26 Sep 2007 Posts: 42 Location: pune
|
|
|
|
but macro works in VIEW mode
thats why i was courious to know is there any other way or reason behind
not running in browse mode |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
to elucubrate on program behavior is simply a loss of time for everybody
a program behavior is what is BY DESIGN
&THINGY.macros are EDIT/VIEW macros BY DESIGN <full stop>
or ... because the manual says so
VIEW is 99% EDIT with save disabled |
|
Back to top |
|
|
|