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: 4648
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: 6967
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: 10256
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: 10256
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 Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm


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