Submitting a compile request with a copybook

Use the Parameterized Build > Upload Copybook Member to Host and Parameterized Build > Compile requests to submit a COBOL program to the z/OS® system for compiling with a copybook.

Before you begin

This task refers to sample programs shipped with ClearCase® z/OS extensions. To use the sample programs, you need to ensure that your ClearCase administrator has set up a test environment, and you need to be connected to the test VOB and have created a project under the test VOB.

About this task

If the source program selected to be compiled or built contains any copybook that has changed since the last compile request, the updated copybook needs to be uploaded to mainframe before the build request is submitted.

Procedure

To submit a Parameterized Build > Upload Copybook Member to Host request for a program with a copybook, do these steps:
  1. Expand the project containing the sample programs.
  2. Edit copyone.cpy as needed.
  3. Right-click copyone.cpy and click Parameterized Build > Upload Copybook Member to Host.
    A message window shows the upload request is executing.
  4. Verify the copybook member is uploaded in USERID.XCOPYLIB(COPYONE).
  5. Right-click pbtest2.cbl and click Parameterized Build > Compile.
  6. Right-click the project name and click Refresh to verify the output for the build request.

Results

The copybook member is saved in a PDS on the remote system named USERID.XCOPYLIB(YOURCOPY), where USERID is the TSO login ID of the user making the request and YOURCOPY is the name of the copybook. This PDS is searched first for the copybook during the compilation. The output log yourcopy.cpy_uploadcopybook.log, where yourcopy.cpy is the name of the copybook, is located in the project. The BCL upload.bcl for uploading the file is located in the VOB/userid directory on the ClearCase server, where VOB is the path of the VOB and userid is your TSO user ID. The following example shows the BCL generated by an upload request:
9 //* ------------------------------------------------------------------
10 //UPLOAD EXEC PGM=IEFBR14
11 //* ----
12 //* ---- IEFBR14 - Upload and Allocate Copybook Files
13 //* ----
14 //UPLD1 DD DSN=JHUANG.XCOPYLIB(COPYONE),RCCEXT=CPY,
15 // DISP=SHR