Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Call a subrtn in REXX not entering into READCAT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Call a subrtn in REXX not entering into READCAT
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: 2360
Location: Israel

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

Have you tried TRACE?

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

Moderator Team Head


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

PostPosted: Wed Nov 26, 2008 7:39 pm    Post subject: Reply to: call a subrtn
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    Post subject: Reply to: Call a subrtn in REXX not entering into READCAT
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    Post subject: Reply to: Call a subrtn in REXX not entering into READCAT
Reply with quote

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

Senior Member


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

PostPosted: Fri Nov 28, 2008 11:12 pm    Post subject: Reply to: Call a subrtn in REXX not entering into READCAT
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us