<p>Customizing the KB_SQL Server Install Process</p><p>The Software Install Process is designed to prepare a designated M environment for SQL access using the KB_SQL product. The process can be customized to allow packaging of customer object definitions together with the base product. This section describes how to customize the install process using the user-defined script file SQLSCR.USR. This file is a part of the server installation files. To enable this feature, you must copy your revised file to the load directory as the file SQLSCR.2.</p><p>Customization is accomplished by adding script steps to the user-defined script file, SQLSCR.USR. Each line of this file can contain a coded command and associated arguments and message text. This file will be processed after all product installation steps are complete.</p><p>Contents Customizing the KB_SQL Server Install Process...... 1 SQLSCR.USR...... 2 Customization Types...... 4 1 – KBS Routine Import...... 4 2 – KBS Global Import...... 4 3 – Routine Execute...... 5 4 – Prompt...... 5 5 – Import Table Definitions...... 5 6 – Import Query Definitions...... 6 7 – Import Device Type Definitions...... 6 8 – Execute M Code...... 6 9 – Import Function Definitions...... 7 10 – Import Pseudo Column Definitions...... 7 11 – Import Table Statistics...... 7 12 – Global Import from XFER Export File...... 8 13 – Import Routine Data...... 8</p><p>SQLSCR.USR</p><p>The following text is taken from the on-line copy of SQLSCR.USR.</p><p>; Knowledge Based Systems, Inc. ; SQLSCR.USR. ; User-defined Script ; ; This file can be modified by the customer in order to extend the ; product installation process. ; ; Types ; ===== ; OKVar~1~Filename~Import Routine source ; OKVar~2~Filename~Import Global data ; OKVar~3~RoutineToRun~Message ; OKVar~4~PromptText~PromptVar~PromptDefault ; OKVar~5~Filename~Import Table definitions ; OKVar~6~Filename~Import Query definitions ; OKVar~7~Filename~Import Device Type definitions ; OKVar~8~ExecuteMCode~Message ; OKVar~9~Filename~Import Function definitions ; OKVar~10~Filename~Import Pseudo Column definitions ; OKVar~11~Filename~Import Table Statistics ; OKVar~12~Filename~Import Global data ; OKVar~13~Filename~Import Routine data ; ; Variables ; ======; Customers should use variables in the SQLA-, SQLB- namespaces. ; Context variables (inherited from product install) ; OK Always true ; OKI True for INSTALL only ; OKU True for UPDATE only ; ; Example ; ======; This script imports customer defined tables, queries and functions ; for the fictitious LAB application. ; ; Note: Simply remove the leading semi-colon to enable a line of the ; script. ; ; OKU~1~FIXUP.RTN~Load FIXUP routines ; Note: This step is run only for updates (OKU). ; OKU~8~d FIXUP^SQLAA~Cleanup ; Note: This routine was loaded by the previous step. ; OK~5~LAB Table Definitions ; Note: This step is run for installs and updates (OK). ; OK~6~LAB.Q~LAB query Definitions ; OK~9~LAB.FN~LAB Function Definitions ; OKI~2~SITEDEF.GBL~Load global defaults for Site Definition ; Note: This step is run only for new installs (OKI). Customization Types</p><p>For each of the customization types, it is necessary to specify the context in which the command should be run:</p><p>OK Perform for both new installations and upgrades OKI Perform only for new installations OKU Perform only for upgrades</p><p>1 – KBS Routine Import</p><p>Description Imports the routine(s) file into the area where KB_SQL is installed. </p><p>Please note this type should only be used with the assistance of Knowledge Based Systems. This type is intended for use only in situations when KBS must provide custom routines.</p><p>Format <Context>~1~<Filename>~<Comment></p><p>Sample OK~1~FIXUP.RTN~Load FIXUP routines Script Entry</p><p>Sample 1001 11/04/2002@02:00.58 PM Loading routine file: FIXUP.RTN Output =>Load FIXUP routines</p><p>2 – KBS Global Import</p><p>Description Imports the global(s) contained in the specified file into the area where KB_SQL is installed. </p><p>Please note this type should only be used with the assistance of Knowledge Based Systems. This type is intended for use only in situations when KBS must provide custom globals.</p><p>Format <Context>~2~<Filename>~<Comment></p><p>Sample OK~2~FIXUP.G~Load FIXUP globals Script Entry</p><p>Sample 1001 11/04/2002@02:00.58 PM Loading routine file: FIXUP.G Output =>Load FIXUP globals</p><p>3 – Routine Execute</p><p>Description Executes an M routine.</p><p>Format <Context>~3~<Routine to run>~<Comment></p><p>Sample OK~3~MAKE^SQLAVIEW~Create views Script Entry</p><p>Sample 1001 11/06/2002@11:12.58 AM Running routine SQLAVIEW Output =>Create views</p><p>4 – Prompt </p><p>Description Prompts the user for a value which is stored in a variable.</p><p>Format <Context>~4~<Prompt text>~<Prompt variable>~<Prompt default></p><p>Sample Script OK~4~Set TEST global?~SETGBL~Yes Entry ; Following the above with the next line would set the global based ; on the user’s input</p><p>SETGBL~8~S ^TEST($H)=1~Set ^TEST global</p><p>Sample OutputSet TEST global? <Yes>:</p><p>5 – Import Table Definitions</p><p>Description Imports table definitions. </p><p>The file is expected to have been created using KB_SQL’s table export utility found under UtilitiesExportTable, or XFER for table. </p><p>Format <Context>~5~<Filename>~<Comment></p><p>Sample OK~5~STUDENTS.T~Import STUDENT table Script Entry Sample 1001 11/06/2002@11:34.22 AM Loading table file: STUDENTS.T Output =>Import STUDENTS table</p><p>6 – Import Query Definitions</p><p>Description Imports query definitions. </p><p>The file is expected to have been created using KB_SQL’s query export utility found under UtilitiesExportQuery, or XFER for query. </p><p>Format <Context>~6~<Filename>~<Comment></p><p>Sample OK~6~QUERY.Q~Import query definitions Script Entry</p><p>Sample 1001 11/06/2002@11:34.22 AM Loading query file: QUERY.Q Output =>Import query definitions</p><p>7 – Import Device Type Definitions </p><p>Description Imports device type definitions. </p><p>The file is expected to have been created using KB_SQL’s device type export utility found under UtilitiesExportDevice Type, or XFER for device type. </p><p>Format <Context>~7~<Filename>~<Comment></p><p>Sample OK~7~PRINTERS.D~Import device definitions Script Entry</p><p>Sample 1001 11/06/2002@11:34.22 AM Loading query file: PRINTERS.D Output =>Import device definitions</p><p>8 – Execute M Code </p><p>Description Executes the specified M code.</p><p>Format <Context>~8~<Execute M code>~<Comment> Sample OK~8~D C^SQLAVIEW~Call tag to create views Script Entry</p><p>Sample 1001 11/08/2002@01:49.13 PM Executing M code: D C^SQLAVIEW Output =>Call tag to create views</p><p>9 – Import Function Definitions </p><p>Description Imports function definitions. </p><p>The file is expected to have been created using KB_SQL’s function export utility found under UtilitiesExportFunction, or XFER for function. </p><p>Format <Context>~9~<Filename>~<Comment></p><p>Sample OK~9~FUNCTION.F~Import function definitions Script Entry</p><p>Sample 1001 11/06/2002@11:34.22 AM Loading query file: FUNCTION.F Output =>Import function definitions</p><p>10 – Import Pseudo Column Definitions </p><p>Description Imports pseudo column definitions. </p><p>The file is expected to have been created using KB_SQL’s device type export utility found under UtilitiesExportPseudo Column, or XFER for pseudo column. </p><p>Format <Context>~10~<Filename>~<Comment></p><p>Sample OK~10~PSEUDO.P~Import pseudo columns Script Entry</p><p>Sample 1001 11/06/2002@11:34.22 AM Loading query file: PSEUDO.P Output =>Import pseudo columns</p><p>11 – Import Table Statistics Description Imports device type definitions. </p><p>The file is expected to have been created using XFER for statistics. For example, >; Export table statistics: >S SQLXTO="STATS" >S SQLXTM="TO_FILE" >S SQLFILE="C:\TEMP\STAT.T" >; Replace K4 on the following line with the table id >S ^SQLEX($J,"STATS",K4)="" >D XFER^SQL</p><p>Format <Context>~11~<Filename>~<Comment></p><p>Sample OK~11~STAT.T~Import table statistics Script Entry</p><p>Sample 1001 11/08/2002@02:33.34 PM Loading Statistics file: STAT.T Output =>Import table statistics</p><p>12 – Global Import from XFER Export File</p><p>Description Imports global data using KB_SQL’s XFER transfer utility. </p><p>The file is expected to have been created using XFER for GLOBAL. For example, >; export three globals named NAME, CITY, and STATE >S SQLXTO=”GLOBAL” >S SQLXTM=”TO_FILE” >S SQLFILE=”C:\TEMP\DATA.G” >S SQLXNM(1)=”^NAME” >S SQLXNM(2)=”^CITY” >S SQLXNM(3)=”^STATE” >D XFER^SQL</p><p>Note that when importing globals, the overwrite mode (SQLOW) value can be used to replace (SQLOW=1) an entire global tree, or merge (SQLOW=2) with an existing global tree. If the overwrite mode is create (SQLOW=0), the import will only be allowed if the global tree does not already exist.</p><p>Format <Context>~12~<Filename>~<Comment></p><p>Sample OK~12~DATA.G~Data for name, city, state Script Entry Sample 1001 11/06/2002@12:06.20 PM Loading Global xfer file: DATA.G Output =>Data for name, city, state</p><p>13 – Import Routine Data </p><p>Description Imports a routine using KB_SQL’s XFER transfer utility for routines.</p><p>An export file must have been created using XFER for ROUTINE. For example, >; export three routines named NAME, CITY, and STATE >S SQLXTO=”ROUTINE” >S SQLXTM=”TO_FILE” >S SQLFILE=”C:\TEMP\RTN.R” >S SQLXNM(1)=”NAME” >S SQLXNM(2)=”CITY” >S SQLXNM(3)=”STATE” >D XFER^SQL</p><p>Format <Context>~13~<Filename>~<Comment></p><p>Sample OK~13~RTN.R~Routines for name, city, state Script Entry</p><p>Sample 1001 11/06/2002@12:06.20 PM Loading Routine xfer file: RTN.R Output =>Routines for name, city, state</p>
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages9 Page
-
File Size-