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
 

 

Getting Data set name

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Getting Data set name
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

Moderator Team Head


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

PostPosted: Thu Apr 02, 2009 6:08 pm    Post subject: Reply to: getting Data set name
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    Post subject: Reply to: getting Data set name
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: 6968
Location: porcelain throne

PostPosted: Thu Apr 02, 2009 6:28 pm    Post subject:
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    Post subject: Reply to: Getting Data set name
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10277
Location: italy

PostPosted: Fri Apr 03, 2009 9:52 am    Post subject: Reply to: Getting Data set name
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    Post subject: Reply to: Getting Data set name
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10277
Location: italy

PostPosted: Fri Apr 03, 2009 11:25 am    Post subject: Reply to: Getting Data set name
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    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 Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 11 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm


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