Search code examples
ibm-midrangerpgle

Go to wrksplf after exit from DSPF?


I'm creating a screen designer on iSeries 400 [IBM]

The RPGLE program that I create I'm trying to find out what will be the command to let the user be in the wrksplf after they exit from the program (press F3 that I create indicator)

in CLLE I can just use wrksplf at the end of the program before enddo but I can't find any information how to do that in the other languages like RPGLE or anything else.


Solution

  • As long as you are in an interactive job, you can just call QCMDEXC to invoke the command ...

    DQCMDEXC          PR                  EXTPGM('QCMDEXC')    
    D prCmdStr                    4096A   CONST                
    D prCmdLen                      15P 5 CONST                
    
     /free
      QCMDEXC('WRKSPLF':25);
     /end-free