IBM Support

I have an ISPF dialog written in REXX. Why do I get a S0C1 or other abend the second time I run it?

Question & Answer


Question

I have a REXX exec that calls a program, MYPGM using a CALL statement, like this:

 address tso "call 'USER1.LOAD(MYPGM)'"   

MYPGM VDEFINEs some variables, does some processing, and then does a VDELETE * to VDELETE all of the variables defined by the program. The second time the REXX exec executes, an ABEND occurs.

The symptoms vary. Sometimes 0C1 messages appear:

 IRX0250E System abend code 0C1, reason code 00000001.                         
 IRX0255E Abend in host command call or address environment routine TSO.       
 IRX0250E System abend code 0C1, reason code 00000001.                         
 IRX0255E Abend in host command select or address environment routine ISPEXEC. 

Sometimes 0C4 messages appear:

 IRX0250E System abend code 0C4, reason code 00000016.                       
 IRX0255E Abend in host command call or address environment routine TSO.     

Sometimes there is an ISPF error box with a description of the 0C1 or 0C4 abend.

Answer

Any CLIST or REXX exec that calls a program which does a VDELETE * is at risk of an ABEND.

Using the ADDRESS TSO environment to invoke the program causes the VDELETE service to operate against the Rexx environment. Critical resources are removed from the environment and the second Rexx invocation abends.

Similar issues occur with CLISTs.

Ensure that any program dialog invoked by Rexx uses

 address ispexec "SELECT PGM(MYPGM)" 

or

  address ispexec "SELECT CMD(MYPGM)"

The CLIST syntax is

 ISPEXEC SELECT PGM(MYPGM)

or

  ISPEXEC SELECT CMD(MYPGM)

[{"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:
26 August 2016

UID

dwa1298814