Tutorial: Create and Load the HCO_Test Database

Provides instructions that walk you through the process of creating the HCO_Test Amazon Aurora or Amazon RDS for PostgreSQL database.

Both HCOPG Application Migration tutorials require that you have access to the HCO_Test PostgreSQL database that contains data migrated from an IBMSYS schema in a DB2 database. To make this easy for you, we have provided two scripts that create and load the database for you.

  1. Start a Windows command prompt.
  2. Navigate to the %PUBLIC%\Documents\Micro Focus\Enterprise Developer\Samples\Mainframe\SQL\hcopg directory.
  3. Use either the PostgreSQL psql utility (Amazon Aurora) or the pgAdmin tool (Amazon RDS) to execute the CreateHCO_Test.sql and LoadHCO_Test.sql scripts as follows:
    >psql -h DBInstanceEndpoint -pport -U UserId -a -f CreateHCO_Test.sql
    >psql -h DBInstanceEndpoint -pport -U UserId -d HCO_Test -a -f LoadHCO_Test.sql
  4. At the command prompt, change to the %ALLUSERSPROFILE%\Micro Focus\Enterprise Developer\hcopg directory:
  5. Execute each of the following scripts against the newly created HCO_Test database using either the PostgreSQL psql utility or the pgAdmin tool:
    • InstallSYSIBM.sql
    • InstallBindProcs.sql
    • InstallDigitsFunction.sql
    Note: For more information about these scripts, see Before Using HCO for PostgreSQL.