We are using Appeon PB 2017 R3. We would like to connect to PostgreSQL. In our application specific ini file currently we are using DBMS O10. What is the equivalent one for PostgreSQL?
We are using Appeon PB 2017 R3. We would like to connect to PostgreSQL. In our application specific ini file currently we are using DBMS O10. What is the equivalent one for PostgreSQL?
Here's the script DB2SYSPB.SQL, since I cannot attach a TXT file.
//
// This is the script to create the Powerbuilder system tables.
//
// Be sure to:
// - change all occurrences of 'PBOwner' to the name that will own
// the Powerbuilder system tables
// - change all occurrences of 'database.tablespace' to the
// appropriate value
// - put in appropriate statement delimiters for the tool you use
// to execute the sql (i.e. GO statement for ISQL)
// - strip comments and blank lines if necessary
CREATE TABLE PBOwner.PBCATTBL
( PBT_TNAM CHAR(30),
PBT_TID INTEGER,
PBT_OWNR CHAR(30),
PBD_FHGT SMALLINT,
PBD_FWGT SMALLINT,
PBD_FITL CHAR(1),
PBD_FUNL CHAR(1),
PBD_FCHR SMALLINT,
PBD_FPTC SMALLINT,
PBD_FFCE CHAR(18),
PBH_FHGT SMALLINT,
PBH_FWGT SMALLINT,
PBH_FITL CHAR(1),
PBH_FUNL CHAR(1),
PBH_FCHR SMALLINT,
PBH_FPTC SMALLINT,
PBH_FFCE CHAR(18),
PBL_FHGT SMALLINT,
PBL_FWGT SMALLINT,
PBL_FITL CHAR(1),
PBL_FUNL CHAR(1),
PBL_FCHR SMALLINT,
PBL_FPTC SMALLINT,
PBL_FFCE CHAR(18),
PBT_CMNT CHAR(254))
IN database.tablespace
CREATE UNIQUE INDEX PBCATTBL_IDX
ON PBOwner.PBCATTBL
(PBT_TNAM,
PBT_OWNR)
GRANT SELECT, UPDATE, INSERT, DELETE ON
PBOwner.PBCATTBL TO PUBLIC
CREATE TABLE PBOwner.PBCATCOL
( PBC_TNAM CHAR(30),
PBC_TID INTEGER,
PBC_OWNR CHAR(30),
PBC_CNAM CHAR(30),
PBC_CID SMALLINT,
PBC_LABL CHAR(254),
PBC_LPOS SMALLINT,
PBC_HDR CHAR(254),
PBC_HPOS SMALLINT,
PBC_JTFY SMALLINT,
PBC_MASK CHAR(31),
PBC_CASE SMALLINT,
PBC_HGHT SMALLINT,
PBC_WDTH SMALLINT,
PBC_PTRN CHAR(31),
PBC_BMAP CHAR(1),
PBC_INIT CHAR(254),
PBC_CMNT CHAR(254),
PBC_EDIT CHAR(31),
PBC_TAG CHAR(254))
IN database.tablespace
CREATE UNIQUE INDEX PBCATCOL_IDX
ON PBOwner.PBCATCOL
(PBC_TNAM,
PBC_OWNR,
PBC_CNAM)
GRANT SELECT, UPDATE, INSERT, DELETE ON
PBOwner.PBCATCOL TO PUBLIC
CREATE TABLE PBOwner.PBCATFMT
( PBF_NAME CHAR(30) NOT NULL,
PBF_FRMT CHAR(254) NOT NULL,
PBF_TYPE SMALLINT NOT NULL,
PBF_CNTR INTEGER)
IN database.tablespace
CREATE UNIQUE INDEX PBCATFMT_IDX
ON PBOwner.PBCATFMT
(PBF_NAME)
GRANT SELECT, UPDATE, INSERT, DELETE ON
PBOwner.PBCATFMT TO PUBLIC
CREATE TABLE PBOwner.PBCATVLD
( PBV_NAME CHAR(30) NOT NULL,
PBV_VALD CHAR(254) NOT NULL,
PBV_TYPE SMALLINT,
PBV_CNTR INTEGER,
PBV_MSG CHAR(254))
IN database.tablespace
CREATE UNIQUE INDEX PBCATVLD_IDX
ON PBOwner.PBCATVLD
(PBV_NAME)
GRANT SELECT, UPDATE, INSERT, DELETE ON
PBOwner.PBCATVLD TO PUBLIC
CREATE TABLE PBOwner.PBCATEDT
(PBE_NAME CHAR(30) NOT NULL,
PBE_EDIT VARCHAR(254),
PBE_TYPE SMALLINT,
PBE_CNTR INTEGER,
PBE_SEQN SMALLINT,
PBE_FLAG INTEGER,
PBE_WORK CHAR(32))
IN database.tablespace
CREATE UNIQUE INDEX PBCATEDT_IDX
ON PBOwner.PBCATEDT
(PBE_NAME,
PBE_SEQN)
GRANT SELECT, UPDATE, INSERT, DELETE ON
PBOwner.PBCATEDT TO PUBLIC
//
// The following fills the Powerbuilder Format table with
// the default values.
//
INSERT INTO PBOwner.PBCATFMT VALUES (
'[General]',
'[General]',
81,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'0',
'0',
81,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'0.00',
'0.00',
81,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'#,##0',
'#,##0',
81,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'#,##0.00',
'#,##0.00',
81,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'$#,##0;($#,##0)',
'$#,##0;($#,##0)',
81,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'$#,##0;[RED]($#,##0)',
'$#,##0;[RED]($#,##0)',
81,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'$#,##0.00;($#,##0.00)',
'$#,##0.00;($#,##0.00)',
81,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'$#,##0.00;[RED]($#,##0.00)',
'$#,##0.00;[RED]($#,##0.00)',
81,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'0%',
'0%',
81,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'0.00%',
'0.00%',
81,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'0.00E+00',
'0.00E+00',
81,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'm/d/yy',
'm/d/yy',
84,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'd-mmm-yy',
'd-mmm-yy',
84,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'd-mmm',
'd-mmm',
84,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'mmm-yy',
'mmm-yy',
84,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'h:mm AM/PM',
'h:mm AM/PM',
84,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'h:mm:ss AM/PM',
'h:mm:ss AM/PM',
84,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'h:mm:ss',
'h:mm:ss',
84,
0)
INSERT INTO PBOwner.PBCATFMT VALUES (
'm/d/yy h:mm',
'm/d/yy h:mm',
84,
0)
//
// The following fills the Powerbuilder Edit Style table with
// the default values.
//
INSERT INTO PBOwner.PBCATEDT VALUES (
'###,###.00',
'###,###.00',
90,
1,
1,
32,
'10')
INSERT INTO PBOwner.PBCATEDT VALUES (
'#####',
'#####',
90,
1,
1,
32,
'10')
INSERT INTO PBOwner.PBCATEDT VALUES (
'###-##-####',
'###-##-####',
90,
1,
1,
32,
'00')
INSERT INTO PBOwner.PBCATEDT VALUES (
'MM/DD/YY',
'MM/DD/YY',
90,
1,
1,
32,
'20')
INSERT INTO PBOwner.PBCATEDT VALUES (
'DD/MM/YY',
'DD/MM/YY',
90,
1,
1,
32,
'20')
INSERT INTO PBOwner.PBCATEDT VALUES (
'MM/DD/YYYY',
'MM/DD/YYYY',
90,
1,
1,
32,
'20')
INSERT INTO PBOwner.PBCATEDT VALUES (
'DD/MM/YYYY',
'DD/MM/YYYY',
90,
1,
1,
32,
'20')
INSERT INTO PBOwner.PBCATEDT VALUES (
'DD/MMM/YY',
'DD/MMM/YY',
90,
1,
1,
32,
'20')
INSERT INTO PBOwner.PBCATEDT VALUES (
'DDD/YY',
'DDD/YY',
90,
1,
1,
32,
'20')
INSERT INTO PBOwner.PBCATEDT VALUES (
'DDD/YYYY',
'DDD/YYYY',
90,
1,
1,
32,
'20')
INSERT INTO PBOwner.PBCATEDT VALUES (
'HH:MM:SS',
'HH:MM:SS',
90,
1,
1,
32,
'30')
INSERT INTO PBOwner.PBCATEDT VALUES (
'HH:MM:SS:FFF',
'HH:MM:SS:FFF',
90,
1,
1,
32,
'30')
INSERT INTO PBOwner.PBCATEDT VALUES (
'HH:MM:SS:FFFFFF',
'HH:MM:SS:FFFFFF',
90,
1,
1,
32,
'30')
INSERT INTO PBOwner.PBCATEDT VALUES (
'MM/DD/YY HH:MM:SS',
'MM/DD/YY HH:MM:SS',
90,
1,
1,
32,
'40')
INSERT INTO PBOwner.PBCATEDT VALUES (
'DD/MM/YY HH:MM:SS',
'DD/MM/YY HH:MM:SS',
90,
1,
1,
32,
'40')
INSERT INTO PBOwner.PBCATEDT VALUES (
'MM/DD/YYYY HH:MM:SS',
'MM/DD/YYYY HH:MM:SS',
90,
1,
1,
32,
'40')
INSERT INTO PBOwner.PBCATEDT VALUES (
'DD/MM/YYYY HH:MM:SS',
'DD/MM/YYYY HH:MM:SS',
90,
1,
1,
32,
'40')
INSERT INTO PBOwner.PBCATEDT VALUES (
'DD/MMM/YY HH:MM:SS',
'DD/MMM/YY HH:MM:SS',
90,
1,
1,
32,
'40')
INSERT INTO PBOwner.PBCATEDT VALUES (
'DDD/YY HH:MM:SS',
'DDD/YY HH:MM:SS',
90,
1,
1,
32,
'40')
INSERT INTO PBOwner.PBCATEDT VALUES (
'DDD/YYYY HH:MM:SS',
'DDD/YYYY HH:MM:SS',
90,
1,
1,
32,
'40')
INSERT INTO PBOwner.PBCATEDT VALUES (
'DD/MM/YY HH:MM:SS:FFFFFF',
'DD/MM/YY HH:MM:SS:FFFFFF',
90,
1,
1,
32,
'40')
Suneetha -
THis is what I'm using as the PROFILE for my test database:
and this is the DSN:
Notice the user.
and when you click Manage DSN, I have this:
I click TEST:
In PB2019R3:
When I CONNECT through the IDE, I do not get that message. However, I have seen it, but like Chris said once you've logged on as a user with DBA rights, the tables should get created.
Note that I cannot see the catalog tables in the list of tables or the list of views, but when I try "select * from pbcatcol;" I get results.
As a last option, you can always create these tables and populate them from the script DB2SYSPB.SQL provided with the install. NOTE: You DO need to tweak the script for your particular database.
Good Luck,
Olan
Hi Suneetha;
FYI .. HTH
Here are a couple of tech articles I wrote about this.
1) https://community.appeon.com/index.php/articles-blogs/tutorials-articles/2-powerbuilder/334-defining-a-postgresql-database-profile-in-pb2019r3
Later -
Olan
Hi Suneetha;
PB's support for PostgreSQL is via the ODBC driver. You can read all about this in the PB help.
Regards ... Chris
Frankly, I did not care enough to pursue the reason for the fale error msg since everything is actually working correctly! :)
Our version of the PG datyabase is set to LOWERCASE.