Before Using HCO for PostgreSQL

HCOPG mimics z/OS functions and other z/OS functionality by storing PostgreSQL stored procedures and tables in your PostgreSQL database(s). To successfully use HCOPG, it is important that you update this stored information each time you upgrade your version of Enterprise Developer, including new releases, patch updates, or hotfixes. Doing so ensures that HCOPG always executes optimally.

We provide three HCOPG scripts you can use to update your PostgreSQL database(s) after each upgrade. By default, all are located in your %ALLUSERSPROFILE%\Micro Focus\Enterprise Developer\hcopg directory:

InstallSYSIBM.sql
Creates metadata tables.
InstallBindProcs.sql
Creates PostgreSQL stored procedures required for binding and managing temporary table metadata.
InstallDigitsFunction.sql
Creates PostgreSQL stored procedures required to support DB2 z/OS functions.
To execute these scripts against any PostgreSQL database, you must have the following permissions to the database:
  • CREATE SCHEMA
  • CREATE PROCEDURE
  • EXECUTE PROCEDURE in the SYSIBM schema

We suggest that you choose from the following methods of script execution:

pgAdmin tool (Amazon RDS)
Execute all three HCOPG scripts against each PostgreSQL database.
PostgreSQL psql utility (Amazon Aurora)
This option enables you to automate the process, running the three scripts consecutively. Use the following syntax at a command prompt:
>psql -h DBInstanceEndpoint –p=Port –u=UserId -d Dbname -a -f ScriptDir/HCOPGScript.sql

Where:

DBInstanceEndpoint Endpoint of Amazon Aurora or RDS PostgreSQL instance
Port Port number of Amazon Aurora or RDS PostgreSQL instance
Userid User executing the HCOPG script
Dbnam Name of the database
ScriptDir Full path to the directory that contains the scripts
HCOPGScript Name of an HCOPG script