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

Getting RC (20) in ISPF Panel when entering data


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
thesumitk

Active User


Joined: 24 May 2013
Posts: 156
Location: INDIA

PostPosted: Fri Jul 19, 2013 1:22 am
Reply with quote

Hi All,

I am getting a very intresting(at least for me) problem in my below ISPF Panel

Code:
)ATTR DEFAULT(%+_)                                                     
       %   TYPE(TEXT) INTENS(HIGH)                                     
       +   TYPE(TEXT) INTENS(LOW) COLOR(YELLOW)                         
       _   TYPE(INPUT) INTENS(HIGH) CAPS(OFF) JUST(LEFT)               
)BODY WINDOW(70,21)                                                     
+ PLEASE ENTER YOUR TEXT BELOW:-                                       
+                                                                       
%ISSUE 1:-_Z1                                                +| 
          _Z2                                                       +| 
          _Z3                                                       +| 
          _Z4                                                       +| 
%ISSUE 2:-_Z5                                                +| 
          _Z6                                                       +| 
          _Z7                                                       +| 
          _Z8                                                       +| 
%ISSUE 3:-_Z9                                                +| 
           _Z10                                                     +| 
           _Z11                                                     +| 
           _Z12                                                     +| 
 %ISSUE 4:-_Z13                                              +| 
           _Z14                                                      +| 
           _Z15                                                      +| 
           _Z16                                                      +| 
 )INIT                                                                   
 )PROC                                                                   
 )END                                                                   


When I am partly entering the valuse in this panel it is working fine, Like I entered the text in "ISSUE 1" below and it worked fine
Code:

   PLEASE ENTER YOUR TEXT BELOW:-                                     
                                                                     
ISSUE 1:- today one job has bended and                              |
          we ran it from override in orer to fix the abend          |
                                                                    |
                                                                    |
ISSUE 2:-                                                           |
                                                                    |
                                                                    |
                                                                    |
ISSUE 3:-                                                           |
                                                                    |
                                                                    |
                                                                    |
ISSUE 4:-                                                           |
                                                                    |
                                                                    |
                                                                    |


But when I enter full data i.e. from first column of ISSUE 1 to last column of ISSUE4 it gives RC (20) and do not takes any character just populates spaces however my rexx program runs with RC= 0 but with no data
When I test my panel in Dialogue test it runs fine , below is the example of how I fills data .. When I run it with EXECUTIL mode and debug with each line execution it just says the +++RC(20)+++ when I press the enter and panel is full of data, my rexx starts runign with no data ..
However I am surprised because some time it runs fine in this scenario as well but I am not sure why
PLease assist me


Code:
PLEASE ENTER YOUR TEXT BELOW:-                                   
                                                                   
ISSUE 1:- A11111111111111111111111111111111111111111111111111111111
          222222222222222222222222222222222222222222222222222222222
          333333333333333333333333333333333333333333333333333333333
          44444444444444444444444444444444444444444444444444444444B
ISSUE 2:- C11111111111111111111111111111111111111111111111111111111
          222222222222222222222222222222222222222222222222222222222
          333333333333333333333333333333333333333333333333333333333
          44444444444444444444444444444444444444444444444444444444D
ISSUE 3:- E11111111111111111111111111111111111111111111111111111111
          222222222222222222222222222222222222222222222222222222222
          333333333333333333333333333333333333333333333333333333333
          44444444444444444444444444444444444444444444444444444444F
ISSUE 4:- G11111111111111111111111111111111111111111111111111111111
          222222222222222222222222222222222222222222222222222222222
          333333333333333333333333333333333333333333333333333333333
          44444444444444444444444444444444444444444444444444444444H
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Jul 19, 2013 2:00 am
Reply with quote

Post the relevant portions of your driver script. You are running it in foreground ISPF, yes?
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 156
Location: INDIA

PostPosted: Fri Jul 19, 2013 2:31 am
Reply with quote

Yes I am runing it in ISPF foregroud
Below is the peice of code which will handle the panel named "ISSUE"


Code:
/* REXX */                                                       
                     
 ADDRESS ISPEXEC                                                     
 "ISPEXEC ADDPOP"                                                   
 "LIBDEF ISPPLIB DATASET ID('TEST.USER.PANELS')"                     
/* "CONTROL ERRORS RETURN" */                                       
 "DISPLAY PANEL(ISSUE)"                                             
  if RC <> 0 then do                                                 
ZEDLMSG ='tere is some problem with the tool,please contact         
          sumit chaturvedi to correct the problem and run the tool   
          again .please drop the status mail manually as of now'     
        address ispexec "setmsg msg(isrz001) "                       
        address ispexec "setmsg msg(isrz002) "                       
  exit                                                               
  end                                                               
 if pfkey = 3 then do                                               
ZEDLMSG ='you have pressed pf3 key .. exiting the tool'             
        address ispexec "setmsg msg(isrz001) "                       
  exit                                                         
  end                                                         
 "ISPEXEC REMPOP"                                             
 "LIBDEF ISPPLIB"                                             
  bcdtm.2 = z1  || ' ' || z2  || ' '  || z3  || ' '  || z4     
  bcdtm.3 = z5  || ' ' || z6  || ' '  || z7  || ' '  || z8     
  bcdtm.4 = z9  || ' ' || z10 || ' '  || z11 || ' '  || z12   
  bcdtm.5 = z13 || ' ' ||z14  || ' '  || z15 || ' '  || z16   
 end                                                           
 if z21 = y then do                                           
 ADDRESS ISPEXEC                                               
 "ISPEXEC ADDPOP"                                             
 "LIBDEF ISPPLIB DATASET ID('TEST.USER.PANELS')"               
 /*"CONTROL ERRORS RETURN"*/                                   
 "DISPLAY PANEL(ISSUE)"                                       
        address ispexec "setmsg msg(isrz001) "                 
 if RC <> 0 then do                                               
ZEDLMSG ='there is some problem with the tool,please contact       
         sumit chaturvedi to correct the problem and run the tool 
         again .please drop the status mail manually as of now'   
       address ispexec "setmsg msg(isrz001) "                     
 exit                                                             
 end                                                               
"ISPEXEC REMPOP"                                                   
"LIBDEF ISPPLIB"                                                   
 bcdtm.2 = z1  || ' ' || z2  || ' '  || z3  || ' '  || z4         
 bcdtm.3 = z5  || ' ' || z6  || ' '  || z7  || ' '  || z8         
 bcdtm.4 = z9  || ' ' || z10 || ' '  || z11 || ' '  || z12         
 bcdtm.5 = z13 || ' ' ||z14  || ' '  || z15 || ' '  || z16         
end
[/code]
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Jul 19, 2013 3:36 am
Reply with quote

I do not see anything that would cause DISPLAY to return RC=20. Are you sure that that return code is coming from the DISPLAY service? Post the trace from a dozen or so lines prior to the error.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Jul 19, 2013 12:27 pm
Reply with quote

There is a test on z21, that variable is not defined and/or filled.
The test will fail, and because of that a REMPOP is executed without the corresponding ADDPOP being executed. Maybe that is the RC(20) reason.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Jul 19, 2013 8:13 pm
Reply with quote

No, in the code as shown both the ADDPOP and REMPOP are in the do for if z21 = y.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Fri Jul 19, 2013 9:11 pm
Reply with quote

The code shown has an extra END at line 27 (before the Z21).

and Z21 will never equal 'Y', so anything after line 27 will never be executed.

When I display and use PF3, I get this:
Code:
CMG999                                                     
Message syntax error.                                     
ISRZ002  - contains invalid format syntax in first record.

Likely, because of uninitialized variables.

I did not see the failure you see, but if you clean up your code, then maybe it will run better.

Please provide a trace.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Fri Jul 19, 2013 9:25 pm
Reply with quote

Also these three lines seem suspect:
Code:

"DISPLAY PANEL(ISSUE)"                                       
        address ispexec "setmsg msg(isrz001) "                 
 if RC <> 0 then do                   


Should the check for RC <>0 be for the display and not the address ispexec?
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 156
Location: INDIA

PostPosted: Fri Jul 19, 2013 9:47 pm
Reply with quote

Thanks all for your inputs !!!

The Z21 is the variable coming from a panel which is displayed before this panel , I have not pasted that piece of code here just to avoid long posts,
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Fri Jul 19, 2013 11:01 pm
Reply with quote

daveporcelan wrote:
Also these three lines seem suspect:
Code:

"DISPLAY PANEL(ISSUE)"                                       
        address ispexec "setmsg msg(isrz001) "                 
 if RC <> 0 then do                   


Should the check for RC <>0 be for the display and not the address ispexec?


Agree. It is the SETMSG that fails.

Or you could disprove that by providing the trace (3rd request for a trace)
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 How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
Search our Forums:

Back to Top