Software Version

View Categories

Source Scanning

2 min read

TestBench will attempt source scanning to retrieve Parameter Definitions and System Date operations. Unless any alternatives are specified, the location of the source is indicated by the Object Description for the program. When scanning for parameters and for date operations in the master program specified for the Test Case Process, the Object Description should be found in the specified Program Library. When scanning for date retrieval techniques in other CALLed programs the Test Case Library List will be used. Alternative Source Locations can be set up at the System level and are described in detail in the System Values section.

If the program source cannot be found the user will be prompted to specify the correct location. If the last change date/time on the object does not match that of the source file, the user will have the option to accept this source, bypass the source scanning for the object, or specify a different source location.

Parameter Definitions
Test Cases and Adhoc_IT may require that the structure of the program parameters is defined. If the definitions cannot be fully retrieved the user must manually complete the definitions. Standard definitions for programs which are used regularly can be set up on the global Program Parameters Definition screen which is accessed from the Global Options menu. The function key F8 can then be used when setting up a Test Case to retrieve the existing parameter definition for the program.
Support for the various OS/400 programming languages is as follows:

RPG Parameters identified by name from the *ENTRY PLIST. The definition of each parameter will be returned if directly defined in the Calculation (‘C’) or Input (‘I’) specifications. There is no current support for external file fields.

ILE RPG Parameters identified by name from the *ENTRY PLIST or program prototypes. The definition of each parameter will be returned if defined in the Calculation (‘C’) or Data (‘D’) specifications or external data structures. *LIKE and *LIKEDS definitions are supported, as are /COPY source.

COBOL & ILE COBOL The Working Storage section will be scanned for parameter definitions if any are specified at the start of the Procedure Division. One level of COPY statements is supported, and single level data structures only. Both short hand and long hand pic statements are supported.

CL & ILE CL Parameters identified by name from the PGM statement. The definition of each parameter will be returned if defined on a DCL statement. There is no current support for external file fields.

Others No support in current release.

Date Access
Test Cases provide the option to scan a specified program and the programs it CALLs for date retrieval techniques that bypass the manipulation of the Job Date by TestBench. The details of this verification are as follows:

RPG Use of the TIME keyword into a 12 long field will be flagged as an error. Use of the TIME keyword into a field whose definition cannot be determined will be flagged as a warning. Field definitions are only retrieved from Calculation (‘C’) and Input (‘I’) specifications. Use of the System API QWCRSVAL which can provide access to the System Date will also be flagged as a warning.

ILE RPG Use of the TIME keyword into a 12 long field will be flagged as an error. Use of the TIME keyword into a field whose definition cannot be determined will be flagged as a warning. Field definitions are only retrieved from Calculation (‘C’) and Data (‘D’) specifications. Use of the System API QWCRSVAL which can provide access to the System Date will also be flagged as a warning.

CL & ILE CL Use of the RTVSYSVAL command with a parameter QDATE will be flagged as a error. Use of the System API QWCRSVAL which can provide access to the System Date will also be flagged as a warning.

Others No support in current release.