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

Call a subrtn in REXX not entering into READCAT


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
JOYEETA PAUL
Currently Banned

New User


Joined: 18 Sep 2008
Posts: 17
Location: bangalore

PostPosted: Wed Nov 26, 2008 7:13 pm
Reply with quote

CALL in my rexx prog is not working-
main exec:
Code:

/*REXX*/                                                 
ADDRESS ISPEXEC                                         
"LIBDEF ISPPLIB DATASET ID('JOP3I0.ISPF.ISPPLIB')"       
"DISPLAY PANEL(CATSPACE)"                               
QUEUE Y                                                 
QUEUE                                                   
PULL LINE                                               
PULL LINE                                               
TRACE I                                                 
IF Y1 = 'Y' THEN                                         
 DO                                                     
   CALL READCAT                                         
   SAY "I AM IN CATFILE"                                 
   SAY RESULT                                           
  END                                                     
 ELSE                                                     
   DO                                                     
    ADDRESS ISPEXEC                                       
    "ISPEXEC ADDPOP ROW(03) COLUMN(20)"                   
    "DISPLAY PANEL(USERNCAT)"                             
    "ISPEXEC REMPOP"                                     
     EXIT                                                 
   END                       

Code:

READCAT:external subrtn(existing in same PDS)
ARG END_OF_DATA                                                     
SAY END_OF_DATA                                                     
SAY "I AM IN READCAT"                                               
ADDRESS TSO                                                         
DSNAME = REXXFILE.CATFILE                                           
"ALLOC DD(STAC) DA("DSNAME") SHR" /**STAC IS THE DDNAME TO REFER DSN**/
"EXECIO * DISKR STAC (STEM X."/**READ A RECORD IN STACK**/     
  IF RC = 2                                                         
       THEN END_OF_DATA = 1 /**RC=2 MEANS END OF FILE**/             
ADDRESS ISPEXEC                                                                       
"DISPLAY PANEL(CATPANEL)"                                           
RETURN END_OF_DATA           


it is showing no error.but not entering into READCAT
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Nov 26, 2008 7:19 pm
Reply with quote

Have you tried TRACE?

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

Global Moderator


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

PostPosted: Wed Nov 26, 2008 7:39 pm
Reply with quote

IF Y1 = 'Y' THEN
DO
CALL READCAT
...

Where is the value of Y1 set to 'Y'? Is that what the panel does?
Back to top
View user's profile Send private message
JOYEETA PAUL
Currently Banned

New User


Joined: 18 Sep 2008
Posts: 17
Location: bangalore

PostPosted: Thu Nov 27, 2008 11:31 am
Reply with quote

ya,i have tried trace.but after that also i am unable to track the error.
the 'Y' comes from my panel.
Back to top
View user's profile Send private message
JOYEETA PAUL
Currently Banned

New User


Joined: 18 Sep 2008
Posts: 17
Location: bangalore

PostPosted: Thu Nov 27, 2008 11:34 am
Reply with quote

READCAT is working fine independently.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Fri Nov 28, 2008 11:12 pm
Reply with quote

use TRACE('r')

Move the trace higher in the program. Show us the trace.

Remove the QUEUE and PULL instructions... they do not seem to do anything.

You are not passing any arguments to READCAT, but it seems to expect one. And READCAT is returning a value, but the caller does not expect a response. I suggest invoking it as a function:
Code:
result = READCAT(y1)


(sorry, the usage of Y1 or end_of_data is not clear to me, not sure what the argument is supposed to be)
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 isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top