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
 

 

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: 4648
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: 2025
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
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm


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