CA-IDMS and PowerBuilder:

To facilitate the successful running of PowerBuilder 3.0 against 
CA-IDMS, the PowerBuilder INI files must be set up to accommodate
CA-IDMS requirements.

The PB.INI file has information controlling the initial signon.
The information regarding the setting up of this INI file is 
independent of the workings of CA-IDMS.  One point of CA-IDMS 
interest, however, is how the UserId field is used in PB.  This
field is used as the schema qualifier when PB creates any tables
or views.  There is no place to dynamically change this value.

The bulk of CA-IDMS specifics will be added to the PBODB030.INI
file.  The following enumerates those additions:

  #1 - Add a DBMS Section: 
            [CA-IDMS/DB]

  #2 - Under this new DBMS section add the following lines:

       (a)  PBCatalogOwner='<PBcatalog-schema-name>'

              (PB's use of catalog tables is controlled by the   )
              (PBNoCatalog option.  If this option is set to NO  )
              (-the default- PB will attempt to access these     )
              (tables during the course of a PB session to obtain)
              (such info as PB-specific formatting info, etc.    )
              (On the first catalog table access of a PB session,)
              (if the tables aren't found, PB will attempt to    )
              (create them. The schema name used to access/create)
              (these tables is defined by PBCatalogOwner, or, if )
              (this is not set, UserId from the PB.INI file will )
              (be used.  Optionally, one set of catalog tables   )
              (could be defined for access by a group of users.  ) 
             
              
       (b)  PBSyntax='IDMS_SYNTAX'

              (a new section is required that lists the IDMS-    )
              (supported syntax.  This syntax, with one minor    )
              (change, is the same as CORE_SYNTAX; the change is )
              (on the AddColElement: use &notnull.  This section )
              (can be further tailored following the rules       )
              (described in the comment section of the INI file. )

       (c)  PBDateTime='DEFAULT_DATETIME'

       (d)  PBFunctions='IDMS_FUNCTIONS'

              (a new section is required that names all the      )
              (functions supported by CA-IDMS .. this section is )
              (described in #4                                   )

       (e)  DelimitIdentifier='YES'

              (This parm setting will force all identifiers added)
              (in PB-built SQL syntax to be delimited using the  )
              (appropriate quote character.                      )

       (f)  PBSpecialDataTypes='IDMS_SPECIALDATATYPES'

              (a new section is required that specifies how PB   )
              (is to interpret the CA-IDMS datatypes .. this     )
              (section is described in #5. Note that some CA-IDMS)
              (datatypes are not interpreted correctly by PB.    )
              (If attempting to create a table with any of these )
              (datatypes, you may want to capture the CREATE     )
              (TABLE syntax and modify the relevant columns. Data)
              (types in question include: BINARY, VARCHAR,       )
              (GRAPHIC, VARGRAPHIC and FLOAT                     ) 

       (g)  PBEscapeChar='NO'


  #3 - Add a syntax section:

           [IDMS_SYNTAX]
           AddColumn='ALTER TABLE &TableOwner.&TableName ADD 
               ::AddColElement[, ::AddColElement ]...'
           AddColElement='&ColumnName &DataType &NotNull' 
           CreateIndex='CREATE &UNIQUE INDEX &IndexName ON  
               &TableOwner.&TableName (::ColumnIndex[, 
               ::ColumnIndex]...)'
           ColumnIndex='&ColumnName'
           CreateTable='CREATE TABLE &TableOwner.&TableName 
               (::ColumnElement[, ::ColumnElement]...)'
           ColumnElement='&ColumnName &DataType &NotNull'
           DropIndex='DROP INDEX &TableName.&IndexName'
           DropTable='DROP TABLE &TableOwner.&TableName'
           DropView='DROP VIEW &TableOwner.&TableName'
           GrantTablePrivilege='GRANT ACCESS ON 
               &TableOwner.&TableName TO &UserName[,&UserName]...'
           RevokeTablePrivilege='REVOKE &Privilege[,&Privilege]... 
               ON &TableOwner.&TableName FROM 
               &UserName[,&UserName]...'


  #4 - Add a functions section:         

           [IDMS_FUNCTIONS]
           AggrFuncs=avg(),count(),max(),min(),sum()
           Functions=cast(),char(),date(),day(),days(),decimal(),
               digits(),float(),hex(),hour(),integer(),length(),
               microsecond(),minute(),month(),profile(),second(),
               substr(),time(),timestamp(),year()

  #4 - Add a special datatypes section:

           [IDMS_SPECIALDATATYPES]
           SpecialDataTypes='char=DBI_TYPECHAR=1'
                  
In addition, there's a setting in the CADSI.INI file that is
required if any attempt is made to use PB to access views of 
network records.  This setting can also be used to improve 
performance (especially if the tables being accessed are
particularly large).  To add this setting:
          INI file:  CADSI.INI
          section :  [<data-source-name>]
          line    :  DisableEnsure=1








To make the appropriate modifications to PowerBuilder's INI file,
you may want to cut and paste the remainder of this text file 
into PBODB030.INI:


[CA-IDMS/DB]
PBCatalogOwner='<schema name>'
PBSyntax='IDMS_SYNTAX'
PBDateTime='DEFAULT_DATETIME'
PBFunctions='IDMS_FUNCTIONS'
DelimitIdentifier='YES'
PBSpecialDataTypes='IDMS_SPECIALDATATYPES'
PBEscapeChar='NO'


[IDMS_SYNTAX]
AddColumn='ALTER TABLE &TableOwner.&TableName ADD ::AddColElement[, ::AddColElement ]...'
AddColElement='&ColumnName &DataType &Null'
CreateIndex='CREATE &UNIQUE INDEX &IndexName ON &TableOwner.&TableName (::ColumnIndex[, ::ColumnIndex]...)'
ColumnIndex='&ColumnName'
CreateTable='CREATE TABLE &TableOwner.&TableName (::ColumnElement[, ::ColumnElement]...)'
ColumnElement='&ColumnName &DataType &NotNull'
DropIndex='DROP INDEX &TableName.&IndexName'
DropTable='DROP TABLE &TableOwner.&TableName'
DropView='DROP VIEW &TableOwner.&TableName'
GrantTablePrivilege='GRANT &Privilege[,&Privilege]... ON &TableOwner.&TableName TO &UserName[,&UserName]...'
RevokeTablePrivilege='REVOKE &Privilege[,&Privilege]... ON &TableOwner.&TableName FROM &UserName[,&UserName]...'

[IDMS_FUNCTIONS]
AggrFuncs=avg(),count(),max(),min(),sum()
Functions=cast(),char(),date(),day(),days(),decimal(),digits(),float(),hex(),hour(),integer(),length(),microsecond(),minute(),month(),profile(),second(),substr(),time(),timestamp(),year()


[IDMS_SPECIALDATATYPES]
SpecialDataTypes='char=DBI_TYPECHAR=1','binary=DBI_TYPEBLOB=100','varchar=DBI_TYPEVCHAR=101','smallint=DBI_TYPESINT=102'
