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
 

 

Error: ISRE310 in edit macro

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Error: ISRE310 in edit macro
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: 7905
Location: Bellevue, IA

PostPosted: Thu Jul 07, 2011 5:59 pm    Post subject:
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    Post subject: Reply to: Error: ISRE310 in edit macro
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: 645
Location: Pennsylvania

PostPosted: Thu Jul 07, 2011 6:20 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Thu Jul 07, 2011 6:38 pm    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Thu Jul 07, 2011 6:40 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Thu Jul 07, 2011 6:44 pm    Post subject: Reply to: Error: ISRE310 in edit macro
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    Post subject: Reply to: Error: ISRE310 in edit macro
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: 645
Location: Pennsylvania

PostPosted: Thu Jul 07, 2011 6:51 pm    Post subject:
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    Post subject: Reply to: Error: ISRE310 in edit macro
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

Site Director


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

PostPosted: Thu Jul 07, 2011 8:49 pm    Post subject:
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    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 S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm
No new posts IDMS/DC-COBOL program - SNAP error wh... rakeshsekar1987 IDMS/ADSO 5 Tue Sep 13, 2016 8:28 pm


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