SQLIO Getting Started


9.5

 

The following steps outline the process required to implement a simple test of the SQLIO functions.

 

  1. Add a PLB_SQLIO_HOST, PLB_SQLIO_DRIVER, and PLB_SQLIO_SQLTYPE keyword to the PLBWIN INI file. These keywords specify the database source, driver type, and SQL language syntax type used to make a connection to a SQL database engine that contains the SQLIO system tables used to define the SQLIO schema record layouts. See SQLIO Runtime Keywords for additional information.

  2.  

  3. Define the record layout and create a SQLIO XML schema file. See Schema File Format for more information.

  4.  

  5. Modify a PLB program as follows:

 

A. Load a SQLIO schema using the SCHEMA instruction. The SQLIO schema only needs to loaded once or as needed when SQLIO schema updates are required.

 

Example:

 

         SCHEMA "default",IMPORT="myschema.xml",FLAGS=10

 

or

 

          SCHEMA "default",IMPORT="myschema.xml",FLAGS=12

 

B. Modify the OPEN and/or PREP instructions to include the <SQL> tag with or without attributes keywords. The <SQL> tag identifies that a database table is being accessed and is included in the file name fields of the instructions.

 

Example:

 

xI IFILE

.

        OPEN xI,"test.isi<sql>"

 

or

 

        OPEN xI,"test.isi<sql Database=AddressData>"

 

or

 

        PREP xI,"test.txt", "test.isi<sql>","5","10"

 

or

 

        PREP xI,"test","test<sql Template=mytemp>","5","10"

 

C. Compile and execute the PLB program.

 

 

See Also: SQLIO Overview, SQLIO Runtime Keywords



PL/B Language Reference SQLIO Runtime Keywords SQLIO Example Configurations