Page 1 of 1

Holding execution of a panel

PostPosted: Wed Feb 20, 2013 5:08 pm
by nikesh_rai
Hi,

Is it possible to hold execution of a panel at some step. for example

  IF (&XSUBSYS NE ' ' AND &XCRTRID NE ' ' AND     
      &XTBLNME NE ' ' AND &XINPFLE NE ' ')       
                                                 
     IF (&SQLRTCD = 1 )                           
        .MSG = GNSQL005                           
     ELSE                                         
         IF (&SQLRTCD = 2 )                       
            .MSG = GNSQL006                       
         ELSE                                     
            .MSG = GNSQL007                       
            *REXX(*,(REXX3))                     
                                                 
            IF RETCD = 0                         
               .MSG = GNSQL008                   
            ELSE                                 
               .MSG = GNSQL009                   
                                                 


I want to hold the execution of panel till the execution of rexx is completed. Once the REXX3 has been completed, the next step needs to be executed. Since the value for the RETCD I will get from the REXX3, so I need to do this.. or if some better way to do it... I have googled it but didn't get much.

Re: Holding execution of a panel

PostPosted: Wed Feb 20, 2013 6:25 pm
by prino
And what makes you think the REXX runs asynchronously from the panel?

Re: Holding execution of a panel

PostPosted: Wed Feb 20, 2013 7:27 pm
by nikesh_rai
Is there any other reason the step after REXX3 is being called is not executing. Since the massage is getting displayed for GNSQL007 but not for GNSQL008 or GNSQL009. I thought panel is not able to retrieve the value of RETCD from REXX3 and hence not executing the step. However I checked with this code as well without any condition:

     IF (&SQLRTCD = 1 )               
        .MSG = GNSQL005               
     ELSE                             
         IF (&SQLRTCD = 2 )           
            .MSG = GNSQL006           
         ELSE                         
            .MSG = GNSQL007           
            *REXX(*,(REXX3))         
            .MSG = GNSQL008           
                                     
            VPUT (RETCD) PROFILE     
            IF (&RETCD = 0)           
               .MSG = GNSQL008       
            ELSE                     
               .MSG = GNSQL009     


and result is same. step .MSG = GNSQL008 was not executed..

Re: Holding execution of a panel

PostPosted: Wed Feb 20, 2013 7:45 pm
by enrico-sorichetti
You did not post the full scenario ...

for what are You using the *REXX construct ???

the *REXX functionality is not meant as a full <APPLICATION> flow controller
but to expand <FIELD/VARIABLE> processing beyond those provided by ISPF PANEL processor

the APPLICATION flow should be governed by the invoking rexx ....

...
Address ISPEXEC Display DRIVER_panel
DO WHILE ( RC = 0 )
    ... process the variables returned by the panel
    Address ISPEXEC Display DRIVER_panel
END
...


after a Display the script will wait until the luser tampers the keyboard

Re: Holding execution of a panel

PostPosted: Wed Feb 20, 2013 9:57 pm
by Pedro
Learn to use ISPDPTRC. It is a command which starts the panel trace. Issue it before displaying your panel to capture the trace. Issue it again a second time to display the trace.

And use TRACE('R') within the rexx program to see its trace.