View previous topic :: View next topic
|
Author |
Message |
edwin_infy
New User
Joined: 01 Jul 2008 Posts: 32 Location: chennai
|
|
|
|
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 |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
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 |
|
|
edwin_infy
New User
Joined: 01 Jul 2008 Posts: 32 Location: chennai
|
|
|
|
"X ' ' .AA .BB ALL" did not work.
"X ALL ' ' " Is it like only Strings could be excluded ?
Any suggestions |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
According to the HELP screens, the ALL sub-keyword can be substituted for the string on the EXCLUDE command. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
edwin_infy
New User
Joined: 01 Jul 2008 Posts: 32 Location: chennai
|
|
|
|
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 |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
Hmmm. I think that you are specifying a DDNAME where only a DSNAME is permitted. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
'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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Show us the trace from the editor macro that you first posted. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
It depends. That's why IBM gave us the ISPF debugging tools.... |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
I agree. This is a great opportunity to suggest also MACROSPY from Mr. Doug Nadel.
O. |
|
Back to top |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1306 Location: Vilnius, Lithuania
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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
O. |
|
Back to top |
|
|
Kurt Deininger
New User
Joined: 13 Jul 2010 Posts: 19 Location: Frankfurt/Germany
|
|
|
|
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 |
|
|
edwin_infy
New User
Joined: 01 Jul 2008 Posts: 32 Location: chennai
|
|
|
|
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 |
|
|
|