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

Getting Data set name


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

New User


Joined: 26 Sep 2007
Posts: 42
Location: pune

PostPosted: Thu Apr 02, 2009 6:01 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Apr 02, 2009 6:08 pm
Reply with quote

Works for me. icon_confused.gif

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
View user's profile Send private message
mosinjamadar

New User


Joined: 26 Sep 2007
Posts: 42
Location: pune

PostPosted: Thu Apr 02, 2009 6:21 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 02, 2009 6:28 pm
Reply with quote

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
View user's profile Send private message
mosinjamadar

New User


Joined: 26 Sep 2007
Posts: 42
Location: pune

PostPosted: Fri Apr 03, 2009 9:38 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Apr 03, 2009 9:52 am
Reply with quote

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
View user's profile Send private message
mosinjamadar

New User


Joined: 26 Sep 2007
Posts: 42
Location: pune

PostPosted: Fri Apr 03, 2009 11:24 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Apr 03, 2009 11:25 am
Reply with quote

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
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 Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
Search our Forums:

Back to Top