Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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

Senior Member


Joined: 08 May 2006
Posts: 1018
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

Senior Member


Joined: 14 Mar 2007
Posts: 10515
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 ISPF 3.4 edit of a ps file, disp use... Carrie Da Silva TSO/ISPF 1 Fri Sep 21, 2018 3:01 am
No new posts SMF IFAMGET macro GTPB_RETURNEDLENGT... ironheinrich7 IBM Tools 0 Thu Aug 02, 2018 6:53 pm
No new posts SMF IFAMGET macro GTPB_RETURNEDLENGT... ironheinrich7 PL/I & Assembler 0 Fri Jul 13, 2018 7:56 pm
No new posts Run time proc edit Niki JCL & VSAM 7 Fri Jun 08, 2018 5:42 pm
No new posts IBM Pcomm macro startmacro command do... JGregoire IBM Tools 0 Wed May 09, 2018 12:16 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us