Writing Your Own Utility Programs

You might need to write your own utility programs or obtain them from other software vendors. MSS passes a standard MVS parameter area to these programs when they are invoked by TSO commands or JCL statements.

For a COBOL program, the parameter area has the following definition:

01 PARM.
      03 PARM-LENGTH         PIC 9(4)COMP.
      03 PARM-DATA.
         05 PARM-DATA-ARRAY  PIC X OCCURS 100.

PARM-DATA contains the data specified in the parameter field of the TSO command or JCL statement. MSS converts it to the default data representation defined for your system - ANSI or EBCDIC. The utility program should inspect the parameter data, determine its data representation and convert it, if necessary, to the representation used by the program.

Important: The utility program must be compiled within your COBOL development system to ensure that all interactions with the system are handled correctly.

For a PL/I program, the parameter area can be declared as CHAR(100) VARYING, or a structure equivalent to the COBOL definition.