View previous topic :: View next topic
|
Author |
Message |
JOYEETA PAUL Currently Banned New User
Joined: 18 Sep 2008 Posts: 17 Location: bangalore
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Have you tried TRACE?
O. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
JOYEETA PAUL Currently Banned New User
Joined: 18 Sep 2008 Posts: 17 Location: bangalore
|
|
|
|
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 |
|
|
JOYEETA PAUL Currently Banned New User
Joined: 18 Sep 2008 Posts: 17 Location: bangalore
|
|
|
|
READCAT is working fine independently. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
|