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

OPCM4 Error in Rexx Macro


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
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
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
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
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
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

Global Moderator


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

PostPosted: Sat Aug 14, 2010 5:31 pm
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
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

Global Moderator


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

PostPosted: Sun Aug 15, 2010 2:58 am
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

Global Moderator


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

PostPosted: Mon Aug 16, 2010 1:53 am
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: 2358
Location: Israel

PostPosted: Mon Aug 16, 2010 4:16 am
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
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
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

Global Moderator


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

PostPosted: Mon Aug 16, 2010 10:06 am
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

Global Moderator


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

PostPosted: Mon Aug 16, 2010 10:10 am
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

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Mon Aug 16, 2010 3:21 pm
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: 2358
Location: Israel

PostPosted: Mon Aug 16, 2010 3:41 pm
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

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Mon Aug 16, 2010 3:50 pm
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: 2358
Location: Israel

PostPosted: Mon Aug 16, 2010 3:54 pm
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

Global Moderator


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

PostPosted: Mon Aug 16, 2010 7:31 pm
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: 2358
Location: Israel

PostPosted: Mon Aug 16, 2010 7:37 pm
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

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Mon Aug 16, 2010 7:52 pm
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
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Aug 16, 2010 9:12 pm
Reply with quote

I was looking for that ISREMSPY name. I recalled it was introduced a couple of years ago, and never had the chance to play with it. Thanks, prino icon_razz.gif

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

New User


Joined: 13 Jul 2010
Posts: 19
Location: Frankfurt/Germany

PostPosted: Tue Aug 17, 2010 11:21 am
Reply with quote

Hi edwin_infy,

You should show your JCL. I believe in Batch, you have to use the ISPSTART command of TSO if you want to use ISPF (and assign all ISPF-Libraries, of course). E.G:
//USER2Y EXEC PGM=IKJEFT01,DYNAMNBR=20 TSO
//SYSTSIN DD *
ISPSTART CMD(MYCOMD MYPARM)

IKJEFT01 is the TSO-program, ISPSTART invokes ISPF, CMD invokes a REXX by that name (can also be a program or panel)

Cheers Kurt
Back to top
View user's profile Send private message
edwin_infy

New User


Joined: 01 Jul 2008
Posts: 32
Location: chennai

PostPosted: Wed Sep 01, 2010 11:31 pm
Reply with quote

THis error Got resolved.

The String I searched using Macro was not found in the PDS

The Search string didnt comeup in the pds due to error in another step.

Since This error came.
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 Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top