IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Error: ISRE310 in edit macro


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dubasir

New User


Joined: 05 Jun 2006
Posts: 19

PostPosted: Thu Jul 07, 2011 5:49 pm
Reply with quote

Hi,
I am calling an edit macro from rexx using below statement
"EDIT DATASET('dataset name') MACRO(macro name)"
In the macro, i have given "NUMBER OFF" "LEFT MAX" commands
The macro is failing with below error.

command in error: LEFT MAX
Initial macro error
The macro command entered is not allowed from an initial macro.
Error message id: ISRE310
Last retrun code : 20

Can you please tell me what exactly the error is?

Thanks,
Suresh.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jul 07, 2011 5:59 pm
Reply with quote

You have trouble reading? The system told you what the problem is.

From the ISPF Edit and Edit Macros manual:
Quote:
LEFT does not change the cursor position and cannot be used in an initial macro.
Back to top
View user's profile Send private message
dubasir

New User


Joined: 05 Jun 2006
Posts: 19

PostPosted: Thu Jul 07, 2011 6:12 pm
Reply with quote

Hi,
But i am not trying to change the cursor position here using this command.
I just wanted to start the code from 1st column in case it is in NUM STD COB mode (the code starts from 7 th column).

I have used the LEFT MAX command in another macro which is working properly. But this macro is throwing the error.
I did not understand why it is acting differently for two macros.

Thanks,
Suresh.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Jul 07, 2011 6:20 pm
Reply with quote

Quote:
Can you please tell me what exactly the error is?


How can anybody tell you exactly what the error is, when you have not shown exaclty what the macro looks like? A snippet of the calling Rexx program would help as well.

Quote:
I have used the LEFT MAX command in another macro which is working properly. But this macro is throwing the error.
I did not understand why it is acting differently for two macros.


There is obviously something different about the macros, or the way they are being called. Nobody here can help you because you have shown us NOTHING.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Jul 07, 2011 6:21 pm
Reply with quote

From the ISPF Edit and Edit Macros manual:
Quote:
LEFT does not change the cursor position and cannot be used in an initial macro.

just in case you have trouble reading.
use the cursor command to position the cursor.
use bounds/profile/.... command to determine num profile and
adjust your code accordingly.
Back to top
View user's profile Send private message
dubasir

New User


Joined: 05 Jun 2006
Posts: 19

PostPosted: Thu Jul 07, 2011 6:31 pm
Reply with quote

calling program:
DSNME = PDSNME||"("||MEM.K||")"
MEM1 = MEM.K
ADDRESS ISPEXEC
"VPUT (OSTR NSTR EXCOMT WORD MEM1) PROFILE"
"EDIT DATASET('"DSNME"') MACRO(STRMACRO)"

and the called program goes this way:

TRACE I
ADDRESS ISREDIT
"MACRO"
ADDRESS ISPEXEC "VGET (OSTR NSTR EXCOMT WORD MEM1) PROFILE"
ADDRESS ISREDIT
"(STAT,VALUE) = NUMBER"
"NUMBER OFF"
"LEFT MAX"
"FIND '//' 1 ALL"
FIND_RC = RC
IF FIND_RC = 0 THEN
DO ........

Thanks,
Suresh
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Jul 07, 2011 6:36 pm
Reply with quote

what about
cannot be used in an initial macro
do you not understand?
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Jul 07, 2011 6:38 pm
Reply with quote

Quote:
I have used the LEFT MAX command in another macro which is working properly. But this macro is throwing the error.
I did not understand why it is acting differently for two macros.


My guess would be is that the 'other' macro is invoked directly from the command line, while this macro is as an INITIAL macro from an ISPEXEC EDIT command.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Jul 07, 2011 6:40 pm
Reply with quote

Dick,

I just noticed you are located on the throne created by my ancestors.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Jul 07, 2011 6:44 pm
Reply with quote

A little more of an explanation:

"Remember that commands referencing display values (DISPLAY_COLS, DISPLAY_LINES, DOWN, LEFT, RIGHT, UP, LOCATE) are invalid in an initial macro because no data has been displayed."
Back to top
View user's profile Send private message
dubasir

New User


Joined: 05 Jun 2006
Posts: 19

PostPosted: Thu Jul 07, 2011 6:47 pm
Reply with quote

Yes, the other macro directly called one. Honestly, I was not sure the term initial macro. But, now I got it and the Left command cannot be used in macro which called from ISPEXEC EDIT.

But, How can we shift the code left maximum in this case.

Thanks,
Suresh.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Jul 07, 2011 6:51 pm
Reply with quote

Quote:
But, How can we shift the code left maximum in this case.


Why do you need to shift the code?

You are doing a find all anyway.

You have already deceided what you 'think' you need to do, and are stuck on finding a solution.

As Enrico would say "meditate" on what you really need.
Back to top
View user's profile Send private message
dubasir

New User


Joined: 05 Jun 2006
Posts: 19

PostPosted: Thu Jul 07, 2011 7:09 pm
Reply with quote

Yeah, I don't need to shift the code, I was just confused. Now, The code is working fine without the LEFT command.
I am new to this macro things, but i want to learn it. So, I might asked you the basic questions.
anyways thanks a lot for your responses.

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

Moderator Emeritus


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

PostPosted: Thu Jul 07, 2011 8:49 pm
Reply with quote

Hello,

Quote:
I am new to this macro things, but i want to learn it.
Someone is usually here when there are questions. . . icon_smile.gif

Suggest you read about the "thing" and if you have a doubt, post what you found and your doubt. Someone will probably be able to clarify.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
Search our Forums:

Back to Top