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
 

 

How to make a macro work in TSO environment

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 159
Location: Chennai

PostPosted: Thu Sep 15, 2011 9:55 am    Post subject: How to make a macro work in TSO environment
Reply with quote

I have a macro
Code:

/* EDIT MACRO */                                             
"ISREDIT MACRO"                                             
"ISREDIT (DataSet) = DATASET"                               
"ISREDIT (Member)  = MEMBER"                                 

DataSet="'"||DataSet||"'"                                   
IF Member = '' THEN                                         
   "ISREDIT replace .zf .zl "DataSet                         
ELSE                                                         
   "ISREDIT replace .zf .zl "Member


How do i make it work in TSO environment, i.e in the command line if i type 'vsave' this macro should be executed.

Regards,
Magesh
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Thu Sep 15, 2011 10:16 am    Post subject:
Reply with quote

Do exactly as you describe. And why bother with such a macro? Using the SAVE command is quicker and more efficient.
Back to top
View user's profile Send private message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 159
Location: Chennai

PostPosted: Thu Sep 15, 2011 10:31 am    Post subject:
Reply with quote

Incase if i open a file in view mode, i need to type repl .zf .zl filename to save it, I belive this code help me in doing this, i.e If i type VSAVE in command line,it should save it in view mode. But when i try using this VSAVE, it is not working i.e if i open a file in view mode, in the command line if i type VSAVE , it says invalid command. How do i make this VSAVE command valid. in other way VSAVE should save the file in view mode.

Regards,
Magesh
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Sep 15, 2011 10:46 am    Post subject:
Reply with quote

Quote:
it says invalid command.


your edit macro is not in a designated sysexec library.
also, could use the /*REXX*/ as first line. the comment that you have is really not necessary.

invoke isrddn to determine the library.
or listalc
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Sep 15, 2011 11:00 am    Post subject:
Reply with quote

and ispf edit macros run in ispf, not tso.
ispf runs in tso.

get you facts straight, and learn about and understand your environment.
Back to top
View user's profile Send private message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 159
Location: Chennai

PostPosted: Thu Sep 15, 2011 11:02 am    Post subject:
Reply with quote

Thanks for kind respond,How do i get SYSEXEC library, where can i find it.

Could to please give me with syntax or an example
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Sep 15, 2011 11:06 am    Post subject:
Reply with quote

yes, yes, yes, in VIEW mode you need to use the REPLACE command.

stop trying to sound so technically correct when you have no idea what is really going on.

serves you right for copying something you found
and thinking it is slick to use this,
without knowing enough about your environment to properly implement it.

and in reponse to your last question,
i gave you the answer. listalc or the isrddrn or however it is spelled.

this is your first edit macro, isn't it?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Thu Sep 15, 2011 3:42 pm    Post subject:
Reply with quote

You can have the macro in your own PDS library as long as it is concatenated to SYSEXEC.
Back to top
View user's profile Send private message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 159
Location: Chennai

PostPosted: Fri Sep 16, 2011 9:50 am    Post subject:
Reply with quote

Thanks to all the kind support, below program I executed in order make my macro work from the command line.
Code:

/* REXX */                                                           
ADDRESS TSO "ALLOCATE FI(SYSUPROC) DA('xxxx.xxxx.REXX5') SHR"     
ADDRESS TSO "ALTLIB ACTIVATE USER(CLIST)"                           



Regards,
Magesh
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Sep 16, 2011 11:19 am    Post subject: Reply to: How to make a macro work in TSO environment
Reply with quote

Good to hear this is working - thank you for posting your soluton icon_smile.gif

d
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 Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts PCOMM macro to call another PCOMM macro boyti ko All Other Mainframe Topics 4 Tue Jul 12, 2016 4:30 pm
No new posts Send parameter for macro STIMERM from... Daniel Teolotitla PL/I & Assembler 13 Tue Jul 05, 2016 9:23 pm
No new posts RACF Easytrieve Plus macro Susan Jackson CA Products 0 Fri Jun 03, 2016 8:25 pm
No new posts What is the maximum number of sort wo... Pravina M SYNCSORT 2 Mon Mar 14, 2016 4:51 pm


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