Browse Prior Art Database

Control Block Scaffolding With Test DSECTS

IP.com Disclosure Number: IPCOM000052776D
Original Publication Date: 1981-Jul-01
Included in the Prior Art Database: 2005-Feb-11
Document File: 2 page(s) / 14K

Publishing Venue

IBM

Related People

Corbi, TA: AUTHOR

Abstract

This article describes a procedure for scaffolding control blocks using test DSECTS (dummy control sections). DSECT macros are transform mapped into assembled control blocks with required values to enable the unit testing of a module which requires a scaffold of such control blocks.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 2

Control Block Scaffolding With Test DSECTS

This article describes a procedure for scaffolding control blocks using test DSECTS (dummy control sections). DSECT macros are transform mapped into assembled control blocks with required values to enable the unit testing of a module which requires a scaffold of such control blocks.

""Control blocks'' are the data structures which contain the information which the programming system needs in order to understand how to perform the functions for which it was designed. They are usually dynamic.

Storage for a given control block (or set of blocks) is acquired from the underlying operating system. Bytes at particular relative offsets within a contiguous piece of storage are then initialized by various modules with various default-, system-, or user-specified values. Related discontiguous control blocks are typically linked together with pointers, which are fields containing the in- storage starting address of a related control block. This technique is called ""chaining''.

Later, as the programming system performs its function, the control blocks are updated with new information reflecting the activity which has occurred.

In assembler language, the offsets to various locations within a contiguous piece of storage are described by a dummy control section (DSECT). The DSECT is a reference control section that allows the assembly language (BAL) programmer to describe the layout of data in a storage area without actually reserving any storage. The assembler does assign location values to the symbols defined in the DSECT relative to the beginning of the dummy section. The programmer uses these symbols as offsets to a register which at runtime is loaded with the address of the start of the storage representing a particular instance the control block (see discussion of DSECT in OS/VS-DOS/VS-VM/370 Assembler Language Manual, IBM publication GC33-4010).

A ""chicken-and-egg'' problem confronts the programmer attempting to unit test a particular module. At the time in the development cycle when a programmer wishes to check out the logic of how his individual module retrieves, processes, and stores data in the programming system's control blocks, the other modules which acquire the storage, initialize, or process the control blocks prior to calling his module are also in development. He must wait until these modules are finished, or he must scaffold a static set of control blocks with the fields initialized to ## (Table 1) values which will cause his program to execute the paths which he wishes to test.

Depending on the complexity of the programming system and its control blocks, scaffolding by hand may be a tedious process. Further, the prob...