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
 

 

Edit Macro is not being executed

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

New User


Joined: 28 Feb 2007
Posts: 1
Location: United States

PostPosted: Fri Dec 28, 2012 8:42 pm    Post subject: Edit Macro is not being executed
Reply with quote

I am new in REXX. I wrote a simple edit macro but enable to execute the editmaro statements.
Code:
/*REXX*/
SAY 'HELLO'
TRACE R
ADDRESS ISPEXEC
"ISREDIT MACRO () NOPROCESS"
"ISREDIT RESET EXCLUDED"
"ISREDIT EXCLUDE ALL '-' 1"
"ISREDIT FIND FIRST '-' 1"
"ISREDIT DELETE ALL EXCLUDED"
EXIT

The 'HELLO' is being displayed but after ADDRESS ISPEXEC statement, all the statements are giving rc 20.

Can anybody help me to correct the code?
Back to top
View user's profile Send private message

Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri Dec 28, 2012 8:52 pm    Post subject:
Reply with quote

The 'HELLO' is being displayed because what you have coded is a REXX exec, not an edit MACRO. The rc=20 is happening for the other lines because REXX does not understand them.

In your REXX, you need to invoke edit for a dataset e.g.


Code:
 ADDRESS ISPEXEC "EDIT DATASET('"dsn"")') MACRO("macname ")"   


and have the MACRO coded separately in a library available to the REXX exec e.g.

Code:
ADDRESS ISPEXEC
"ISREDIT MACRO () NOPROCESS"
"ISREDIT RESET EXCLUDED"
"ISREDIT EXCLUDE ALL '-' 1"
"ISREDIT FIND FIRST '-' 1"
"ISREDIT DELETE ALL EXCLUDED"
"ISREDIT SAVE"


Garry.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10278
Location: italy

PostPosted: Fri Dec 28, 2012 8:52 pm    Post subject: Reply to: Edit Macro is not being executed
Reply with quote

search the forums for examples
if You search using My userid as additional argument You will find quite a bit of examples

here is a direct link, to a working example,
but probably it is a bit too complicated for a beginner
http://www.ibmmainframes.com/viewtopic.php?t=25947&highlight=

and here is a link to the TSO and ISPF bookshelves

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/IKJ4BK90

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/ISPZPM70

not the latest ones but more than enough for Your current needs

up to You to search for the manuals related to Your zOS level
starting from
http://www-03.ibm.com/systems/z/os/zos/bkserv/index.html

and here is a very old but very useful manual with well explained examples

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ISRVPB01/CONTENTS?SHELF=&DT=19931028105440

but then You might also search the IBM redbooks for additional info and techniques
Back to top
View user's profile Send private message
Michael Jakob

New User


Joined: 13 Mar 2011
Posts: 17
Location: Switzerland

PostPosted: Tue Jan 01, 2013 1:08 pm    Post subject: Edit-Macro-Environment
Reply with quote

Hello arnab3472

Runs your edit macro in a proper edit session? How did you call your edit-macro? "COMMAND ===> TSO hello" will not work.

Is there any reason you need noprocess?

I rather would specify "ISREDIT MACRO " without parenthesis and noprocess.

An edit-macro should be ended by "ISREDIT MEND"

At last an edit-macro should return an reasonable returncode. (EXIT)
0: all fine - cursor stayes at last position.
1: fine - but the cursor is placed at the command field.
other: signal an problem in edit macro.

The manual "ISPF Edit and Edit Macros" mentioned above is a fine and usable manual.
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 RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm
No new posts Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Mass comment and edit elixir1986 IBM Tools 3 Thu Mar 02, 2017 10:09 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


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