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 in sample program

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

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Jul 16, 2009 6:03 pm    Post subject: Error in sample program
Reply with quote

Hi Guyz,

I tried out an sample program from ISPF Edit Macros manual, following is the macro
Code:
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"
    "ISREDIT MACRO (HEADER)"         
SET &COUNT = 1                       
DO WHILE &COUNT <= 9                 
ISREDIT FIND  'TEST - #'               
SET &RETCODE = &LASTCC               
IF &RETCODE = 0 THEN                 
 DO                                   
  ISREDIT CHANGE  '#'   '&COUNT'         
  SET &COUNT = &COUNT + 1             
  END                                 
 ELSE                                 
  SET &COUNT = 10                     
  END                                 
EXIT                                 

I get the following error

Code:
     6 +++ ISREDIT MACRO SET &COUNT = 1               
Error running TEST1, line 6: Logical value not 0 or 1 
***                                                   

This is due to &COUNT. It is consider it as an Logical AND.
But this is how its given in the manual.
Where am i making the mistake, can i know ?

Sushanth
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Jul 16, 2009 6:17 pm    Post subject:
Reply with quote

stop using clist and use rexx.
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: Thu Jul 16, 2009 6:30 pm    Post subject: Reply to: Error in sample program
Reply with quote

I agree, although the code was working fine for me.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Jul 16, 2009 6:34 pm    Post subject:
Reply with quote

Great Start,

So, What are the things i need to change to convert it into rexx ?

Sushanth
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Jul 16, 2009 6:51 pm    Post subject:
Reply with quote

Guyz,

I hope, i have converted my program to rexx
Code:
ADDRESS ISPEXEC "CONTROL ERRORS RETURN" 
    "ISREDIT MACRO (HEADER)"             
                                         
'ISREDIT COUNT = 1'                     
DO WHILE COUNT <= 9                     
'ISREDIT F "TEST - #"'                   
'ISREDIT RETCODE = LASTCC'               
IF RETCODE = 0 THEN                     
DO                                       
  'ISREDIT CHANGE  "#"  "&COUNT"'       
  'ISREDIT COUNT = COUNT + 1'           
END                                     
ELSE                                     
  'ISREDIT COUNT = 10'                   
END                                     
EXIT                                     


Now, iam getting lots of this
Code:
COMMAND RETCODE NOT FOUND
COMMAND COUNT NOT FOUND 
COMMAND RETCODE NOT FOUND
COMMAND COUNT NOT FOUND 
COMMAND RETCODE NOT FOUND
COMMAND COUNT NOT FOUND 
COMMAND RETCODE NOT FOUND
COMMAND COUNT NOT FOUND 
COMMAND RETCODE NOT FOUND


Sushanth
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: Thu Jul 16, 2009 7:07 pm    Post subject:
Reply with quote

Not tested
Just changed by eye, so you might get an error or two
Code:

ADDRESS ISPEXEC "CONTROL ERRORS RETURN" 
    "ISREDIT MACRO (HEADER)"             
                                         
COUNT = 1                     
DO WHILE COUNT <= 9                     
'ISREDIT F "TEST - #"'                   
RETCODE = RC               
IF RETCODE = 0 THEN                     
DO                                       
  'ISREDIT CHANGE  "#"  "COUNT"'       
  COUNT = COUNT + 1           
END                                     
ELSE                                     
  COUNT = 10                   
END                                     
EXIT                       
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Jul 16, 2009 7:35 pm    Post subject:
Reply with quote

Expat,

Just changed yours from "COUNT" to "'count'".
Works Great.

I did something like this
Code:
/*REXX****************************************/
/* EDIT MACRO - TESTING **********************/
/*********************************************/
ADDRESS ISPEXEC "CONTROL ERRORS RETURN"         
    "ISREDIT MACRO (HEADER)"                   
                                               
COUNT = 1                                       
DO WHILE COUNT <= 9                             
'ISREDIT F "TEST - #"'                         
  'ISREDIT CHANGE  "#"  "&COUNT"'               
COUNT = COUNT + 1                               
END                                             
EXIT                                           


In my code, i removed the returncode. Because, i didn't know what variable is used for return code. Thank You EXPAT, for telling me exactly that RC
Code:
RETCODE = RC



Sushanth
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Thu Jul 16, 2009 9:11 pm    Post subject: Reply to: Error in sample program
Reply with quote

sushanth bobby, where did you find that example? I could not find it in the book.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Fri Jul 17, 2009 10:39 am    Post subject:
Reply with quote

Pedro,

ISPF Edit and Edit Macros
z/OS Version 1 Release 7.0
SC34-4820-04
Fifth Edition (September 2005)

Simplifying Complex Tasks - Page 87

Sushanth
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Fri Jul 17, 2009 9:27 pm    Post subject: Reply to: Error in sample program
Reply with quote

Quote:
I tried out an sample program from ISPF Edit Macros manual,
...
I get the following error


I looked at the manual... you did not faithfully copy it. Do not blame the manual if you change the example.
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: Fri Jul 17, 2009 9:29 pm    Post subject: Reply to: Error in sample program
Reply with quote

I had a feeling ...
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Mon Jul 20, 2009 11:09 am    Post subject:
Reply with quote

OK. I am a bad copier.

Sushanth
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Wed Jul 22, 2009 1:50 am    Post subject: Reply to: Error in sample program
Reply with quote

I did not intend to highlight your sloppiness *

I mentioned it because I (and several others) spend a great deal of time looking at the forum questions. I prioritize my time based on the topic and how interesting a puzzle it would be for me.

If you had used this subject line instead: "Error in the way I copied the sample program", I might have handled it differently.

* actually, I did.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Wed Jul 22, 2009 10:34 am    Post subject:
Reply with quote

Yes, Pedro.
Next time, i'll do that.

Thanks,
Sushanth
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 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 IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm


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