IBM Datacap, Version 8.1            

Special variables to access application configuration settings

The application configuration file, or .app file, stores the paths, connection strings, and other settings of the application. You can use special variables to access the application configuration settings.

Do not attempt to modify this file directly, use the Taskmaster Application Manager. You used the Taskmaster Application Manager to configure the export database. For more information, see Configuring the export database.

The .app file is stored in the root of the application folder. For example, the configuration file of the TravelDocs application is C:\Datacap\TravelDocs\TravelDocs.app:

<app name="TravelDocs" ver="45" modder="localadm.YODA647.DC14.DATACAP" 
                               dt="03/09/12.753 11:41:06.753 " src_ver="1">
    <k name="tmservers">
        <k name="tms" ip="127.0.0.1" port="2402" retry="3"/>
    </k>
    <k name="runtime" v="batches"/>
    <k name="tmengine" cs="<encoded_connection_string>"/>                <-- encoded
    <k name="tmadmin" cs="<encoded_connection_string>"/>                 <-- encoded
    <k name="dco_TravelDocs">
        <k name="setupdco" v="TravelDocs.xml"/>
        <k name="rules" v="rules"/>
        <k name="imagefix" v="imagefix.ini"/>
        <k name="UseFPXML" v="False"/>
        <k name="fingerprintconn" cs="<encoded_connection_string>"/>     <-- encoded
        <k name="vscanimagedir" v="C:\Datacap\TravelDocs\images"/>       <-- encoded
        <k name="exportdb" cs="<encoded_connection_string>"/>            <-- encoded
    </k>
    <k name="fingerprint" v="fingerprint"/>
    <k name="export" v="export"/>
</app>

Connection strings might contain user names and passwords, so they are encoded when they are written to the .app file. Taskmaster encodes and decodes user names and passwords automatically, so no special handling is required when you access them from your application by using smart parameters. For information about storing other action parameters in the .app file as encoded strings, see Storing passwords, connection strings, and other parameters in the .app file.

Applications can access settings in the configuration file by using the following special variables:

Smart Parameter Description
@APPPATH Retrieves the path to a file or folder from the application configuration file.
@APPVAR Retrieves a connection string, value, or other attribute from the application configuration file.

For detailed information about these and other special variables, see the Smart Parameter Special Variable Reference.

For each special variable, you specify a key that represents the field that you want to get from the configuration file. When you used the APPPATH parameter, you specified export as the key (@APPPATH(export)).



Feedback

Last updated: November 2013
dcadg605.htm

© Copyright IBM Corporation 2013.