Submitting multiple COBOL programs linked into one module

Before you begin

Before performing this sample parameterized build request, you need to ensure that the test programs have been set up as described in Setting up a test environment.

About this task

Use sample programs pbtest.cbl and pbtest3.cbl and the link control file pbmain.link to perform this test case. This test case assumes both pbtest.cbl and pbtest3.cbl have been compiled and located in USERID.XOBJLIB. The link control file is uploaded to the z/OS® system with the name PBMAIN located in USERID.XLOADLIB.

Procedure

  1. Edit the link control file USERID.XLOADLIB(PBMAIN) on the z/OS system if needed.
    The following is the sample link control PBMAIN:
    INCLUDE OBJLIB(PBTEST)
    INCLUDE OBJLIB(PBTEST3)
    ENTRY PBTEST
    NAME PBTEST(R)
  2. Add the type attribute LNKDECK to pbtest.cbl and assign the value PBMAIN to LNKDECK as described in Defining variables for the view elements.
  3. Issue the following two commands from the UNIX® command line:
    perl  bccPmbld_main.pl -i /userProfilePath/profileUSER -d /viewElementDirectoryPath pbtest.cbl
    
    perl  bccPmbld_main.pl -i /userProfilePath/profileUSER -d /viewElementDirectoryPath pbtest3.cbl
    In this command:
    userProfilePath
    Is the location of the profileUSER file.
    viewElementDirectoryPath
    Is the location of the parameterized build sample programs.
  4. Verify that pbtext.cbl and pbtest3.cbl are build successfully.
  5. Issue the following command from the UNIX command line:
    perl  bccPmbld_main.pl -l -i /userProfilePath/profileUSER -d /viewElementDirectoryPath pbtest.cbl
    In this command:
    userProfilePath
    Is the location of the profileUSER file.
    viewElementDirectoryPath
    Is the location of the parameterized build sample programs.
  6. Verify the following expected results:
    • The following files are found in the OUTPUT_LOG location defined in profileUSER:
      • userid_pbtest_linkjob.log
      • userid_pbtest_rccbuild.log
    • The following files are found in the OUTPUT_LIST location defined in profileUSER:
      • userid_sourceFile_lked.sysprint, where userid is the user ID of the person submitting the parameterized build request and sourceFile is the name of the file for which the request was submitted
    • The following files are found in the viewElementDirectoryPath:
      • pbtest_lnkbatch.jcl
    • The return code for MVS™ step LKED is '000000'.