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 |
*------------------------------------------------------------------*

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:

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.

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