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 while executing the rexx code

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
bijal.awhad

New User


Joined: 19 Mar 2008
Posts: 51
Location: Pune

PostPosted: Mon Oct 26, 2009 4:12 pm    Post subject: Error while executing the rexx code
Reply with quote

Hi,

I am new to the rexx & was working on the code given below.


Code:
***************************** Top of Data ******************************
/*REXX TO DISPLAY PARANAME*/                                 
/* DISPLAYS THE PARAGRAPH NAMES IN A COBOL PGM */                       
/* IT WORKS IF THE EDIT MODE IS NUM ON STD OR NUM OFF             */   
/*TRACE ?I*/                                                           
ISREDIT MACRO                                                           
ADDRESS ISREDIT "F 'PROCEDURE DIVISION' 8 FIRST"                       
ADDRESS ISREDIT "F  P'-' 8"                                             
DO UNTIL RC > 0                                                         
   ADDRESS ISREDIT  "(THELINE) = LINE .ZCSR"                           
   IF  POS("EXIT",THELINE) = 0 ,                                       
   &   POS("*",THELINE) = 0 ,                                           
   &   POS("-INC",THELINE) = 0 ,                                       
   &   POS("COPY",THELINE) = 0                                         
   THEN                                                                 
     DO                                                                 
       PARSE VAR THELINE NUM  " " LINE1 "." LINE2                       
       LINE3 = STRIP(LINE1,'L'," ")                                     
/*     LINE3 = "FJGNL - "LINE3           */                             
       ADDRESS ISREDIT LINE_AFTER  .ZCSR "DISPLAY ('"LINE3"')"         
     END                                                               
   ADDRESS ISREDIT  "F P'¬' 8"                                         
END                                                                     
EXIT 1                                                                 
**************************** Bottom of Data ****************************



The above code is for adding Display's statement after every paragraph in the cobol program. At our place we use displays for debugging the program & hence need to put displays manually.

While executing the above code i got error as below


Code:
******************************************************************************
*                                                                            *
* Command in error . : LINE_AFTER .ZCSR DISPLAY ('0000-RECEIVE-ACQ-RECORD')  *
*                                                                            *
* Syntax is incorrect                                                        *
* Assignment stmt must use syntax "ISREDIT LINE_AFT lptr = value".           *
*                                                                            *
*   Error message ID . : ISRE142                                             *
*                                                                            *
*   Last return code . : 20                                                  *
*                                                                            *
*   Macro executing  . : TESTDISP                                            *
*                                                                            *
* Press ENTER key to terminate the macro.                                    *
*                                                                            *
*                                                                            *
*                                                                            *
******************************************************************************


In the above error ''0000-RECEIVE-ACQ-RECORD'' is the first paragraph in my cobol program.

I have partially understood the code after going through the manuals & got this.
ISRE142Syntax is incorrect - Assignment stmt must use syntax "ISREDIT aaaaaaaa lptr = value".
Explanation:This assignment statement requires a line pointer argument.

User Response: Correct the assignment statement
But still not sure about the corrective action. Can someone help me to correct the error & code.

The para names we use at our place are like


Code:
*****************************
0000-FIRST-PARA.       
*****************************


Code:
*****************************
1000-SECOND-PARA.       
*****************************



Please let me know if anyother info is needed.

Thanks
BIjal[/code]
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Oct 26, 2009 4:17 pm    Post subject:
Reply with quote

=
Back to top
View user's profile Send private message
bijal.awhad

New User


Joined: 19 Mar 2008
Posts: 51
Location: Pune

PostPosted: Mon Oct 26, 2009 4:34 pm    Post subject:
Reply with quote

dbzTHEdinosauer wrote:
=


Hi Dick,

Did you mean putting '=' between .ZCSR & DISPLAY as given below
Code:
ADDRESS ISREDIT LINE_AFTER  .ZCSR  = "DISPLAY ('"LINE3"')"


Correct me if i am wrong.

Regards
Bijal
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Oct 26, 2009 5:08 pm    Post subject:
Reply with quote

Why not try it and see.

At worst, it can only go wrong at again. At best - it works.
Back to top
View user's profile Send private message
bijal.awhad

New User


Joined: 19 Mar 2008
Posts: 51
Location: Pune

PostPosted: Mon Oct 26, 2009 5:12 pm    Post subject:
Reply with quote

expat wrote:
Why not try it and see.

At worst, it can only go wrong at again. At best - it works.



I have tried it. It says

ISRE454Command name is invalid - The name 'aaaaaaaa' is invalid. Not an edit command / macro name.
Explanation:
The command aaaaaaaa is not valid for a macro name. Valid macro names have 8 characters or fewer, start with an alphabetic or national character, and may have alphabetic characters, national characters, or numeric digits after the first character. In addition, program macros may be preceded by an exclamation point.

User Response:
Retype the command using a valid name for an edit command.

Regards
Bijal
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Oct 26, 2009 5:22 pm    Post subject:
Reply with quote

Well, try something different, since 'aaaaaaaa' does not work.
Back to top
View user's profile Send private message
bijal.awhad

New User


Joined: 19 Mar 2008
Posts: 51
Location: Pune

PostPosted: Mon Oct 26, 2009 5:54 pm    Post subject:
Reply with quote

dbzTHEdinosauer wrote:
Well, try something different, since 'aaaaaaaa' does not work.



Hi Dick,

The name 'aaaaaaaa' is invalid. Not an edit command / macro name. 'aaaaaaaa' is reffering to what actually in the below code

Code:
ADDRESS ISREDIT LINE_AFTER  .ZCSR "DISPLAY ('"LINE3"')"         


Can you suggest any alternatives to add a Display statement after every paragraph in the prograam.

For example

Code:
*****************************
0000-FIRST-PARA.       
*****************************
DISPLAY '0000-FIRST-PARA'


Code:
*****************************
1000-SECOND-PARA.       
*****************************
DISPLAY '1000-SECOND-PARA'
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Mon Oct 26, 2009 7:42 pm    Post subject: Reply to: Error while executing the rexx code
Reply with quote

Compare the suggested format:
Code:
"ISREDIT aaaaaaaa lptr = value".

to your line:
Code:
 ISREDIT LINE_AFTER  .ZCSR "DISPLAY ('"LINE3"')"


Also, it was suggested that you use an equal sign. It is not clear that you tried it. Please confirm. And show us your latest statement.
Back to top
View user's profile Send private message
bijal.awhad

New User


Joined: 19 Mar 2008
Posts: 51
Location: Pune

PostPosted: Tue Oct 27, 2009 11:50 am    Post subject: Re: Reply to: Error while executing the rexx code
Reply with quote

Pedro wrote:
Also, it was suggested that you use an equal sign. It is not clear that you tried it. Please confirm. And show us your latest statement.


Hi
See below
Code:
***************************** Top of Data ******************************
ISREDIT MACRO                                                           
ADDRESS ISREDIT "F 'PROCEDURE DIVISION' 8 FIRST"                       
ADDRESS ISREDIT "F  P'-' 8"                                             
DO UNTIL RC > 0                                                         
   ADDRESS ISREDIT  "(THELINE) = LINE .ZCSR"                           
   IF  POS("EXIT",THELINE) = 0 ,                                       
   &   POS("*",THELINE) = 0 ,                                           
   &   POS("-INC",THELINE) = 0 ,                                       
   &   POS("COPY",THELINE) = 0                                         
   THEN                                                                 
     DO                                                                 
       PARSE VAR THELINE NUM  " " LINE1 "." LINE2                       
       LINE3 = STRIP(LINE1,'L'," ")                                     
/*     LINE3 = "FJGNL - "LINE3           */                             
       ADDRESS ISREDIT LINE_AFTER .ZCSR = "DISPLAY ('"LINE3"')"         
     END                                                               
   ADDRESS ISREDIT  "F P'¬' 8"                                         
END                                                                     
EXIT 1                                                                 
**************************** Bottom of Data ****************************


I tried using '=' sign but getting error as below

Code:
******************************************************************************
*                                                                            *
* Command in error . : 0                                                     *
*                                                                            *
* Command name is invalid                                                    *
* The name '0' is invalid. Not an edit command / macro name.                 *
*                                                                            *
*   Error message ID . : ISRE454                                             *
*                                                                            *
*   Last return code . : 20                                                  *
*                                                                            *
*   Macro executing  . : TESTDISP                                            *
*                                                                            *
* Press ENTER key to terminate the macro.                                    *
*                                                                            *
*                                                                            *
*                                                                            *
******************************************************************************
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Tue Oct 27, 2009 7:20 pm    Post subject: Reply to: Error while executing the rexx code
Reply with quote

Lets do this again:


Compare the suggested format:
Code:

"ISREDIT aaaaaaaa lptr = value"


to your line:
Code:

 ISREDIT LINE_AFTER  .ZCSR = "DISPLAY ('"LINE3"')"


Hint: in your other ISREDIT lines, you have fully enclosed in quotes, but in this line you do not.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Tue Oct 27, 2009 9:03 pm    Post subject:
Reply with quote

In future, I would suggest that you use the other syntax for ISREDIT commands that use variables.

instead of
Code:
address isredit "LINE_AFTER .ZCSR = 'some value'"

use
Code:
xxxx = 'some value'
address isredit "LINE_AFTER .ZCSR = (xxxx)"

This will avoid substitutions that the editor might do.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Tue Oct 27, 2009 9:56 pm    Post subject: Reply to: Error while executing the rexx code
Reply with quote

Quote:
This will avoid substitutions that the editor might do.

Just to be clear, it is the rexx processor that is resolving your statement before handing it off to the editor command processor.

By not putting the equal sign in quotes, you are asking rexx to compare two strings.
Code:
something = something_else

The statement is false, so the result is a zero.
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Tue Oct 27, 2009 10:48 pm    Post subject:
Reply with quote

That is true, but I was referring to substitutions that ISPF would do. When parsing the statement to execute (after Rexx hands the command off to ISPF), ISPF will substitute things starting with ampersand. For example:
Code:
"line_after .zcsr = '&ztime'"
will add the time, whereas
Code:
 var='&ztime'               
 "line_after .zcsr = (var)"
will add the string "&ztime". This often causes problems in macros that deal with JCL that contains temporary data set names.

This isn't really a Rexx issue, so it is a little off topic here. I mention it only because it is a hard one to debug if you don't know about it and it comes up often.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Tue Oct 27, 2009 11:12 pm    Post subject: Reply to: Error while executing the rexx code
Reply with quote

It is a good suggestion, but you are right: a little off topic.
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 3 Mon Dec 05, 2016 11:57 am
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm


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