Components in the Web Client

Components can be added and selected from the Components menu. Add a component by clicking the Plus button in the component table and select a component by clicking the component name. Both actions will navigate to the Component details page.

Adding a Component

Complete the following steps to add a component

Click the Plus button on the components table, which will navigate to the component details page.

Enter the component name and choose the component type. Also choose a system (optional) and an environment. All systems are listed in the dropdown box, and by writing part of the system name, it will filter the list. It is also possible to click the select button to the left of the dropdown box. This will open a dialog where a system can be selected.

If no system matches the source and load libraries for the component, either start by creating a new System, or manually enter the source and load libraries for the component. Creating a system is only a good idea when several components share the same source and runtime information. Optionally add additional source and load libraries and change other runtime parameters. As shown in Default Values, default values from the system and environment are displayed above the input fields.

Default Values

 

inset_6.jpg

 

When adding components that are not COBOL, the data definition must either be created manually, or you can write the names of the copybooks representing the data in the copybooks input field and then extract the data definition.

Click the Extract data definition button to extract information about data used for input/output to the program. Extract Component Metadata shows the dialog where you can choose to analyze the linkage section of the program or to analyze the copybooks listed in the copybook input field. Choosing the module works only for COBOL programs while the copybook option works for all programs. It is possible to write additional copybooks to be analyzed as well to the program linkage section. You can also choose to use copy/replace in the extraction and to keep the existing elements for the component. This can be valuable when you have made manual changes to the existing elements.

Extract Component Metadata

 

inset_4.jpg

 

Optionally change the data definition manually. If the data contains pointers, it is required to select the data item that the pointer refers, and optionally choose to not include the data area itself in the call area.

Optionally add a description, change the encoding and other settings for a field by clicking the edit button next to a field in the data structure. A dialog appears as illustrated in Edit Field Dialog.

Edit Field Dialog

 

inset_8.jpg

 

Optionally enable the Allow execute without credentials if you want to create graphical skins that should be used without logging into Functional Test. Enabling this option will require you to enter a valid host user ID and password that will be used for authorization when the component is executed though a skin. The password will be encrypted and saved in the database.

Click Create to create the component.

Using Pointer Fields

If a field is a pointer, you have to choose another structure that it should point to. This structure must be a top-level element in the data structure. The top-level element that the pointer points to can either be included or excluded in the call area. In many cases the element will not be included as it is not part of the linkage section. When not part of the linkage section you can either define the structure manually or you can use the Extract data definition feature to analyze a copybook containing the data structure for the pointer.

Complete the following steps to add a data structure for a pointer to a Component and exclude the data structure from the call area

Select the component and click the Edit button

At the Data structure section click Extract data definition. In the Extract dialog, choose Use copybooks and write the name of the copybook. Keep the selected option Keep existing elements after the extract so existing elements will not be overwritten

At the newly added data element, click the Edit button to the right and select the Area Type to be Pointer. This means that the area will not be included in the call.

For the pointer element, select the newly added element in the dropdown next to the pointer element name. The name can also be written as text if you click the Edit button for the field.

inset_9.jpg

 

When executing a component, it is possible for the concrete test Scenario/execution to override the pointer reference. It is also possible to specify a null value. Write $NULL to specify this.

Memory allocation

Memory allocation of pointer areas is by default handled by Functional Test that will call GETMAIN. In cases where the program being tested itself explicitly calls GETMAIN, Functional Test needs to know about this. At the pointer field for which GETMAIN is called, click the Edit button and check the option Program assigned memory.

inset_10.jpg

 

This will be visible at the data structure afterwards. Below is an example for the demo program XADPTRS1, which has two program assigned pointers and one Functional Test assigned pointer.

inset_11.jpg

 

Using CICS Containers, Temporary Storage and TWA

CICS programs will by default use comm area for its input/output data. When a CICS program is executed by a CICS LINK, it is also possible to setup data to be transferred as CICS containers, CICS temporary storage, TWA or a combination of these. This is specified at each top-level element in the data structure by using the Area type property. Below the data structure, input fields will appear for each toplevel element that has a CICS area type. As an example, let’s look at the Functional Test demo program XADCICC3. It has four toplevel elements, each one using a CICS area type of BIT container, CHAR container, temporary storage main and temporary storage auxiliary. The properties defined for these could be as follows:

inset_12.jpg

 

In this example we are only setting names of the input/output containers and queues. More options are available if it is required to set ccsid and codepage and sysid. CICS channel name can be set at the component itself under runtime parameters. The name of a container or TS queue can contain a number of variables that will be evaluated at the mainframe. A variable must be specified with the syntax: &{<symbol>}. Here <symbol> must be one of the supported ones:

taskn :              CICS taskno. 4 bytes packed decimal

task4 :              CICS taskno. 4 bytes display (last 4)

task5 :              CICS taskno. 5 bytes display (last 5)

task6 :              CICS taskno. 6 bytes display

task7 :              CICS taskno. 7 bytes display

task8 :              CICS taskno. 8 bytes display

 

user1 :             CICS userid  1 byte (first byte)

user2 :             CICS userid  2 bytes (first 2 bytes)

user3 :             CICS userid  2 bytes (first 3 bytes)

user4 :             CICS userid  4 bytes (first 4 bytes)

user5 :             CICS userid  5 bytes (..etc)

user6 :             CICS userid  6 bytes (..etc)

user7 :             CICS userid  7 bytes (..etc)

user8 :             CICS userid  8 bytes (..etc)

tran1 :              CICS transaction id 1 byte (first byte)

tran2 :              CICS transaction id 2 bytes (first 2 bytes)

tran3 :              CICS transaction id 3 bytes (first 3 bytes)

tran4 :              CICS transaction id 4 bytes

Using Show One Field for All Occurrences

Many components have filler fields and other fields of typically one character/byte with a large number of occurrences. Such fields will be represented with the same number of input text fields as the occurrence/count number which can be annoying. It is possible to represent such fields or the overlying structure as just one field to the user. The input value entered by the user will then be divided into separate data entities and distributed to the individual field occurrences.

We will illustrate the feature with the XAPGMTST demo program. In the first top-level element for XAPGMTST we will change the week-count structure. The week-count structure contains a wcount field with a count/occurrence of 4. The wcount field is a NumericBinary of length 4. We will set the week-count structure as Show as one input field. This will change the user interface from presenting 4 input fields for wcount under week-count to only present one input field for week-count with the length of 16.

Complete the following steps to setup using one field for a structure

Choose the XAPGMTST component and click the Edit button.

Click the Edit button next to the week-count field.

Select the Show one text input field for all occurrences option and click OK.

Click Update to update the component definition.

Goto the execute page to see the new UI presentation of data. Below we illustrate the difference. First image shows default presentation:

inset_13.jpg

 

and second image shows using one input field:

inset_14.jpg

 

It is also possible to set the option at the wcount field itself instead of the parent structure week-count. When the wcount field is set to be represented as one field, the presentation of data will look like the image below.

inset_15.jpg

 

JCL/Test Scenario and JCL Pre Step

It is possible to add JCL to the component definition. The JCL will be appended to the JCL that is generated when the component is being executed. More precisely it will be used in the step that is executing the component. The JCL can be defined in the JCL/Test Scenario section and each line must be maximum 72 characters.

When the toggle Only use component reference is on, JCL from the System will not be used. Default is to use both the System JCL and the component JCL.

In the JCL Pre step section you can define JCL that will be used in a step before the step that will execute the component. It is possible to use JCLLIB in the JCL. Functional Test will then setup the JCLLIB in the top of the JCL.

inset_31.jpg

 

Modifying a Component

Select a component from the component table and then click the Edit button. This will set the page in edit state. Change any options as described above and finally click Update. The component can also be deleted, but only if it is not used by any skins, stubs or scripts.

As a utility feature, it is possible to open the source code for the component directly in the browser when the source is available as a dataset. Just click the View source code button. In the source code, you can double-click on a copybook and it will also open in the editor as an additional tab. The source editor has settings where line numbers, theme and maximum number of bytes to retrieve can be changed. It is also possible to analyze the linkage section of the program (COBOL) to retrieve copybook names. Click Extract copybooks to do this.