home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1995 September / Image.iso / visualob / install / odbc / idms / pb.txt < prev    next >
Encoding:
Text File  |  1993-10-27  |  6.8 KB  |  164 lines

  1. CA-IDMS and PowerBuilder:
  2.  
  3. To facilitate the successful running of PowerBuilder 3.0 against 
  4. CA-IDMS, the PowerBuilder INI files must be set up to accommodate
  5. CA-IDMS requirements.
  6.  
  7. The PB.INI file has information controlling the initial signon.
  8. The information regarding the setting up of this INI file is 
  9. independent of the workings of CA-IDMS.  One point of CA-IDMS 
  10. interest, however, is how the UserId field is used in PB.  This
  11. field is used as the schema qualifier when PB creates any tables
  12. or views.  There is no place to dynamically change this value.
  13.  
  14. The bulk of CA-IDMS specifics will be added to the PBODB030.INI
  15. file.  The following enumerates those additions:
  16.  
  17.   #1 - Add a DBMS Section: 
  18.             [CA-IDMS/DB]
  19.  
  20.   #2 - Under this new DBMS section add the following lines:
  21.  
  22.        (a)  PBCatalogOwner='<PBcatalog-schema-name>'
  23.  
  24.               (PB's use of catalog tables is controlled by the   )
  25.               (PBNoCatalog option.  If this option is set to NO  )
  26.               (-the default- PB will attempt to access these     )
  27.               (tables during the course of a PB session to obtain)
  28.               (such info as PB-specific formatting info, etc.    )
  29.               (On the first catalog table access of a PB session,)
  30.               (if the tables aren't found, PB will attempt to    )
  31.               (create them. The schema name used to access/create)
  32.               (these tables is defined by PBCatalogOwner, or, if )
  33.               (this is not set, UserId from the PB.INI file will )
  34.               (be used.  Optionally, one set of catalog tables   )
  35.               (could be defined for access by a group of users.  ) 
  36.              
  37.               
  38.        (b)  PBSyntax='IDMS_SYNTAX'
  39.  
  40.               (a new section is required that lists the IDMS-    )
  41.               (supported syntax.  This syntax, with one minor    )
  42.               (change, is the same as CORE_SYNTAX; the change is )
  43.               (on the AddColElement: use ¬null.  This section )
  44.               (can be further tailored following the rules       )
  45.               (described in the comment section of the INI file. )
  46.  
  47.        (c)  PBDateTime='DEFAULT_DATETIME'
  48.  
  49.        (d)  PBFunctions='IDMS_FUNCTIONS'
  50.  
  51.               (a new section is required that names all the      )
  52.               (functions supported by CA-IDMS .. this section is )
  53.               (described in #4                                   )
  54.  
  55.        (e)  DelimitIdentifier='YES'
  56.  
  57.               (This parm setting will force all identifiers added)
  58.               (in PB-built SQL syntax to be delimited using the  )
  59.               (appropriate quote character.                      )
  60.  
  61.        (f)  PBSpecialDataTypes='IDMS_SPECIALDATATYPES'
  62.  
  63.               (a new section is required that specifies how PB   )
  64.               (is to interpret the CA-IDMS datatypes .. this     )
  65.               (section is described in #5. Note that some CA-IDMS)
  66.               (datatypes are not interpreted correctly by PB.    )
  67.               (If attempting to create a table with any of these )
  68.               (datatypes, you may want to capture the CREATE     )
  69.               (TABLE syntax and modify the relevant columns. Data)
  70.               (types in question include: BINARY, VARCHAR,       )
  71.               (GRAPHIC, VARGRAPHIC and FLOAT                     ) 
  72.  
  73.        (g)  PBEscapeChar='NO'
  74.  
  75.  
  76.   #3 - Add a syntax section:
  77.  
  78.            [IDMS_SYNTAX]
  79.            AddColumn='ALTER TABLE &TableOwner.&TableName ADD 
  80.                ::AddColElement[, ::AddColElement ]...'
  81.            AddColElement='&ColumnName &DataType &NotNull' 
  82.            CreateIndex='CREATE &UNIQUE INDEX &IndexName ON  
  83.                &TableOwner.&TableName (::ColumnIndex[, 
  84.                ::ColumnIndex]...)'
  85.            ColumnIndex='&ColumnName'
  86.            CreateTable='CREATE TABLE &TableOwner.&TableName 
  87.                (::ColumnElement[, ::ColumnElement]...)'
  88.            ColumnElement='&ColumnName &DataType &NotNull'
  89.            DropIndex='DROP INDEX &TableName.&IndexName'
  90.            DropTable='DROP TABLE &TableOwner.&TableName'
  91.            DropView='DROP VIEW &TableOwner.&TableName'
  92.            GrantTablePrivilege='GRANT ACCESS ON 
  93.                &TableOwner.&TableName TO &UserName[,&UserName]...'
  94.            RevokeTablePrivilege='REVOKE &Privilege[,&Privilege]... 
  95.                ON &TableOwner.&TableName FROM 
  96.                &UserName[,&UserName]...'
  97.  
  98.  
  99.   #4 - Add a functions section:         
  100.  
  101.            [IDMS_FUNCTIONS]
  102.            AggrFuncs=avg(),count(),max(),min(),sum()
  103.            Functions=cast(),char(),date(),day(),days(),decimal(),
  104.                digits(),float(),hex(),hour(),integer(),length(),
  105.                microsecond(),minute(),month(),profile(),second(),
  106.                substr(),time(),timestamp(),year()
  107.  
  108.   #4 - Add a special datatypes section:
  109.  
  110.            [IDMS_SPECIALDATATYPES]
  111.            SpecialDataTypes='char=DBI_TYPECHAR=1'
  112.                   
  113. In addition, there's a setting in the CADSI.INI file that is
  114. required if any attempt is made to use PB to access views of 
  115. network records.  This setting can also be used to improve 
  116. performance (especially if the tables being accessed are
  117. particularly large).  To add this setting:
  118.           INI file:  CADSI.INI
  119.           section :  [<data-source-name>]
  120.           line    :  DisableEnsure=1
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. To make the appropriate modifications to PowerBuilder's INI file,
  130. you may want to cut and paste the remainder of this text file 
  131. into PBODB030.INI:
  132.  
  133.  
  134. [CA-IDMS/DB]
  135. PBCatalogOwner='<schema name>'
  136. PBSyntax='IDMS_SYNTAX'
  137. PBDateTime='DEFAULT_DATETIME'
  138. PBFunctions='IDMS_FUNCTIONS'
  139. DelimitIdentifier='YES'
  140. PBSpecialDataTypes='IDMS_SPECIALDATATYPES'
  141. PBEscapeChar='NO'
  142.  
  143.  
  144. [IDMS_SYNTAX]
  145. AddColumn='ALTER TABLE &TableOwner.&TableName ADD ::AddColElement[, ::AddColElement ]...'
  146. AddColElement='&ColumnName &DataType &Null'
  147. CreateIndex='CREATE &UNIQUE INDEX &IndexName ON &TableOwner.&TableName (::ColumnIndex[, ::ColumnIndex]...)'
  148. ColumnIndex='&ColumnName'
  149. CreateTable='CREATE TABLE &TableOwner.&TableName (::ColumnElement[, ::ColumnElement]...)'
  150. ColumnElement='&ColumnName &DataType &NotNull'
  151. DropIndex='DROP INDEX &TableName.&IndexName'
  152. DropTable='DROP TABLE &TableOwner.&TableName'
  153. DropView='DROP VIEW &TableOwner.&TableName'
  154. GrantTablePrivilege='GRANT &Privilege[,&Privilege]... ON &TableOwner.&TableName TO &UserName[,&UserName]...'
  155. RevokeTablePrivilege='REVOKE &Privilege[,&Privilege]... ON &TableOwner.&TableName FROM &UserName[,&UserName]...'
  156.  
  157. [IDMS_FUNCTIONS]
  158. AggrFuncs=avg(),count(),max(),min(),sum()
  159. Functions=cast(),char(),date(),day(),days(),decimal(),digits(),float(),hex(),hour(),integer(),length(),microsecond(),minute(),month(),profile(),second(),substr(),time(),timestamp(),year()
  160.  
  161.  
  162. [IDMS_SPECIALDATATYPES]
  163. SpecialDataTypes='char=DBI_TYPECHAR=1','binary=DBI_TYPEBLOB=100','varchar=DBI_TYPEVCHAR=101','smallint=DBI_TYPESINT=102'
  164.