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

Why i use TSO REXX give me different result ?


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Tue Aug 05, 2014 12:21 am
Reply with quote

Hi,

I run my rexx program by EX in frount of REXX , it works fine. But i move up rexx in SYS2.CLISTLIB and run the program by TSO REXX , it give me different result .

my program will first display the panel :
And this panel is popup panel.

*--------- PLEASE SELECT FOLLOWING OPTION ------
| Option ===> |
| 1) JOB Submit job to update the key |
| 2) Check Check the result |
| X) Exit Return to main panel |
| |
*------------------------------------------------------------*
When you select option 1 , it will give you job , you can see and submit job in full screen.

But when i excute the program by using TSO REXX , it gives you different disply after select option 1 , the job displayed in popup window not full screen.

*--------- PLEASE SELECT FOLLOWING OPTION -------------*
| File Edit Edit_Settings Menu Utilities Com |
| ------------------------------------------------- |
| VIEW TTAP.TSP.APPLPROD.RECOVERY(VERZIP) - 0 |
| Command ===> |
| ****** ***************************** Top of Data |
| ==MSG> -Warning- The UNDO command is not availabl |
*-------------------------------------------------------------------*

The code and panel is the same , only difference is EX and TSO to excute program. Why same rexx give two different results ?

My REXXA to display the panel
Code:
/* REXX */                                       
 PANELLIB='SYS2.CLISTLIB'                         
 "ISPEXEC LIBDEF ISPPLIB DATASET ID('"PANELLIB"')"
 ADDRESS 'ISPEXEC'                                 
 "ADDPOP COLUMN(11) ROW(7)"                       
 ZWINTTL="PLEASE SELECT FOLLOWING OPTION"         
 DO WHILE RC=0                                     
 "DISPLAY PANEL (PANEL3)"                         
  IF RC <> 8 THEN DO                               
   SELECT                                         
     WHEN OPTION='1' THEN RC=REXXPKZ()             
     WHEN OPTION='2' THEN RC=REX3PKZ()             
     WHEN option='X' THEN LEAVE                   
     OTHERWISE  "SETMSG MSG(ISPP195)"             
   END                                             
  end                                             
 END                                               
 "REMPOP"                                         
 RETURN 0   


My REXXPKZ()

Code:
/* REXX */                                             
ADDRESS ISPEXEC                                       
"VIEW DATASET ('TTAP.TSP.APPLPROD.RECOVERY(VERZIP)')" 
RETURN 0   
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Tue Aug 05, 2014 10:33 pm
Reply with quote

Show us the trace.

What is the return code from ADDPOP? It must not have worked.

Quote:
by EX in frount of REXX
Where are you when you issue this command.
Back to top
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Tue Aug 05, 2014 10:54 pm
Reply with quote

Hi Pedro ,

Thank you for your answer!

When I excuate this rexx using EX ,like
or in P.6 to excuate , both these way working fine. The problem only happend with TSO command .

-------------------------------------------------------
XSYS EDIT SYS2.CLISTLIB
Command ===>
Name Prompt Size Created
ex_______ REXXCA *Edited 4 2014/07/09 2014

Here is the trace with TSO Command :

Code:
3 *-* PANELLIB='SYS2.CLISTLIB'                           
  >L>   "SYS2.CLISTLIB"                                   
4 *-* "ISPEXEC LIBDEF ISPPLIB DATASET ID('"PANELLIB"')"   
        >L>   "ISPEXEC LIBDEF ISPPLIB DATASET ID('"                 
        >V>   "SYS2.CLISTLIB"                                       
        >O>   "ISPEXEC LIBDEF ISPPLIB DATASET ID('SYS2.CLISTLIB"   
        >L>   "')"                                                 
        >O>   "ISPEXEC LIBDEF ISPPLIB DATASET ID('SYS2.CLISTLIB')" 
      5 *-* ADDRESS 'ISPEXEC'                                       
      6 *-* "ADDPOP COLUMN(11) ROW(7)"                             
        >L>   "ADDPOP COLUMN(11) ROW(7)"                           
      7 *-* say rc                                                 
        >V>   "0"                                                   
 0                                                                 
      8 *-* ZWINTTL="PLEASE SELECT FOLLOWING OPTION"               
        >L>   "PLEASE SELECT FOLLOWING OPTION"                     
      9 *-* DO WHILE RC=0                                           
        >V>   "0"                                                   
        >L>   "0"                                                   
        >O>   "1"                                                   
     10 *-*  "DISPLAY PANEL (PANEL3)"                               
        >L>    "DISPLAY PANEL (PANEL3)"                             
 ***
[b]slect option 1[/b]   
 
 11 *-*  IF RC <> 8           
    >V>    "0"               
    >L>    "8"               
    >O>    "1"               
    *-*   THEN               
    *-*   DO                 
 12 *-*    SELECT             
 13 *-*    WHEN OPTION='1'   
    >V>      "1"             
    >L>      "1"             
    >O>      "1"             
    *-*     THEN             
    *-*     RC=REXXCA()   


My REXXCA only to view the member in data set

Code:
 /* REXX */                                           
 ADDRESS ISPEXEC                                       
 "EDIT DATASET ('TTAP.TSP.APPLPROD.RECOVERY(LMPKEYS)')"
 RETURN 0       
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Tue Aug 05, 2014 11:54 pm
Reply with quote

Quote:
Show us the trace.

... of the failure.
Back to top
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Wed Aug 06, 2014 12:05 am
Reply with quote

Hi, The trace didn't show any failure. What happend was ,when i use EX to excute the program, the panel should be popup shows you the option, when you select option 1, you can view or edite the member in full screen. like following code

"EDIT DATASET ('TTAP.TSP.APPLPROD.RECOVERY(LMPKEYS)')"

The problem happend when you use TSO command to run the program , after popup panel , you select option 1, the member also show in popup window not full screen. *--------- PLEASE SELECT FOLLOWING OPTION -------------*
| File Edit Edit_Settings Menu Utilities Com |
| ------------------------------------------------- |
| EDIT TTAP.TSP.APPLPROD.RECOVERY(LMPKEYS) - |
| Command ===> |
| ****** ***************************** Top of Data |
| ==MSG> -Warning- The UNDO command is not availabl |
*------------------------------------------------------------------*

Hope i describe it clearly ...
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Wed Aug 06, 2014 4:05 am
Reply with quote

Sorry, I misunderstood the situation earlier.

Your code does this in the following order:
1. get into popup mode
2. display menu
3. VIEW data set
4. remove popup mode

If you want it to behave differently, you need to change the order of your instructions.
Back to top
View user's profile Send private message
Paul Voyner

New User


Joined: 26 Nov 2012
Posts: 52
Location: UK

PostPosted: Wed Aug 06, 2014 1:13 pm
Reply with quote

jackzhang75,
I did a little test and got the same problem. EX cmd displays the VIEW panel in fullscreen (non-popup) mode, TSO cmd displays it as popup. Can't explain the different behaviour. But as Pedro says, you should do a REMPOP before invoking the VIEW. Something like this:
Code:
 ZWINTTL="PLEASE SELECT FOLLOWING OPTION"
  MY_RC = 0     
  DO WHILE MY_RC=0                                     
    "ADDPOP COLUMN(11) ROW(7)"                       
    "DISPLAY PANEL (PANEL3)"
    MY_RC = RC
    "REMPOP"                       
    IF MY_RC <> 8 THEN DO                               
      SELECT                                         
        WHEN OPTION='1' THEN RC=REXXPKZ()             
        WHEN OPTION='2' THEN RC=REX3PKZ()             
        WHEN option='X' THEN LEAVE                   
        OTHERWISE  "SETMSG MSG(ISPP195)"             
    END                                             
   end                                             
 


Why MY_RC ? Because REMPOP will set RC=0 and your DO WHILE loop won't work the same.
A couple of other points to tidy up your code: Start the program with:
Code:
"ADDRESS ISPEXEC"
"CONTROL ERRORS RETURN"
"LIBDEF ISPPLIB DATASET ID('"PANELLIB"')"

Because what you've written is mixing 2 different ways of calling ISPEXEC. Works, but messy.
Use "CONTROL ERRORS RETURN" when you write a dialog in rexx.

Add "LIBDEF ISPPLIB" at the end to free the LIBDEF.

And finally, in your REXXA example above you've got 3 END. Should be 2.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Aug 06, 2014 5:47 pm
Reply with quote

"SYS2.CLISTLIB" looks like a clist/rexx library.
Why do you use it with ISPPLIB, which is supposed to host PANEL libraries ?
Back to top
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Wed Aug 06, 2014 7:24 pm
Reply with quote

Hi Pedro and Paul Voyner,

Thanks for your reply.

I change the order of code as you showed. it works with TSO command , it can now view the member in full screen , but there is new problem. Everything runs fine at the point where you select option 1 to view the member in full screen . But after you exit this view and return to the main panel to make selection again. The background of this panel changed to member ,which is not right . If you excute the program in EX , there will be no any issue.

Also i move the panel to ISPPLIB as Marso said, sill the same ....

Code:
 XSYS       TTAP.TSP.APPLPROD.RECOVERY(VERZIP) - 01.01      Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR 
 ****** ***************************** Top of Data ******************************
 ==MSG> -Warning- The UNDO command is not available until you change           
 ==MSG>           your edit profile using the command RECOVERY ON.             
 000001 //TJUMCTST JOB (T,TSP,TSP8000,4,WD33),'JEROMEL-5708',                   
 000002 //    *--------- PLEASE SELECT FOLLOWING OPTION ----------*             
 000003 /*JOB | XSYS                                              |             
 000004 //*   | Option ===> 1                                     |             
 000005 //ZIP |  1)   JOB        Submit job to update the key     |             
 000006 //*** |  2)   Check      Check the result                 |             
 000007 //*   |  X)   Exit       Return to main panel             |             
 000008 //SYS |                                                   |             
 000009 //INP *---------------------------------------------------*             
 000010 //SYSIN    DD *                                                         
 000011   -SHOW_SETTINGS                                                       
 000012   -ECHO                                                                 
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Aug 06, 2014 7:44 pm
Reply with quote

Try "CONTROL DISPLAY REFRESH" after the "VIEW"

If it does not work, try "CONTROL DISPLAY SAVE" before "VIEW" then "CONTROL DISPLAY RESTORE" after it.

Sorry, can't test that right now.
Back to top
View user's profile Send private message
Paul Voyner

New User


Joined: 26 Nov 2012
Posts: 52
Location: UK

PostPosted: Wed Aug 06, 2014 7:45 pm
Reply with quote

I'm not sure what you mean by "The background of this panel changed to member". Does this mean that you PF3 from the VIEW panel and see the popup is still displayed ? This is how the DO WHILE loop is coded - keep displaying the popup until PF3 or X.
This is a very simple dialog. If you turn tracing on you should be able to see why it's doing what it does.
Oh, and in your panel do
Code:
)INIT
 &OPTION = ''

to reset before the redisplay
Back to top
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Wed Aug 06, 2014 9:35 pm
Reply with quote

Hi Marso ,

Thanks for your answer. I tried CONTROL DISPLAY SAVE" before "VIEW" then "CONTROL DISPLAY RESTORE. It works !

I just wordering why same code gives two different result by excuting it via EX and TSO ?
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Run rexx with JCL Job CLIST & REXX 1
No new posts Run rexx in batch job CLIST & REXX 7
No new posts Does anyone know rexx for VSE CLIST & REXX 3
No new posts TSO ALLOC In REXX Needs Improvement JCL & VSAM 3
No new posts REXX/CMS How to place command console... CLIST & REXX 4
Search our Forums:

Back to Top