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

Error code ISRE747


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Thu Feb 17, 2011 6:27 pm
Reply with quote

Hi,

I am new to clist. Tried to execute the below code it gives the error shown .

Code:
ISREDIT MACRO (DEBUG)
IF &DEBUG = &STR() +
THEN CONTROL MSG NOLIST NOCONLIST NOSYMLIST
ELSE CONTROL MSG LIST CONLIST SYMLIST
ISPEXEC CONTROL ERRORS RETURN



Code:
                           ISPF Edit Macro Error                               
 Command ===>                                                                   
                                                                               
 ******************************************************************************
 *                                                                            *
 * Command in error . : MACRO DEBUG                                           *
 *                                                                            *
 * Invalid macro command                                                      *
 * Parameter found outside parentheses and is not PROCESS/NOPROCESS.          *
 *                                                                            *
 *   Error message ID . : ISRE747                                             *
 *                                                                            *
 *   Last return code . : 12                                                  *
 *                                                                            *
 *   Macro executing  . : SELECT                                              *
 *                                                                            *
 * Press ENTER key to terminate the macro.                                    *
 *                                                                            *
 *                                                                            *
 *                                                                            *
 ******************************************************************************
                                                                               
                                                                               
                                                                               


Can someone please help me resolving this

Regards
Amar
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Feb 17, 2011 6:47 pm
Reply with quote

Quote:
I am new to clist

Quote:
Can someone please help me resolving this


Throw the code in the trash bin.

Do not waste another minute of your time learning clist.

Learn REXX instead

I have written nothing but Rexx for twenty years.

There is no reason for you to learn clist.

That is the best help you will receive.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Thu Feb 17, 2011 7:30 pm
Reply with quote

Agree that Rexx is a far better way to go.

And this is coming from a former CLIST bigot.
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Thu Feb 17, 2011 7:33 pm
Reply with quote

OK can you please help me in designing the REXX for the below requirement. I am new to REXX also icon_sad.gif

Need to write a CLIST/REXX to go to a paragraph or a variable in working storage section if my cursor is placed at a PERFORM or the variable name in the procedure division and return to the position where it is started.

I talked about COBOL program.

Regards
Amar
Back to top
View user's profile Send private message
prino

Senior Member


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

PostPosted: Thu Feb 17, 2011 8:20 pm
Reply with quote

V S Amarendra Reddy wrote:
Need to write a CLIST/REXX to go to a paragraph or a variable in working storage section if my cursor is placed at a PERFORM or the variable name in the procedure division and return to the position where it is started.


Why do you need to write this?
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Feb 17, 2011 8:51 pm
Reply with quote

Amar,

While this is a 'help' forum not a 'do it for me' forum, below are two Edit Macros (Rexx based). One is for GO and one is for Back.

Do not mention the word clist ever again. Nobody here cares about it.
It is very old technology (I haven't used it in twenty years).
The term 'clist/rexx' is not a valid one. It tells people you do not know what you are talking about. Get my point?

Use this code to help you learn and help yourself. Use the manuals and search function on this forum. Get my point?

Code:

/*  REXX EXEC TO FIND A PARAGRAPH FROM A PERFORM STATEMENT  */

"ISREDIT MACRO NOPROCESS"

/*--------------------------------------------------------*/
/*  THIS EXEC ALLOWS YOU TO GO TO A PARAGRAPH NAME IN A   */
/*  PROGRAM FROM THE PERFORM STATEMENT. TO USE, TYPE GO   */
/*  ON THE COMMAND LINE, PUT THE CURSOR ON THE LINE THAT  */
/*  HAS THE PARAGRAPH NAME WHERE YOU WANT TO GO TO.       */
/*--------------------------------------------------------*/

/*-----------------------------------------------------*/
/*  FIND THE LINE NUMBER WHERE THE CURSOR IS LOCATED.  */
/*  THEN PUT THE INFORMATION ON THAT LINE INTO         */
/*  VARIABLE HOLD1. ALSO PUT A LABEL ON THAT LINE SO   */
/*  THAT YOU CAN FIND YOUR WAY BACK.                   */
/*-----------------------------------------------------*/
"ISREDIT (LINE1,COL1) = CURSOR"
"ISREDIT (HOLD1) = LINE "LINE1

FROM1 = '.BACK'
"ISREDIT LABEL " LINE1 " = "FROM1 " 0"
/*-----------------------------------------------------*/
/*  PARSE HOLD1 TO FIND THE PARAGRAPH NAME             */
/*-----------------------------------------------------*/
PARSE VAR HOLD1 WITH PART1 'PERFORM' PAR1 ' ' REST1
PAR1 = WORD(REST1,1)
PAR1 = TRANSLATE(PAR1,' ','.')
PAR1 = STRIP(PAR1)

/*--------------------------------*/
/*  MAKE SURE SOMETHING WAS FOUND */
/*--------------------------------*/
IF PAR1 = '' THEN DO
  ZEDSMSG = 'PARAGRAPH NAME NOT FOUND'
  ZEDLMSG = 'MAKE SURE PERFORM STATEMENT IS CORRECT'
  "ISPEXEC SETMSG MSG(ISRZ001)"
  SIGNAL EXIT99
END

/*--------------------------------*/
/*  FIND THE PARAGRAPH NAME NOW   */
/*--------------------------------*/
"ISREDIT FIND " PAR1 " 8 FIRST WORD"
RCODE = RC
IF RCODE ¬= 0 THEN DO
  ZEDSMSG = 'PARAGRAPH NOT FOUND'
  ZEDLMSG = 'PARAGRAPH 'PAR1' WAS NOT FOUND'
  "ISPEXEC SETMSG MSG(ISRZ001)"
END

EXIT99: EXIT


Code:

/*  REXX EXEC TO GO BACK FROM THE GO COMMAND  */
/*  TYPE BACK ON THE COMMAND TO USE THIS      */

"ISREDIT MACRO NOPROCESS"

WHERE1 = '.BACK'
"ISREDIT (LINE1) = LINENUM "WHERE1
IF LINE1 > 0 THEN DO
  "ISREDIT CURSOR = "LINE1",1"
END
ELSE DO
  ZEDSMSG = "CAN NOT GO BACK"
  ZEDLMSG = "THERE IS NOWHERE TO GO BACK TO"
  "ISPEXEC SETMSG MSG(ISRZ001)"
END

EXIT99: EXIT
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Thu Feb 17, 2011 9:20 pm
Reply with quote

Hi daveporcelan,

I will never use the word CLIST again. Thanks a lot for the help. I will learn and understand the whole code by myself by rading manuals.

As suggested by you, I will use the search function and manulas of this forum. Actually the forum is named as CLIST & REXX. So I have posted it like that.

From now my path is thru Rexx. I do not know CLIST.

Thanks a lot for myour quick response.

Regards
Amar
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Feb 17, 2011 9:25 pm
Reply with quote

Quote:
Actually the forum is named as CLIST & REXX.


I never noticed that as the name. icon_cool.gif

My mind must block out the first word.

Have fun working on this.
Back to top
View user's profile Send private message
prino

Senior Member


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

PostPosted: Thu Feb 17, 2011 9:46 pm
Reply with quote

@Dave

Two macros?

Why not add a parameter to GO (like
Code:
"ISREDIT MACRO (BACK) NOPROCESS"

and put everything in one?
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Feb 17, 2011 9:52 pm
Reply with quote

Two macros means less typing.

Less typing means easier to use.

Type GO

Type BACK

or Type GO BACK

In my opinion two seperate macros is more user friendly.

My users have never complained, they must be happy.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Feb 18, 2011 12:13 pm
Reply with quote

the following two REXX Macro do the same as Dave's GO and BACK accomplish,
but using the VARIABLE POOL provides additional functionality:
  • being able to deal with more than one program
  • able to 'link' thru multiple performs, instead of just one


it does require NUM STD COBOL
and paragraph/section names in column 8.

LINK in command line,
cursor on line containing PERFORM
Code:

/*    REXX  */
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISREDIT
"MACRO"
/*                                                  */
/*   "(VAR1, VAR2) = NUMBER"                        */
/*   "NUMBER = ON STD COBOL"                        */
/*                                                  */
ADDRESS ISPEXEC "VGET (LINKLIST) SHARED"
IF  RC > 0 THEN
   DO
     LINKLIST = ''
   END
RETURN = 0
"(MEMNAME) = MEMBER"
IF LENGTH(MEMNAME) < 8 THEN
  DO
   MEMFILL = '@@@@@@@@'
   MEMNAME = MEMNAME!!SUBSTR(MEMFILL,1,8 -(LENGTH(MEMNAME)))
  END
"(WRKDATA) = LINE .ZCSR"
"(RETURN) = LINENUM .ZCSR"
"(TOP,BOT) = DISPLAY_LINES"
"(CRSRLINE,CRSRCOL) = CURSOR"
IF LENGTH(TOP) > 6 THEN
   DO
    TOP = SUBSTR(TOP,-1 * (5 -(LENGTH(TOP))))
   END
IF LENGTH(RETURN) > 6 THEN
   DO
    RETURN = SUBSTR(RETURN,-1 * (5 -(LENGTH(RETURN))))
   END
LINKLIST = MEMNAME!!TOP!!RETURN!!LINKLIST
ADDRESS ISPEXEC "VPUT (LINKLIST) SHARED"
ADDRESS ISREDIT
/*  TRACE ?R  */
WRKDATA_LEN = LENGTH(WRKDATA)
PERFORM_POS = INDEX(WRKDATA,'PERFORM')
RIGHT_LEN = WRKDATA_LEN - (PERFORM_POS + 7)
WRKDATA = RIGHT(WRKDATA,RIGHT_LEN)
RIGHT_LEN = INDEX(WRKDATA, '.')
IF RIGHT_LEN > 1 THEN
   TARGET = LEFT(WRKDATA,RIGHT_LEN - 1)
ELSE
   PARSE VAR WRKDATA TARGET MULL
"FIND "TARGET" 8 FIRST"
"DOWN CURSOR"
/*                                                  */
/*  "NUMBER = (VAR1,VAR2)"                          */
/*                                                  */
EXIT


RELINK in command line
Code:

/*    REXX  */
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISREDIT
"MACRO"
ADDRESS ISPEXEC "VGET (LINKLIST) SHARED"
IF  RC > 0 THEN
   DO
     SAY KEINE LINKS ZU RELINK IN TABLE
     EXIT
   END
ADDRESS ISREDIT
"(MEMNAME) = MEMBER"
IF LENGTH(MEMNAME) < 8 THEN
  DO
   MEMFILL = '@@@@@@@@'
   MEMNAME = MEMNAME!!SUBSTR(MEMFILL,1,8 -(LENGTH(MEMNAME)))
  END
IF  MEMNAME <> LEFT(LINKLIST,8) THEN
    DO
      "CLRLINK"
      SAY KEINE LINKS ZU RELINK FUER MODUL MEMNAME
     EXIT
   END
TOP    = SUBSTR(LINKLIST,9,6)
RETURN = SUBSTR(LINKLIST,15,6)
IF LENGTH(LINKLIST) = 20 THEN
   DO
      "CLRLINK"
      LINKLIST = ''
   END
ELSE
   DO
      LINKLIST = RIGHT(LINKLIST,LENGTH(LINKLIST)-20)
      ADDRESS ISPEXEC "VPUT (LINKLIST) SHARED"
   END
"LOCATE "TOP
"CURSOR = "RETURN 10
EXIT



and here is CLRLINK,
which is called in the LINK.
This could be incorporated in the above macros, but I have it separate,
because other macros use it.

Code:

/*    REXX  */
ISREDIT MACRO
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
ADDRESS ISPEXEC "VERASE (LINKLIST) SHARED"
ADDRESS ISREDIT
EXIT
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Fri Feb 18, 2011 2:24 pm
Reply with quote

Hi Dick,

The CLRLINK is not allowing to go back to the PERFORM. Do I have to do some specific setting for this?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Feb 18, 2011 2:51 pm
Reply with quote

why are you executing CLRLINK?

explain exactly what you did.

the variable pool is different for each session that you have.

in one session I can link to a paragraph,
view/edit another module, link and relink in the second.
then end the view/edit session in the second module
and then relink in the original of the first.

so, tell me what you have done, and I will beable to explain it to you.

by the way, here is a macro to display the linklist, incase you are having questions.
(and no, there is no real need to save the bottom line number of the return display for link/relink,
but I use it in other macros.

shwlink
Code:

/*    REXX  */
ISREDIT MACRO
ADDRESS ISPEXEC "VGET (LINKLIST) SHARED"
IF  RC > 0 THEN
   DO
     SAY KEINE LINKS IN RELINK TABLE
     EXIT
   END
ADDRESS ISREDIT
SAY 'LENGTH OF LINKLIST: ' LENGTH(LINKLIST)
SAY 'NUMBER OF ITEMS: ' LENGTH(LINKLIST)/20
DO I=1 TO LENGTH(LINKLIST)  BY 20
SAY SUBSTR(LINKLIST,I,20)
END
EXIT
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Fri Feb 18, 2011 3:12 pm
Reply with quote

Hi Dick,

I have put my cursor on a PERFORM statement and executed LINK, it has successfully gone to the paragraph. Now to go back to original position what should I do?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Feb 18, 2011 3:15 pm
Reply with quote

RELINK
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Fri Feb 18, 2011 3:23 pm
Reply with quote

I am getting the below message when I execute the RELINK.

KEINE LINKS ZU RELINK IN TABLE
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Feb 18, 2011 3:29 pm
Reply with quote

this is a help forum, nota provide me some tool and the relative guidance!

the samples posted are just snippets that have proved to be useful in some environment for specific tasks
it' s up to You to verify their applicability to Your environment,
understand the coding and modify it according to Your needs

the rexx script posted are not that long to prevent You from reading and understanding them
and translate the messages to any other language of Your choice!

the people who provided the snippet have no further obligations !
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 -> CLIST & REXX

 


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 run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
Search our Forums:

Back to Top