Migrating COBOL DMS
There are two parts to migrating a COBOL DMS (data mover script):
- Migrate the data mover script to
- Run the data mover script in Data mover
Migrating the script ensures that the correct version of the file exists in your target environment. Running the data mover script updates the COBOL SQL statements table
PS_SQLSTMT_TBL with the latest version of the data mover script.
It is the
PS_SQLSTMT_TBL that stores the version of the SQL statements run by a COBOL process. It is good pratice to have the DMS script files in sync with the version in the SQL statements table to avoid confusion.
When comparing versions of SQL statements (e.g. for comparing patches) use the
PS_SQLSTMT_TBL as your definitive source, as the version in
%PS_HOME%/src/cbl/ may not be same!
COBOL SQL Trace
This article explains how to enable a COBOL SQL trace on a COBOL process definition.
First, determine the COBOL SQL process parameters by navigating to:
Open the COBOL SQL process appropriate for your operating system and database platform (e.g. UNIX and Oracle).
Copy the text in the Parameter List excluding %%PRCSNAME%% (not required).
Next, override the Process Definition parameter list for the COBOL you want to trace by navigating to:
Open your COBOL process definition. In this example, I'm using the
PTPDBTST simple COBOL test program delivered with PeopleTools. In the override options, set the parameter list option to override.
Paste the parameter list you copied into here, but make one small change. Just before
%%DBFLAG%%there are two slashes
//. In between these slashes enter your trace SQL bit mask. I normally use
135. So the parameter list should now look like this:
Finally, run your COBOL through the appropriate run control page. In the view log/trace file list you should see a file with the extension
.trc. This is the COBOL SQL trace with timings.
Compiling COBOL locally can save you considerable time during the development/troubleshooting stage.
The steps for compiling COBOL locally are:
- Install Microfocus NetExpress
- Configure the
%COBROOT%system variable to point to the Microfocus NetExpress compiler path
- Copy the batch files for compiling COBOLs from
- Copy all COBOLs to a local directory, for example
- Compile COBOLs using the
When you install Microfocus, put it in a directory with no spaces. I like to use something like
C:\NetExpress rather than the default directory. This is just a preference, I'm not sure if it causes any issues.
You will need create a system environment variable called
COBROOT. This points to the Base directory of your Microfocus NetExpress installation. For example,
Browse to your PeopleSoft File Server and copy the following files from
%PS_HOME%\src\cbl\win32 to your
Copying them to your
WINDOWS directory lets you run them from anywhere as they are automatically in the system path.
Copy all the COBOLs from your PeopleSoft file server to a local directory (
Command prompt to the local directory and attempt to compile a program (e.g. the delivered
PTPDBTST program) by issuing the command (note that you drop the
Hopefully it compiles for you. If not, you may have forgot to set the
COBROOT environment variable. Make sure you set this first.
To build all cobols, run the following command (in Windows) from
cblbld.bat C: \temp
This will copy source COBOLs from
C:\Temp (or whatever drive and directory you specify), compile them and put them in a directory named
After the build, the build log will be displayed. You can also view the build log by opening the file
CBLBLD.LOG which will be located in the compile directory (e.g.
If you find the following throughout your log file:
... Creating error listing (COBOL1.LIS) Creating error listing (COBOL2.LIS) Creating error listing (COBOL3.LIS) ...
It may mean your Microfocus NetExpress license has expired. Check by starting Microfocus NetExpress. COBOLs will not compile on Windows systems when the license has expired.
If compiling gives the following error:
Application Program Failed Action Type : SQL CONNEC In Pgm Section : SQLRT:GG100 SQL-CONNECT With Return Code: 9989 Error Message : SQLRT: Operator ID not allowed to submit COBOL from client
This can be caused by having
%PS_HOME%\bin\client\winx86\ in your system path. Remove this location from your system path and try again.