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
 
Init macro or not ?

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

REXX Moderator


Joined: 13 Mar 2006
Posts: 1243
Location: Israel

PostPosted: Wed Jan 11, 2012 4:28 pm    Post subject: Init macro or not ?
Reply with quote

My macro can be run in two ways:
From the command line:
Code:
Command ===> MYMACRO

From a REXX program:
Code:
"VIEW DATASET("ds") MACRO(MYMACRO)"


In the first case, everything work fine,
in the second case I receive message ISRE310:
Code:
COMMAND IN ERROR . : UP MAX                                   
                                                               
Initial macro error                                           
The macro command entered is not allowed from an initial macro.


One way to fix this is to pass a "hidden" parameter in my REXX program:
no parameter: command line, parameter found: initial macro.

Another way would be for the macro to ask "do I run as an initial macro?"
However I haven't found any Edit Macro statement that answers that (IMACRO tells me NONE in both cases)
Did I miss it ?
Back to top
View user's profile Send private message

prino

Senior Member


Joined: 07 Feb 2009
Posts: 1060
Location: Oostende, Belgium

PostPosted: Wed Jan 11, 2012 5:08 pm    Post subject:
Reply with quote

In what context do you issue the "UP MAX"? Wouldn't it be possible to replace it by a "locate .zf"?
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1243
Location: Israel

PostPosted: Wed Jan 11, 2012 6:12 pm    Post subject: Reply to: Init macro or not ?
Reply with quote

The macro adds a few notelines at the top of the file with "LINE_BEFORE .ZF = NOTELINE (MyNote)"
Doing LOCATE .ZF places me on line 1 and the notelines are hidden.

Another way to solve my little problem would be to do UP MAX only if cursor line is not 1.
(funnily, it doesn't help if line 1 is actually the cursor line...)
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1060
Location: Oostende, Belgium

PostPosted: Wed Jan 11, 2012 6:19 pm    Post subject:
Reply with quote

And what about a "locate 0"? In normal edit it does work, right now I cannot test it from a macro.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1243
Location: Israel

PostPosted: Wed Jan 11, 2012 6:36 pm    Post subject:
Reply with quote

"LOCATE 0" works in both cases.
Thanks Robert! Good thinking!
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 Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts exec macro in the end of edit anatol CLIST & REXX 8 Fri Sep 22, 2017 5:10 am
No new posts How to Run Rexx Macro? Kalaivignesh CLIST & REXX 5 Fri Sep 01, 2017 9:08 pm
No new posts ISREDIT MACRO NOT WORKING! :cry: kirank889 TSO/ISPF 3 Thu Aug 03, 2017 5:46 pm
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm

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