Adding functions to a new section in the file

If entries for your back-end DBMS do not exist in PBODB125.INI, use the following procedure to create the required sections and add the appropriate functions.

NoteBefore you start For more about the settings to supply for your back-end DBMS in PBODB125.INI, read the comments at the end of the file.

StepsTo add functions to a new section in PBODB125.INI:

  1. Open PBODB125.INI in one of the following ways:

    • Use the File Editor in PowerBuilder. (For instructions, see the Users Guide.)

    • Use any text editor outside PowerBuilder.

  2. Edit the DBMS Driver/DBMS Settings section of the PBODB125 initialization file to add an entry for your back-end DBMS.

    Make sure that you:

    • Follow the instructions in the comments at the end of PBODB125.INI.

    • Use the same syntax as existing entries in the DBMS Driver/DBMS Settings section of PBODB125.INI.

    • Include a section name for PBFunctions.

    For example, here is the relevant portion of an entry for a DB2/2 database:

    ;***********************************************
    
    ;DBMS Driver/DBMS Settings
    
    ;***********************************************
    
    [DB2/2]
    
    ...
    
    PBFunctions='DB22_FUNCTIONS'
    
    ...
    
  3. Edit the Functions section of PBODB125.INI to add an entry for your back-end DBMS.

    Make sure that you:

    • Follow the instructions in the comments at the end of PBODB125.INI.

    • Use the same syntax as existing entries in the Functions section of PBODB125.INI.

    • Give the Functions section the name that you specified for PBFunctions in the DBMS Driver/DBMS Settings entry.

    For example:

    ;***********************************************
    
    ;Functions
    
    ;***********************************************
    
    [DB22_FUNCTIONS]
    
    AggrFuncs=avg(),count(),list(),max(),min(),sum()
    
    Functions=curdate(),curtime(),hour(), ...
    
  4. Type a comma followed by the function name at the end of the appropriate function list, as follows:

    The following example shows (in bold) a new DB2/2 function named substr() added at the end of the Functions list:

    ;***********************************************
    
    ;Functions
    
    ;***********************************************
    
    [DB22_FUNCTIONS]
    
    AggrFuncs=avg(),count(),list(),max(),min(),sum()
    
    Functions=curdate(),curtime(),hour(), substr()
    
  5. Save your changes to PBODB125.INI.