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
 

 

OPCM4 Error in Rexx Macro
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
edwin_infy

New User


Joined: 01 Jul 2008
Posts: 32
Location: chennai

PostPosted: Sat Aug 14, 2010 8:53 am    Post subject: OPCM4 Error in Rexx Macro
Reply with quote

Code:
/*REXX MACRO*/
'ISREDIT MACRO'
ADDRESS ISREDIT
"F 'CALENDAR ID/'"
"ISREDIT (CURLINE) = LINE .ZCSR"
"ISREDIT LABEL .ZCSR = .AA 0"
"F 'LISTINGS FROM SAMPLE'"
"ISREDIT (CURLINE) = LINE .ZCSR"
"ISREDIT LABEL .ZCSR = .BB 0"
"X ALL .AA .BB"
"DEL ALL NX"
"C ALL . :"
"ISREDIT SAVE "
"ISREDIT END "
EXIT




In the above macro i get the following error..

OPCM4 macro error - Command as entered: "OPCM4".
BDISPMAX exceeded - 100 displays exceeded in batch mode on panel


Am not able to located why this error occurs. Can someone help me on this
Back to top
View user's profile Send private message

Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Sat Aug 14, 2010 9:12 am    Post subject:
Reply with quote

For one thing, the statement "X ALL .AA .BB' is invalid in an edit macro. In an edit macro the Exclude (X) command MUST include a string specification. If you know for certain that every line will contain a space, for example, you could use the command "X ' ' .AA .BB ALL"
Back to top
View user's profile Send private message
edwin_infy

New User


Joined: 01 Jul 2008
Posts: 32
Location: chennai

PostPosted: Sat Aug 14, 2010 11:02 am    Post subject: Reply to: Error in Rexx Macro
Reply with quote

"X ' ' .AA .BB ALL" did not work.

"X ALL ' ' " Is it like only Strings could be excluded ?

Any suggestions
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Sat Aug 14, 2010 1:46 pm    Post subject:
Reply with quote

professionals check the RC after edit macro commands.
since you don't, it is difficult to tell where you went wrong.
if could be that the FIND did not work and everything thereafter
is predicated on false assumptions.
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: Sat Aug 14, 2010 5:31 pm    Post subject:
Reply with quote

Ronald Burr wrote:
For one thing, the statement "X ALL .AA .BB' is invalid in an edit macro.


Not true. That's a valid command and it works fine. This macro worked for me:
Code:

/* REXX */
Address ISREDIT
"MACRO"
"F 'CALENDAR ID/'"
If rc <> 0 Then
  Do
    Address ISPEXEC
    zedsmsg = "START DATA MISSING"
    "SETMSG MSG(ISRZ001)"
    Exit 0
  End
"(CURLINE) = LINE .ZCSR"
"LABEL .ZCSR = .AA 0"
"F 'LISTINGS FROM SAMPLE'"
If rc <> 0 Then
  Do
    Address ISPEXEC
    zedsmsg = "END DATA MISSING"
    "SETMSG MSG(ISRZ001)"
    Exit 0
  End
"(CURLINE) = LINE .ZCSR"
"LABEL .ZCSR = .BB 0"
"X ALL .AA .BB"
"DEL ALL NX"
"C ALL . :"
"SAVE"
"END"
Exit


BDISPMAX exceeded - 100 displays exceeded in batch mode on panel

Must be running the macro in the background. I believe that the settings for BDISPMAX can be increased when necessary.
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Sat Aug 14, 2010 5:42 pm    Post subject:
Reply with quote

You're right Kevin - the fault is mine for "trusting" the manual which does NOT show string as being optional. However, when I did a scan of my own edit macros, I did find a few in which I did not specify a string ( but they were all of the EXCLUDE ALL variety (without labels).
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: Sun Aug 15, 2010 2:58 am    Post subject: Reply to: Error in Rexx Macro
Reply with quote

According to the HELP screens, the ALL sub-keyword can be substituted for the string on the EXCLUDE command.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Mon Aug 16, 2010 1:53 am    Post subject: Reply to: Error in Rexx Macro
Reply with quote

Quote:
Must be running the macro in the background. I believe that the settings for BDISPMAX can be increased when necessary.


I agree. But I think ISPF is trying to display something. Since it has an END, I suspect there is a problem outside of this macro, that tries to display something.

Show us the trace.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Aug 16, 2010 4:16 am    Post subject:
Reply with quote

Sometimes, ISPF issues a lot of DISPLAY & TBDISPL internally while processing other services. TRACE or ISPVCALL would be my best debugging shots.

O.
Back to top
View user's profile Send private message
edwin_infy

New User


Joined: 01 Jul 2008
Posts: 32
Location: chennai

PostPosted: Mon Aug 16, 2010 6:56 am    Post subject: Reply to: Error in Rexx Macro
Reply with quote

Yes i do run this macro in background mode.

I tried increasing Bdisp using the key BDISPMAX(999999999)

while increasing Display it goes into infinite loop and i get the following error.

DMB676I DUMPMSTR DUMPMASTER V6.500F DMBINTRH CONTINUING WITH WITH DUMP-TAKING FOR JOB
DMB610I DUMPMSTR V6.500F DMBINTRH DUMP FOR JOB ADCXTM9S NOT PROCESSED DUE TO ABEND CODE LOOKUP
IEA995I SYMPTOM DUMP OUTPUT 386

I just call this macro using IKJEFT01 module thru the following code

Code:

ARG DDNAME                                 
                                           
ADDRESS ISPEXEC                           
"CONTROL ERRORS RETURN"                   
                                           
"EDIT DATASET('"DDNAME"') MACRO(OPCM4)"   
                                           
exit                                       


Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Mon Aug 16, 2010 8:27 am    Post subject:
Reply with quote

Hmmm. I think that you are specifying a DDNAME where only a DSNAME is permitted.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Mon Aug 16, 2010 10:06 am    Post subject: Reply to: Error in Rexx Macro
Reply with quote

'It' does not go into an infinite loop. I think you are doing something that is looping.

You have not shown us the JCL or the call to your exec.

Show us the trace. (request #2)
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Mon Aug 16, 2010 10:10 am    Post subject: Reply to: Error in Rexx Macro
Reply with quote

Show us the trace from the editor macro that you first posted.
Back to top
View user's profile Send private message
prino

Active Member


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

PostPosted: Mon Aug 16, 2010 3:21 pm    Post subject:
Reply with quote

superk wrote:
BDISPMAX exceeded - 100 displays exceeded in batch mode on panel

Must be running the macro in the background. I believe that the settings for BDISPMAX can be increased when necessary.


Yes, you can, but that is treating the symptom, not the cause. If anything, you should reduce them to stop macro's from trying to display anything in batch - there is no screen in batch, so nothing should be displayed!
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Aug 16, 2010 3:41 pm    Post subject:
Reply with quote

Quote:
there is no screen in batch, so nothing should be displayed!


I repeat: ISPF issues internal DISPLAYs without your control. For example: The EDIT service usually cause ISPF to issue an internal CALL ISPLINK DISPLAY. Those calls may be encountered if you take a look at ISPVCALL trace output.

As for the OP, in addition to my previous debugging tip, please read the tip in the fine manual.


O.
Back to top
View user's profile Send private message
prino

Active Member


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

PostPosted: Mon Aug 16, 2010 3:50 pm    Post subject:
Reply with quote

ofer71 wrote:
Quote:
there is no screen in batch, so nothing should be displayed!


I repeat: ISPF issues internal DISPLAYs without your control. For example: The EDIT service usually cause ISPF to issue an internal CALL ISPLINK DISPLAY. Those calls may be encountered if you take a look at ISPVCALL trace output.


I have a number of extremely complex combined exec/edit-macros that all edit a significant number of datasets. All of them run in batch, even with the default BDISPMAX of 100! I'm pretty sure internal DISPLAYs somehow do not count towards the BDISPMAX.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Aug 16, 2010 3:54 pm    Post subject:
Reply with quote

It depends. That's why IBM gave us the ISPF debugging tools.... icon_biggrin.gif
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Mon Aug 16, 2010 7:31 pm    Post subject: Reply to: Error in Rexx Macro
Reply with quote

Quote:
ISPF issues internal DISPLAYs without your control.


I suppose it does, but with the simple program that was posted, I doubt that there are so many internal displays that it would reach a limit.

I suspect that the editor macro does not get to the end and ISPF tries to show some error message in the display.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Mon Aug 16, 2010 7:37 pm    Post subject:
Reply with quote

I agree. This is a great opportunity to suggest also MACROSPY from Mr. Doug Nadel.

O.
Back to top
View user's profile Send private message
prino

Active Member


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

PostPosted: Mon Aug 16, 2010 7:52 pm    Post subject:
Reply with quote

ofer71 wrote:
I agree. This is a great opportunity to suggest also MACROSPY from Mr. Doug Nadel.


Which has long been superseded by the ISPF native (and supported) ISREMSPY command...
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
Goto page 1, 2  Next
Page 1 of 2

 

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 What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm


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