Space announcement This documentation space provides the same content as before, but the organization of the content has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

TEST


COBOL

PL/I

Assembler

C Language

Description

Use the TEST command in the input command stream (XPIN DD) to specify the name of the program to be tested and the parameters necessary to establish the test. The TEST command is not used in the BTS, IMS/DC, and Dialog box environments.

Input

image2021-2-16_15-49-15.png

The following are the parameter descriptions for the TEST command:

program-name

The name of the load module to be tested. This is a required field.

ENTry (COBOL and Assembler)

An optional alternate entry-point in the module if execution is to begin from some point other than the link-edited entry point, or the entry-point for the load module if no entry-point is specified in the link-edit.

LOAdm

If the program to be tested is a member of a statically linked load module, enter the name of the composite load module as the value for this parameter. When entered, execution starts at the named program name, not at the linked entry point of the load module. If the program name and the load module name are the same, a value is not required for this field.

INITscr

The member name of the initial test script. This test script is executed before the execution of any commands in the input command stream the first time the test is executed. The initial-script specified must be a member of a PDS allocated to the ddname XINCLUDE.

POStscr

The member name of the post script. It can be any name up to eight characters. The post-script must be a member of a PDS allocated to the ddname XINCLUDE. This script is executed after the COBOL GOBACK or PL/I END statement of the high-level module is encountered, but before the test session is exited.

PARM

The following parameter is valid only for the Standard environment:

’parm-string’

A run-time parameter, if one is required by the program. The PARM string specified can be up to 100 characters. The value is entered as it would be in batch JCL, enclosed in single quotes.

If a batch PARM string is specified both on the TEST command and in the JCL, the PARM value on the TEST command is used.

PARM

The following values are valid only if IMS was specified as the value for the environment on the previous XPED command:

STD

STD is the default, and is used when testing a standard IMS program. Code Debug TSO passes the PARM string to the program unaltered.

SUB (COBOL and Assembler)

Specify a value when an IMS subroutine is to be tested as a stand-alone program.

Code Debug TSO issues a prompt, requesting entry of the USE command at the outset of the test. The USE command must be issued to assign addressability to the PCB. For more information, see to USE.

NOQ (COBOL and Assembler)

(No queue.) Specify a value when an IMS/DC program is to be tested under the Code Debug TSO environment. Code Debug TSO matches the PARM string that IMS passes to the program with the PARM string that the program is expecting in reverse order. This allows you to test the logic and database calls of an IMS/DC program under TSO when a message queue is not available.

Usage Notes

ALL Languages

  1. Place the TEST command after the XPED command in the command stream and before any breakpoint commands.
    If breakpoint commands are entered before the TEST command, the test is terminated.
  2. The TEST command is used to specify the program to be tested for all environments except BTS, IMS/DC, and Dialog box. See to INTERCEPT for information on how to invoke programs for testing in this environment.
  3. Any number of TEST commands can be entered in the same job stream. All commands that follow a TEST command are executed in relation to the program specified by that TEST command until either another TEST command or an INTERCEPT command is entered.
  4. Code Debug TSO automatically generates a TEST command for interactive tests.
  5. The TEST command and the parameters specified are recorded in the session log.
  6. Any commands following an EXIT command and preceding another TEST command are executed in relation to the program specified on the TEST command preceding the EXIT command.
  7. Any commands entered between the GO and the EXIT commands associated with a test will be executed at the end of the test before execution of any post scripts for that test.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*