In this section:
Parasoft Copybook Builder provides a way for Parasoft SOAtest and Virtualize users to generate SOAtest messages and Virtualize responders based on COBOL copybooks. The output of the tool is a single jar file that can be imported into Parasoft products. The jar file contains:
This tool supports syntactically correct copybooks and includes:
The tool does not support OCCURS DEPENDING ON statements or COPY REPLACING statements.
The Copybook tool searches for copybook files in a list of directories provided at runtime. Within each directory, the tool searches a list of filenames and wildcards for copybook files to process.
We recommend that your copybook files have an extension that distinguishes them from COBOL source code (.cpy vs. .cob) or that you store the copybook files in separate directories from any COBOL source code.
Copybook files from Z/OS systems are limited to eight characters, but the Copybook tool does not require this.
If a copybook file contains a COPY statement, the Copybook tool resolves the name by checking for an identical file with the same extension as one provided at run time.
For example, if the copybook contains a COPY ACCTDATA
statement and the filename list was *.cpy,*cbl
, the copybook tool will attempt to find ACCTDATA.cpy
or ACCTDATA.cbl
in the list of directories provided at runtime.
SOAtest and Virtualize support various types of requests (SOAtest) and Responders (Virtualize). These types can include XML, JSON, CSV, plain text and fixed length. When the output of Parasoft Copybook Builder is integrated into these products a new Copybook Message type is created. Each copybook becomes a Message Format for the Copybook format request and responder. Perform the following steps to use the Copybook Message type:
Executing the CommandRun the com.parasoft.soavirt.messages.copybook-<version>.jar file using the following command to build read the copybook files and generate the JAR file that you will integrate into the UI:
The command uses the following arguments:
Example
The example searches the following folders:
Any file that matches the wildcards *.cbl or *.cpy wil be processed as a copybook. Copybook Builder doesn’t recurse sub-directories. Specify subdirectories as a separate entries in the copybookinput option. Also use quotation marks if the directories contain spaces or special characters. When the Copybook tool finishes, there will be two files created in the directory: copybook.jar and velocity.log. Assuming there are no errors, velocity.log can be deleted. Integrate the copybook.jar file as described in Integrating the Copybook Tool into the UI. Integrating the Copybook Tool into the UIThe Copybook tool is implemented in the SOAtest and Virtualize UI as a system JAR file, which is output by executing the JAR in Executing the Command.
Using a Copybook in a ResponderThis example demonstrates how to create a Virtualize responder from a copybook.
|
You can repeat these steps to create a copybook request in your SOAtest environment.