Skip to content

PS_APP_PATCH_HOME and Custom COBOL Compile

The delivered COBOL compile scripts support compiling each HOME individually, but we can’t combine homes into a single CBLBINA folder. Additionally, with PeopleTools 8.55 dropping support for PS_CUST_APP_HOME, we are using a custom PS_APP_PATCH_HOME folder in the layer between PS_CUST_HOME and PS_APP_HOME.

To learn about PS_APP_PATCH_HOME, check out this video overview of the custom home we built for patching.

 

CBLBINA Directories Before

Before the change, we compiled each decoupled home separately we had 3 CBLBINA directories.

+-------------+  +-------------+  +--------------+
|             |  |             |  |              |
|   PS_HOME   |  | PS_APP_HOME |  | PS_CUST_HOME |
|             |  |             |  |              |
+-------------+  +-------------+  +--------------+

CBLBINA Directories After

After the change, we have 2 CBLBINA directories. One for the PeopleTools COBOL programs, and one for the application programs. The application COBOL programs are stored in our PS_CUST_HOME\CBLBINA folder.

+-------------+  +-------------------+
|             |  | PS_APP_HOME       |
|   PS_HOME   |  | PS_APP_PATCH_HOME |
|             |  | PS_CUST_HOME      |
+-------------+  +-------------------+

Modified Build Script

We use a batch helper script to configure the environment and call our new cblbld_all.bat script. The script CompileHR92DEVCobols_APP_PATCH_CUST.bat script will configure the environment variables for HR92DEV. Then it calls cblbld_all.bat e: \psoft\temp\compile ASCII to compile the COBOL source files.

This command cblbld_all.bat e: \psoft\temp\compile ASCII will trigger:

  1. File copy from PS_APP_HOME\src\cbl\base
  2. File copy from PS_APP_PATCH_HOME\src\cbl\base
  3. File copy from PS_CUST_HOME\src\cbl\base
  4. Compile the combined source files
  5. Copy compiled COBOLs to PS_CUST_HOME\CBLBINA

The delivered cblbld_mf.bat file was copied to e:\psoft\tools and renamed to cblbld_all.bat. The script was modified to support the changes above. We also merged in code from the cblsrc.bat script that copied the source files. The cblbld_all.bat script does all the steps for our compilation process.

This is the high-level code for the script. The actual script is longer, contains extra code from the delivered script, like folder/permissions checks, and has Oracle’s copyright. So here are the changes we made to cblbld_mf.bat.

rem ------------------------------------------------
set COMPILEDRIVE=%1
set COMPILEDIR=%2
set CBLSRCDR=%PS_HOME%\SRC\CBL
set CBLBINDR=%PS_CUST_HOME%\CBLBINA
set PS_purge_CBLBLDLOG = Y
set CBLBLDLOG=%COMPILEDRIVE%%COMPILEDIR%\CBLBLD.LOG

rem ------------------------------------------------
rem Delete the contents of the compile directory.
if defined PS_purge_CBLBLDLOG (
    echo Y | del %COMPILEDRIVE%%COMPILEDIR% > NUL
)

rem ------------------------------------------------
rem Copy Source Files
call %PS_HOME%\SETUP\CBLRTCPY %CBLBINDR% >> %CBLBLDLOG% 2>&1
copy %PS_HOME%\src\cbl\base\PTC*.cbl %COMPILEDRIVE%%COMPILEDIR%
copy %PS_HOME%\src\cbl\win32\* %COMPILEDRIVE%%COMPILEDIR%
copy %PS_APP_HOME%\src\cbl\base\*.cfg %COMPILEDRIVE%%COMPILEDIR%
copy %PS_APP_HOME%\src\cbl\base\*.cbl %COMPILEDRIVE%%COMPILEDIR%
copy %PS_APP_PATCH_HOME%\src\cbl\base\*.cfg %COMPILEDRIVE%%COMPILEDIR%
copy %PS_APP_PATCH_HOME%\src\cbl\base\*.cbl %COMPILEDRIVE%%COMPILEDIR%
copy %PS_CUST_HOME%\src\cbl\base\*.cfg %COMPILEDRIVE%%COMPILEDIR%
copy %PS_CUST_HOME%\src\cbl\base\*.cbl %COMPILEDRIVE%%COMPILEDIR%

rem ------------------------------------------------
rem Compile COBOL Programs
call CBLMAKE ALL >> %CBLBLDLOG%  2>&1

rem ------------------------------------------------
rem Deploy
IF EXIST %CBLBINDR%\*.EXE echo Y | del %CBLBINDR%\*.EXE
IF EXIST %CBLBINDR%\*.GNT echo Y | del %CBLBINDR%\*.GNT
IF EXIST %CBLBINDR%\*.INT echo Y | del %CBLBINDR%\*.INT

call %PS_HOME%\SETUP\CBLBIN %COMPILEDRIVE%%COMPILEDIR% %CBLBINDR% >> %CBLBLDLOG%

7 thoughts on “PS_APP_PATCH_HOME and Custom COBOL Compile”

  1. Pingback: #25 – Intro to Elasticsearch – psadmin.io

  2. Pingback: Change Assistant and File Servers – psadmin.io

  3. Pingback: All About COBOL

  4. Hi there

    Saw your cool video on “PS_APP_PATCH_HOME and Custom COBOL Compile”. To double check it I want to repoint say Cobols to a PS_TAX_HOME when we do tax updates (we have three environments on the same server) I would need to copy the compiled cobols there, update the psprcs.cfg (CBLBIN), update the psappsrv.cfg (RCCBL PRDBIN), and then add environmental variable for psadmin(C:\Windows\system32>SET PS_TAX_HOME=E:\psoft\pt\ps_tax_home)in psadmin? Does that about right or am I missing anything?

    Cheers
    Peter

    1. Hi Pete – for COBOLs, we copy our source files to PS_TAX_HOME. But when we compile our COBOLS, we end up with only one set of compiled binaries. The reason is: there is a bug with the COBOL runtime where it doesn’t always look at PS_CUST_HOME for customized programs if the main COBOL program is running from PS_APP_HOME.

      How we handle that is to only generate one set of COBOL binaries. Our compile process looks like this:

      1. Copy PS_HOME src files to compile directory
      2. Copy PS_APP_HOME src files to compile directory
      3. Copy PS_TAX_HOME src files to compile directory
      4. Copy PS_CUST_HOME src files to compile directory
      5. Compile COBOL
      6. Copy the CBLBINA folder to PS_CUST_HOME/CBLBINA

      This ensures that the compiled programs have everything (including our tax updates) but all of the programs live in one folder. This eliminates any confusion and bypasses the COBOL runtime bug with decoupled homes.

  5. Pingback: #162 – Top 5 – Intro to Elasticsearch (#25)

  6. Pingback: #170 – A Buggy Podcast

Leave a Reply

Your email address will not be published. Required fields are marked *