Before You Begin
Purpose
This tutorial shows you how to compile PeopleSoft COBOL programs using Micro Focus® Server Express™ COBOL compiler on an Oracle Compute Cloud Service instance.
Time to Complete
30 to 45 minutes
Background
On Linux operating systems, you always need to
compile your COBOL programs after installation.
There are two fundamental processes that need to be
run in order to compile, link successfully, and
execute COBOL programs. First, the COBOL programs
must be compiled (by running the utility pscbl.mak),
and secondly, the COBOL runtime programs, PSRUN and
PSRUNRMT, must be linked with other PeopleSoft
libraries (by running the utility psrun.mak).
Context
This tutorial is part of the following set of tutorials, which describe how to deploy a PeopleSoft environment to Oracle Compute Cloud Service:
- Generating an SSH Key Pair for Oracle Compute Cloud Service Instances
- Migrating PeopleSoft Applications to Oracle Compute Cloud Service
- Installing Micro Focus COBOL Compiler and License on an Oracle Compute Cloud Service Instance (optional)
- Compiling PeopleSoft COBOL Programs on an Oracle Compute Cloud Service VM Instance (optional)
- Performing PeopleTools-Only Upgrade on PeopleSoft Environments Running in Oracle Cloud (optional)
- Performing a PeopleTools Patch Update on a PeopleSoft Environment Running in Oracle Cloud (optional)
- Cloning a PeopleSoft Environment in Oracle Cloud (optional)
- Scaling Existing PeopleSoft Environments on Oracle Cloud (optional)
- Using PeopleSoft Update Images in Oracle Compute Cloud Service
What Do You Need?
- Subscription to Oracle Compute Cloud Service.
See Oracle Compute Cloud Service, Get Started. - Secure Shell (SSH) key with a bit size of 2048
or higher.
See Creating Oracle Compute Cloud Service Instances Using an Orchestration, Generating an SSH Key Pair. - The operating system on your Oracle Compute Cloud Service instance used for the PeopleSoft Application Server must be Oracle Linux 6.6.
- Storage volumes attached to the created
instance.
The Micro Focus Server Express COBOL compiler requires an additional 275 MB of storage. Compiled COBOL programs will require up to an additional 5 GB depending on the number of PeopleSoft COBOL Applications installed. - Micro Focus Server Express installation
See the tutorial Installing Micro Focus COBOL Compiler and License on an Oracle Compute Cloud Node.
- Micro Focus Server Express Compiler installed on a Oracle Compute Cloud Service Instance
- Micro Focus License Manager Facility installed on an Oracle Compute Cloud Service Instance
- Micro Focus Server Express License installed on the License Manager Facility
- PeopleSoft PeopleTools installed on an Oracle Compute Cloud Service Instance
- PeopleSoft applications installed on an Oracle Compute Cloud Service Instance
- Read/write access to the directory PS_HOME/cblbin
- To copy a compiled COBOL program from one UNIX
server to another, they must be on the same
operating system that the compile took place on.
Because Oracle Compute Cloud Service instances in
this tutorial are on the same operating system (Linux),
compiled COBOL programs can be copied from one
instance to another.
Process Overview
The installation includes the following high-level steps:
- Set environment variables.
- Compile COBOL.
- Link COBOL.
- Re-compile COBOL (optional)
Setting Environment Variables
On the Oracle Cloud instance with your migrated PeopleSoft environment, ensure that the environment variables are set correctly.
- Set $ORACLE_HOME to the correct Oracle
installation; for example:
ORACLE_HOME=/products/oracle/11.2.0;export ORACLE_HOME
- Add $ORACLE_HOME/bin to the PATH environment
variable; for example:
PATH=$PATH:$ORACLE_HOME/bin; export PATH
- Append $ORACLE_HOME/lib to LD_LIBRARY_PATH, LIBPATH, or SHLIB_PATH, whichever is appropriate for your platform.
- Set $ORACLE_SID to the correct Oracle instance;
for example:
ORACLE_SID=hdmo; export ORACLE_SID
- Set $COBDIR to the Micro Focus Server Express
installation; for example:
COBDIR=/products/mf/svrexp-51_wp6;export COBDIR
- Append $COBDIR/lib to LD_LIBRARY_PATH,
LIBPATH, or SHLIB_PATH, whichever is appropriate
for your platform.
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$COBDIR/lib;export LD_LIBRARY_PATH LIBPATH=$LIBPATH:$COBDIR/lib; export LIBPATH
SHLIB_PATH=$SHLIB_PATH:$COBDIR/lib; export SHLIB_PATH - Append $COBDIR/bin to the PATH; for example:
PATH=$PATH:$COBDIR/bin; export PATH
- To set the required PeopleSoft environment
variables, source the script
psconfig.sh. Enter the following command from the PS_HOME directory:
. ./psconfig.sh
Compiling COBOL
Compiling COBOL with a PS_HOME Setup
This section assumes that you installed the PeopleSoft application software to a PS_APP_HOME directory that is the same as the PS_HOME directory where you installed PeopleSoft PeopleTools. It also assumes that there is no separate PS_CUST_HOME directory with customized COBOL source files.
- If you haven't already done so, download all
required patches to your file server, and from
there FTP the contents of src\cbl\base and
src\cbl\unix over to src/cbl on the relevant
application or batch server.
Note. When you copy patches over from the file server, the files need to have a lowercase cbl extension and an uppercase program name, as in PATCH.cbl. - Source the script psconfig.sh from PS_HOME
to set up environment variables correctly on
your application or batch server.
. ./psconfig.sh
- Change to the PS_HOME/setup
directory:
cd $PS_HOME/setup
- To compile all of the COBOL source programs
dynamically, issue the command:
./pscbl.mak
- INT files in PS_HOME/src/cblint
- LST files in PS_HOME/src/cbl/lst
- GNT files in PS_HOME/cblbin
Warning! Proposed ISO 2000 COBOL features are enabled. Refer to the Micro Focus documentation for details, and do not rely on these features being supported in future products from Micro Focus due to changes in the proposed COBOL standard.
Compiling COBOL with a PS_APP_HOME Setup
This section assumes that you installed the PeopleSoft application software to a PS_APP_HOME directory that is different from the PS_HOME directory where you installed PeopleSoft PeopleTools. It also assumes that there is no separate PS_CUST_HOME directory with customized COBOL source files.
- Verify that the PS_HOME environment variable
is set:
echo $PS_HOME
/home/psftuser/PTcompile - Set the PS_APP_HOME environment variable (PS_APP_HOME
refers to the location where you have
installed the PeopleSoft application software)
with this command:
PS_APP_HOME=/home/psftuser/PSAPPcompile; export PS_APP_HOME
-
Run
pscbl.mak, using one of these methods:- To compile all PeopleSoft COBOL
programs, that is, those for PeopleSoft
PeopleTools and PeopleSoft applications,
run this command:
pscbl.mak
This will compile the programs that are under PS_HOME/src/cbl and PS_APP_HOME/src/cbl. - To compile only PeopleSoft PeopleTools
COBOL programs, run this command:
pscbl.mak PS_HOME
- To compile only PeopleSoft application
COBOL programs, run this command:
pscbl.mak PS_APP_HOME
- To compile a single COBOL program, run
the command with the COBOL program name
excluding the .cbl extension.
For example, for a PeopleSoft PeopleTools COBOL program PTPDBTST.CBL, or a PeopleSoft application COBOL program GPPDPRUN.CBL, run:
pscbl.mak PTPDBTST
pscbl.mak GPPDPRUN
- To compile all PeopleSoft COBOL
programs, that is, those for PeopleSoft
PeopleTools and PeopleSoft applications,
run this command:
PeopleSoft PeopleTools compiled COBOL programs will be placed under the PS_HOME/cblbin directory. PeopleSoft Application compiled COBOL programs will be placed under the PS_APP_HOME/cblbin directory.
Compiling COBOL with a PS_CUST_HOME Setup
This section assumes that you have set up a PS_CUST_HOME environment variable for customized COBOL source files.
- Verify if the PS_HOME environment variable
is set with this command:
echo $PS_HOME
/home/psftuser/PTcompile - If the PS_APP_HOME directory is
different from PS_HOME, set the
PS_APP_HOME environment variable with this
command:
PS_APP_HOME=/home/psftuser/PSAPPcompile; export PS_APP_HOME
- Set the PS_CUST_HOME environment variable
with this command
PS_CUST_HOME=/home/psftuser/CUSTcompile; export PS_CUST_HOME
- To compile all the COBOL source under the PS_CUST_HOME
location dynamically, issue the command:
./pscbl.mak PS_CUST_HOME
PeopleSoft PeopleTools compiled COBOL programs and PeopleSoft application compiled COBOL programs will be placed under the PS_CUST_HOME/cblbin directory.
Linking COBOL
This procedure creates and links two PeopleSoft programs. PSRUN is the PeopleSoft procedure that connects the COBOL batch programs with the RDBMS API. PSRUNRMT is the PeopleSoft procedure that connects the remote COBOL programs with the RDBMS API.
You need to create the PSRUN and PSRUNRMT programs in the following situations:
- You are installing PeopleSoft software for the first time.
- Any COBOL programs have changed.
- The version of the RDBMS running the PeopleSoft system has changed.
- The COBOL compiler has changed.
- One of the C programs supplied with the PeopleSoft system has changed.
To link COBOL components:
- Change to the PS_HOME/setup directory:
cd $PS_HOME/setup
- For dynamic linking, run this command:
Note. The PeopleSoft system only supports dynamic linking of COBOL. Static linking is not an option.
./psrun.mak
The PSRUN.MAK script should return the Linux prompt when done. If the link completes without errors, the files PSRUN and PSRUNRMT will now exist in the PS_HOME/bin directory. If you encounter errors, check PS_HOME/setup/psrun.err and PS_HOME/setup/psrunrmt.err.
Note. If you are running on an Oracle 11.2.0.4 database platform, you may see the following error when you attempt to link:
Undefined symbol nzosSCSP_SetCertSelectionParams referenced in file /products/oracle/11.2.0.4.0-64bit/lib/libclntsh.so.11.1
To resolve this problem:
- Edit the LD_LIBRARY_PATH environment variable so
that $ORACLE_HOME/lib comes before $TUXDIR/lib.
For example:
LD_LIBRARY_PATH_SAVE=$LD_LIBRARY_PATH; export LD_LIBRARY_PATH_SAVE
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH - Execute
psrun.makagain. - Reverse the change you made in step 1; for
example:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH_SAVE; export LD_LIBRARY_PATH
Recompiling COBOL
You always need to compile at installation, so you will only need to recompile COBOL in the following situations:
- You are installing PeopleSoft software for the first time.
- The supported COBOL compiler changes.
- You change the version of your RDBMS.
- You change the version of your operating system.
- You apply a PeopleSoft PeopleTools upgrade, patch, or fix.
To recompile all your COBOL programs, use the instructions in the section Compiling COBOL.
To compile a single COBOL program dynamically, use this command syntax:
./pscbl.mak <PROGRAM NAME WITHOUT "cbl" EXTENSION>
For example, the following command compiles the lone file PTPDBTST.
./pscbl.mak PTPDBTST
The compile should run without errors until it completes. After the script is complete, check the destination directories for the newly created files. They should have a length greater than zero as well as a current date and time stamp. You can find the files in the following locations:
- For a PS_HOME setup: PS_HOME/src/cbl/int, PS_HOME/src/cbl/lst, and PS_HOME/cblbin
- For PS_APP_HOME setup: PS_APP_HOME/src/cbl/int, PS_APP_HOME/src/cbl/lst, and PS_APP_HOME/cblbin
- For PS_CUST_HOME setup: PS_CUST_HOME/src/cbl/int, PS_CUST_HOME/src/cbl/lst, and PS_CUST_HOME/cblbin
Want to Learn More?
- PeopleTools Installation for your database platform, "Installing and Compiling COBOL on UNIX."
-
PeopleSoft Enterprise Frequently Asked Questions About PeopleSoft and COBOL Compilers, My Oracle Support, Doc ID 747059.1.