IBM Support

How can I write an ISPF dialog that can be invoked from both inside and outside ISPF?

Question & Answer


Question

Need direction on how to write an ISPF dialog that can be invoked inside and outside ISPF.

Answer

The trick is to have your program do the following:

  • Use ISPQRY to test for the presence of ISPF

  • If ISPF is present, use ISPF.

  • If ISPF is not present, invoke ISPF, specifying that the program be the first thing invoked when ISPF comes up. Upon return from ISPF, the program should terminate.

Here's an example of a REXX exec that runs from TSO READY or from within ISPF:

 /* REXX */                                       
 Parse Arg Parms                                  
 'ISPQRY'                                         
 ReturnCode = rc                                  
 If ReturnCode <> 0 Then                          
   Do                                             
     "ISPSTART CMD(myprog" parms")"               
     Exit 0                                       
   End                                            
 Else                                             
   address ispexec 'select cmd(myprog' parms')'   
 Exit 0                                           






[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SSBLLD","label":"ISPF for z\/OS"},"Platform":[{"code":"PF035","label":"z\/OS"}],"Component":"","Version":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
27 September 2016

UID

dwa1208500