z/OS TSO/E REXX Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Writing execs that run in the TSO/E address space

z/OS TSO/E REXX Reference
SA32-0972-00

If you write a REXX exec that will run in the TSO/E address space, there are additional TSO/E external functions and TSO/E commands and services you can use that are not available to execs that run in a non-TSO/E address space. For execs that run in the TSO/E address space, you can use the following:
  • All keyword instructions that are described in Keyword instructions.
  • All built-in functions that are described in Functions.
  • All of the TSO/E external functions, which are described in TSO/E external functions.

    You can use the SETLANG and STORAGE external functions in execs that run in any address space (TSO/E and non-TSO/E). However, you can use the other TSO/E external functions only in execs that run in the TSO/E address space.

  • The following TSO/E REXX commands:
    • MAKEBUF - to create a buffer on the data stack
    • DROPBUF - to drop (discard) a buffer that was previously created on the data stack with the MAKEBUF command
    • NEWSTACK - to create a new data stack and effectively isolate the current data stack that the exec is using
    • DELSTACK - to delete the most current data stack that was created with the NEWSTACK command
    • QBUF - to query how many buffers are currently on the active data stack
    • QELEM - to query how many elements are on the data stack above the most recently created buffer
    • QSTACK - to query the number of data stacks that are currently in existence
    • EXECIO - to read data from and write data to data sets. Using EXECIO, you can read data from and write data to the data stack or stem variables.
    • SUBCOM - to determine whether a particular host command environment is available for the processing of host commands
    • EXECUTIL - to change various characteristics that control how a REXX exec is processed. You can use EXECUTIL in an exec or CLIST, and from TSO/E READY mode and ISPF.
    • Immediate commands, which are:
      • HE (Halt Execution) - halt execution of the exec
      • HI (Halt Interpretation) - halt interpretation of the exec
      • TS (Trace Start) - start tracing of the exec
      • TE (Trace End) - end tracing of the exec
      • HT (Halt Typing) - suppress terminal output that the exec generates
      • RT (Resume Typing) - resume terminal output that was previously suppressed.

      You can use the TS and TE immediate commands in a REXX exec to start and end tracing. You can use any of the immediate commands if an exec is running in TSO/E and you press the attention interruption key. When you enter attention mode, you can enter an immediate command. The commands are described in TSO/E REXX commands.

  • Invoking an exec

    You can invoke another REXX exec using the TSO/E EXEC command processor. For more information about the EXEC command, see z/OS TSO/E Command Reference.

  • Linking to and attaching programs
    You can use the LINK, LINKMVS, and LINKPGM host command environments to link to unauthorized programs. For example:
    ADDRESS LINK "program p1 p2 ..."
    You can use the ATTACH, ATTCHMVS, and ATTCHPGM host command environments to attach unauthorized programs. For example:
    ADDRESS ATTACH "program p1 p2 ..."

    For more information about linking to and attaching programs, see Host command environments for linking to and attaching programs.

  • Interactive System Productivity Facility (ISPF)
    You can invoke REXX execs from ISPF. You can also write ISPF dialogs in the REXX programming language. If an exec runs in ISPF, it can use ISPF services that are not available to execs that are invoked from TSO/E READY mode. In an exec, you can use the ISPEXEC and ISREDIT host command environments to use ISPF services. For example, to use the ISPF SELECT service, use:
    ADDRESS ISPEXEC 'SELECT service'

    You can use ISPF services only after ISPF has been invoked.

  • TSO/E commands

    You can use any TSO/E command in a REXX exec that runs in the TSO/E address space. That is, from ADDRESS TSO, you can issue any unauthorized and authorized TSO/E command. For example, the exec can issue the ALLOCATE, TEST, PRINTDS, FREE, SEND, and LISTBC commands. z/OS TSO/E Command Reference and z/OS TSO/E System Programming Command Reference describe the syntax of TSO/E commands.

  • TSO/E programming services

    If your REXX exec runs in the TSO/E address space, you can use various TSO/E service routines. For example, your exec can call a module that invokes a TSO/E programming service, such as the parse service routine (IKJPARS); TSO/E I/O service routines, such as PUTLINE and PUTGET; message handling routine (IKJEFF02); and the dynamic allocation interface routine (DAIR). These TSO/E programming services are described in z/OS TSO/E Programming Services.

  • TSO/E REXX programming services

    In any address space, you can use the TSO/E REXX programming services, such as IRXEXEC and IRXJCL, IRXEXCOM, and IRXIC. The services are described in TSO/E REXX programming services.

  • Interaction with CLISTs.

    In TSO/E, REXX execs can invoke CLISTs and can also be invoked by CLISTs. CLIST is a command language and is described in z/OS TSO/E CLISTs.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014