The following sample use case scenarios show typical SQL compiler directives you might set for HCOPG applications:
Type of Program | Scenario | SQL Compiler Directive Options |
---|---|---|
COBOL | Connect to the database for full SQL syntax checking during compilation | SQL(DBMAN={ODBC}, TARGETDB=POSTGRESQL, DB=databaseName, [PASS=userid.password, ] BEHAVIOR=OPTIMIZED, DIALECT=MAINFRAME) |
COBOL | Do not connect to the database during compilation | SQL(DBMAN=ODBC, TARGETDB=POSTGRESQL, BEHAVIOR=OPTIMIZED, DIALECT=MAINFRAME, NOCHECK) |
In the IDE, you compile applications by building the projects that contain them. When you build an HCOPG application, you must first set appropriate SQL compiler directive options, and in most cases, establish a connection to your PostgreSQL database.
userID.password
Before compiling, unless you have specified the SQL(NOCHECK) directive, you must be connected to the database specified by the DB directive via an ODBC connection.