Environment homecontents start chapter top of pagebottom of pagenext page indexMenus

Introduction

When you start SIR2002, you see the main SIR2002 window. This consists of a title bar, a main menu and toolbar at the top, a large scrollable output area in the middle and a message and progress area at the bottom.

The title bar displays the name of the application, the default database (if any) and, if concurrent database access is being used, the name of the controlling master process.

The menu (and subsequent sub-menus and dialogs) are the main way of interacting with SIR2002. (Note. These menus and dialogs are all written in VisualPQL and the source of all programs is included on the system procedure file and can be altered or replaced by custom built menus.)

Select a choice from any menu with the arrow keys, with a mouse or other pointing device or with underlined "hot keys" (use Alt-letter in the standard way) or by any indicated control key. Some of the frequently used items can also be activated from the toolbar.

Return to a previous menu by pressing Esc.

Menu items may pull down further menus (indicated with a small arrow), may display a dialog which you fill in or may take an immediate action. Some actions may generate output in the Main Output Window. This is a scrollable area (up/down/left/right) which holds remarks, messages and screen listings. The amount of remarks, commands and other internally generated messages can be controlled through session options. You can select and cut from the main output window and can print it, save it or clear it. If your session produces more output than it can hold, earliest lines are discarded.

When you start SIR2002, you may get a 'Welcome to SIR2002' dialog asking what you want to do. This allows you to create a new database or to connect to an existing database. Press Close to use SIR2002 without a database. Check "Don't show me this again" to suppress this. It can be set to display again in the preferences dialog.

Default Main Menu

File
New...
Open...
Save Session...
Restore Session...
Clear Output
Save Output As...
Find in Output...
Select All...
Print...
DBMS Command...
Exit
Data
SpreadSheet...
Forms...
File Dump...
File Input...
List File...
Procedure
Export Data...
Report...
Tabulation...
Statistics...
Graph...
Open...
Program
Members...
Search Members...
Files...
Dialog Painter...
PQLForms Painter...
Database
Databases...
 Export...
 Subset...
 Unload...
 Journal Upload...
 Journal Restore...
 Download Journal...
 Verify Database...
 Itemise File...
 Reload Database...
 Import Database...
 Delete Database...
 Database Settings...
 Record Schema...
 Secondary Indexes...
 Import Records...
 Write Schema...
List Stats
Tabfile
List Tabfiles...
Connect Tabfile...
Create Tabfile...
Verify Tabfile...
SirSQL
Settings
File Attributes...
Global Variables...
Preferences...
Master Settings...
Buffers...
Keymap...
List Remarks
List Commands
Help
Contents
Search...
What's New
About SIR...
SIR on the Web
The File menu contains commands and utilities for working with the output window and overall session.
The Data menu contains commands and utilities for working with the data in a database.
Procedures are simple dialog based utilities for extracting data from a database to various output.
The Program menu contains commands and utilities for working with VisualPQL programs and DBMS command procedures.
The Database menu contains commands and utilities for managing databases.
The Tabfile menu contains commands and utilities for managing tabfiles.
Settings control the current session settings and options.
Help accesses documentation both locally and on the internet.

Drag and Drop files

You can select a file and 'drag and drop' it into the SIR2002 main window. The action taken is based on that file's extension:
.SR1, .SR2 or .SR3 connect to the database. If password or security are defined then a dialog is displayed;
.SR4 or .SRP set the default procfile to this file;
.PWR invokes the PREAD dialog;
.TBF connects the tabfile;
.UNL invokes the Reload dialog;
.EXP invokes the Import dialog;
.DLG invokes the Dialog Commander;
Any other file extension invokes the program/files dialog.


New

Use this command to create a new SIR database.

Shortcut: CTRL+N

New Database
New Database

The New Database dialog requires a database name. The name must be a valid SIR2002 name, that is one to eight characters, case insensitive, starting with A-Z and containing characters A-Z;0-9;$ # @ _. You can specify a Password and Database Administrator (DBA) read and write passwords if you wish (all must be valid SIR names). If a password is assigned, it must be supplied every time anyone connects to this database. If DBA passwords are assigned, then these must be specified when connecting to the database in order to be allowed to perform DBA only tasks such as modifying the database definition.

The database directory specifies where the database files are created (defaults to your current directory). Ensure any specification includes a terminating delimiter e.g. a backslash '\' on Windows. You must have write access to this directory. The database filenames are the database name with extensions .srn where n is 1 to 6. Check Journalling to keep a record of changes made to the database and data which can be used to recreate a database if necessary.

A database can have a case structure where each record on the database belongs to an entity and is usually processed as part of this entity. For example, a personnel database might contain various record types (basic data, positions held, reviews, etc.) where all records relate to a single employee with an employee identification which can be used as the case id. If the database is Case structured, select the data type from 1, 2 or 4 byte integers or string. One byte holds values up to 123, two bytes up to 32763 and four bytes over 2 billion. Assign the case id a valid SIR name. Cases are normally held in ascending sequence. Uncheck Ascending to store data in descending sequence.

See also the DBMS CREATE DATABASE command.


Open

Use this command to open an existing SIR database.

Shortcut: CTRL+O

Open Database
Open Database

Enter the name of the database or use the browse button [>>] to find the database.

If a database password exists you must enter it to attach to the database (Passwords are not case sensitive).

Enter a Read Security and Write Security password. If you do not enter any passwords and there are no security passwords defined, then you have full access to the database. If there are passwords defined, then the access you have is restricted to the level matching the passwords you specify.

If you browsed for the database, the directory is filled in automatically. When specifying a directory, ensure any specification includes a terminating delimiter e.g. a backslash '\' on Windows.

See also the DBMS CONNECT DATABASE command.


Save and Restore Session

Use these commands to save and restore the current SIR session's settings and database connections.

The settings are saved in a text file as a set of DBMS commands which recreate the session environment. If any databases require connecting and have passwords, when you restore the session, it prompts for access and security level passwords.


Clear Output

Clear the output window or selected text.


Save Output As

Shortcut: CTRL+S

Saves the output window contents or selected text to a chosen text file.


Find

Shortcut: CTRL+F

Search the output window for specified text.


Select All

Shortcut: CTRL+A

Selects all text in the output window.


Print Output

Shortcut: CTRL+P

Prints the output window contents or selected text.


DBMS Command

Shortcut: CTRL+R

DBMS Command
Run DBMS Commands

Allows entry and execution of DBMS commands and Programs.

Tip

If this command is chosen when the cursor is at the end of a line of text in the output window then that line is taken as a command and executed without opening the DBMS command dialog.

The DBMS Command dialog allows entry of DBMS commands in the top text area. Once a command is entered it can be run using the Execute button or cleared using the corresponding Clear button.

A LIST of previous commands is at the bottom. This list also includes some commands generated by the other menu commands. These commands can be selected and appended to the current command or cleared.


Exit

Terminates the SIR session.


Spreadsheet

Spreadsheet
Speadsheet table selection

The menu interface to the SIR2002 spreadsheet provides a simple and convenient way to examine and modify data in a database record or tabfile table.

The dialog lists all record types in the selected database or tabfile and allows you to select one. By default all variables are displayed or you can select individual variables. By default the spreadsheet is enabled to allow updates to the records providing that all key fields are selected. Uncheck update to disable this. By default, the values of variables are displayed. If you want value labels displayed, check the value labels box; this disables updating.

Enter a Boolean condition to select a subset of records. You may apply conditions based on variables in the record or in the Case information record (CIR).

The SIR2002 spreadsheet can also be invoked by the SIR SPREADSHEET command and can be invoked as the SPREAD SHEET VisualPQL Procedure.

Spreadsheet
Speadsheet

Once the spreadsheet is active, you can move around the displayed data using keys in a similar fashion to other spreadsheet packages. You can edit data by double-clicking or pressing Enter. You cannot modify key fields (shown as bold) in existing records.

There are eight action buttons available as follows:


Forms

Forms
Run SIRForms

Invokes the
SirForms module. SirForms is a data input utility. A forms definition file specifies the layout and logic of a form. This can use an existing set of sirforms commands or can create a new set from the database.

Choose Default and press ok to create and execute a form definition for the current database.
Choose Source File, and enter the name of a Text Form definition file. Use the "[>>]" button to find a file using the operating system file browser.
You can also enter the name of a file to store a precompiled version of this form.
Press Create... to create a default source file with select record types.
Choose Precompiled and enter the name of a Compiled Form definition file. Use the "[>>]" button to find a file using the operating system file browser.

If a non default form is chosen then execution parameters such as DB=dbname PREFIX=path etc may also be entered (See SirForms).

Check Master and enter the name[:port] of a master process to start the form in concurrent update mode.


SIR File Dump

sir file dump
SIR File Dump

The File Dump command writes a formatted text file containing record data from selected record types and cases.

You must have DBA level access to use this utility.

The output file is suitable for input to the File Input utilities. The format is as defined in the data dictionary.

Enter a filename to contain the dumped data. Use the "[>>]" button to find a file using the file browser.
Enter an optional Undefined Character to be written to the file when undefined data are found. The default undefined character is BLANK.
Press
Select Cases to define a subset of case data for the output.
Press Select Records to define a subset of record data for the output.
See also the DBMS FILE DUMP command.


Select Records

Record Filter
Select Record Types

The Select Records dialog is used by several utilities. It is used to restrict the types of records processed by the utility and also filter individual records based on a Boolean expression.

Enter an optional Boolean condition based on variables in a record and then select the record type from the list. You do not need to enclose the condition in brackets.

Use the pull down choice to change the order that the record types are displayed in the dialog's record menu.

Press > to add your selection to the Selected Records list.
Press < to remove an item from the Selected Records list.
Press OK to save the settings.


Select Cases

Case Filter
Select Cases

The Select Cases dialog is used by several utilities. It is used to restrict the number of cases processed by the utility and only applies to case structured databases.

Enter an optional Boolean condition based on variables in the CIR. You do not need to enclose the condition in brackets.

Press OK to check the syntax of the Boolean and list then save the settings.


Select Records

Record Type Filter
Select Record Types

The Select Records dialog is used by several utilities. It is used to restrict the types of records processed by the utility.

Use the pull down choice to change the order that the record types are displayed in the dialog's record menu.

Press > to add your selection to the Selected Records list.
Press < to remove an item from the Selected Records list.
Press OK to save the settings.


File Input

File Input
File Input

Updates the data in the database from a formatted input file. This file can be created using a SIR File Dump. The format is as defined in the data dictionary.

Choose the type of data updating required from the list:

Choose the database to update.

Input file

Enter the name of the file containing the input data. Use the "[>>]" button to find a file using the operating system file browser.

Output files

Optionally enter the names of files to contain information on rejected input records.

Summary files

Optionally enter the names of files to contain information on the input run.

Options

Not all options are applicable to all update types. Options which are not applicable are disabled.

Parameters

See batch data input.


List File

List File
List File

Produces a report showing the data in the selected database.

You must have DBA level access to use this utility.

You can select record types and variables to display and also take a subset of the data.

Check Include CIR to display data in the Common Information Record.
Check Sort By Variable Name to list the data for each record in alphabetical order of variable name. The default is the data dictionary order.
Press
Select Cases to define a subset of case data for the output.
Press Select Records to define a subset of record data for the output.
Press Select Variables to define which variables are included in the output

See the FILE LIST command.


Select Variables

Select Variables
Select Variables

Select Record types and variables to be processed by the utility. If no variables are selected then all variables in the selected record are processed.

Use the pull down choices to change the order that the record types and variable names are displayed in the dialog's menus.

Press > to add your selection to the Selected Records list.
Press < to remove an item from the Selected Records list.


Output Procedures

The Output Procedures provide an easy way to generate output from the data in a database. Output can be a report or tabulation, a graph or an export file.

There are several steps in generating the output.

1. Output File Type and name

Enter an output filename and select an output type.
Type of output
Select Output Type

The available output types for Export are: The first page of the dialog lets you select a more specific type of output. In the case of Export, the type of file format (e.g. SPSS, SAS, Minitab...). For reports or tabulations, you can select HTML or Text output. Enter or browse for the name of the output file.

2. Select Variables

Select record variables from the default database for use in the procedure.
Variables
Select Variables

If you are going to create derived variables (eg AGE GROUP - based on BIRTHDAY). If variables are chosen from more than one record type and these record types have different keys then you may want to specify the processing sequence to extract the data from these records.

Note: If you have selected variables from more than one record type and there is not a one to one relationship between those records then you may need to specify a path from one record type to the other. A dialog is displayed to specify this path.

3. Local Variables

Local variables are not stored in the database but are created in the procedure. They can be based on variables in the schema, functions and constants (such as age from birthday). You must select any database variables used in deriving variables from the previous screen.

Computed Variables
Create Derived Variables

Use the other buttons to create an expression to define the local variable.

4. Sort Output

Select variables to sort the procedure output.
Sort
Sort Output

A list of available variables is displayed. If you want to break a report into sections then you must sort the data first. In reports and export files, the output can be sorted. Variables used by sort must be selected or derived variables.

Press Sort > to add the selected column to the list of Sort Variables.
Press A/D to toggle the sort order of the selected variable (Ascending or Descending).
Press ^ to move the selected variable up the list.
Press v to move the selected variable down the list.
Press Del to remove the selected variable from the sort variables.

5. Extra Options

Layout
Output type specific options

The following options are available on Report:

6. Filter Records

Use filter to specify a subset of the data to be used in the procedure.

Filter
Filter Output

Specify a percentage (0 - 100%) for a proportional Random Sample of the data.

Specify a logical Condition which records must satisfy to be used.
Use the buttons to create a logical expression.

7. Finished

Done
Run & Save Program

Report Output
HTML Report Output


Procedure Path

Select the type of record that you want to analyse. For example if you want a report on People then you might choose a demographic record.

Change the record processing sequence and paths using the up/down arrows and the via... button.


Procedure Path

Select the variables on the right to use as keys to the record on the left.


Procedure New Local

Enter a name for the local variable. It connot be the same name as a previously selected or derived variable.

Select the variable type using the radio buttons.


Procedure Select Function

Choose a function to use in the derived expression.


Procedure Select Value

Enter or pick a value to use in the derived expression.


Procedure Select Variable

Choose a variable to use in the derived expression.


Save and Reload

The selections and options used in a procedure can be saved and restored. There is a Save button in the final dialog which prompts for a filename. Saved files can be restored or run like any other set of SIR2002 commands in a file.

The variable selection section can be loaded without loading all the procedure options so that a report, say, can be produced on the same set of data used in another procedure type.


Program Members

Shortcut: CTRL+SHIFT+M

Members
Procedure File Members

Program Members are stored in the Procedure File. Members may be VisualPQL programs, sets of commands or other components of an application.

Most members relate to a specific database and are saved in the procedure file that belongs to that database. Normally the procedure file you are working with is the procedure file of the default database. However, you can select another procedure files to work with.

The System Procedure File

There is a special, system procedure file, known as SYSPROC which is shipped with the software. The system procedure file has the internal name SYSPROC and the external name SirProc.srp. This contains various programs and procedures to run the system and these should not be altered.

Passwords

Procedure files, families and members may have passwords. If a database password is specified when the procedure file is created, the password must be supplied to access that procedure file with DBA permissions. If a password is specified when a family or member is created, the password must be supplied to access that family or member. A password on a saved member prevents those who do not have the password from using it.

Users may need to execute or run procedures stored as members, but not be allowed to see or modify those procedures. Give a member a password and then make it public to do this. Public members may be executed but not seen or modified unless proper passwords are provided. Make members public with the Public option on the dialog.

Families

A family is a directory or grouping of members. Families can only be created, renamed or deleted if you have DBA permissions.

The dialog displays a list of the families in the current procedure file and allows you to select a family. The most recently referenced family is set when the dialog is displayed. There are several family operations:

Members

There are different types of members which are identified by a suffix delimited from the name with a colon (:). You can edit and view text members (:T). You can run text (:T) and executable members (:E). The dialog displays a list of the members in the current family. There are several member operations:

There are several other options:


Member Types

There are different types of members which are identified by a suffix delimited from the name with a colon (:).

There are four current types of members plus two further types used in version 3 systems. The member type is identified by a suffix delimited from the name with a colon (:). The current member types are:

Text :T
These contain readable text such as the source code of VisualPQL programs and other command procedures. This is the only type of member that can be edited. The other types are all created by specialist programs and are, in effect, compiled and so cannot be edited. The source code and the compiled version are frequently stored as members with the same name with a different suffix. If a member name without a suffix is RUN, and both a :T or :E version exist, the system determines which to run based on dates and times of last update.

Executables :E
These are compiled versions of VisualPQL programs and retrievals. Executable members are created by the VisualPQL compiler.

Object Code :O
These are compiled versions of VisualPQL subroutines. Compiled subroutines are created by the VisualPQL compiler.

External Variables:V
These are compiled versions of VisualPQL external variable blocks. Compiled external variable blocks are created by the VisualPQL compiler.

The two additional member types used by version 3 systems are:

Templates
These are representations of all or part of an execution window. These are created by a VisualPQL program and by the Template utilities available from the old menu system.

Menus
These are compiled versions of user menus for the old menu system.


Search Procfile

Searches the procedure file for members that match the search criteria.

Search Members
Search Members

Use the Family and Member expressions to find or search members with names that match the pattern.

Check the Text box and enter text to search for within the selected members.
The search can be Case sensitive, in which the text must match exactly. The search can be limited to whole words, for example the string "EXAM" is not found in "This is an example" if the Whole Words box is checked.
You can limit the number of lines that are read in each member. If you wanted to find all members that included the word "GENERATED" on the first line then enter "1" in the Lines box. If this is blank then all lines are searched.

Use the Created, Modified and Byte Size fields to search for members with these attributes.

Press the Search button to start searching. If members are found matching the search criteria then a dialog is displayed:

Found Members
Found Members

From here you can edit or run selected members in the list or save the text of the list to a file.


Print Member

Formats and prints the contents of the text member.

Print Member
Print Member(s)

Check Line Numbers to print line numbers;
Check Column Numbers to print a heading showing column numbers at the top of each page;
Check Uppercase to convert the text to uppercase before printing.

Select Truncate , wrap , or page to specify how long lines are printed. Truncate does not print any text that does not fit on the printed line; wrap prints text on the next line; page prints another page (or pages) with the long text.


Procedure Read

PRead processes a file as generated by the PWrite command, creating or replacing text members in the procedure file.

Type in the name of the input file.
Use the "[>>]" button to find a file using the operating system file browser.

Check NoInform to suppress remarks in the output window;
Check Replace to replace existing Members;
Check Public to allow password protected Members to be Run without prompting for passwords;
Check Confirm to prompt for confirmation before replacing a Member;
Check Report to produce a summary report at the end of the process.

See the PREAD command.


Procedure Write

Produces a text file containing the chosen Member(s) in a format suitable for input to the Pread command.

Type in the name of a file to contain the Member(s).
Leave the filename blank and the information is written to the output window.
Use the "[>>]" button to find a file using the operating system file browser.

Check NoInform to suppress remarks in the output window.

See the PWRITE command.


PList Member

Produces a formatted report of the chosen Member(s).

Type in the name of a file to contain the report.
Leave the filename blank and the report is written to the output window.
Use the "[>>]" button to find a file using the operating system file browser.

Check NoInform to suppress remarks in the output window;
Check UnNumbered to suppress line numbers;
Check NoRuler to suppress the report heading showing column numbers;
Check Uppercase to convert the text to uppercase.

See the PLIST command.


Member Name

This generic dialog requires a member name for use with the previous dialog.

Type the member Name, which could include a family name (FAMILY.MEMBER).
Type an optional Password for this member.

Check Public to allow this member to be executed without a password.


Family Name

Supply a new Family name and optional password.

The family name and password must be valid SIR2002 Names, that is one to eight characters, case insensitive, starting with A-Z and containing characters A-Z;0-9;$ # @ _.


Files

Shortcut: CTRL+SHIFT+F

Performs operations on operating system text files.

File operations
Files

Type in the Filename. Use the "[>>]" button to find a file using the operating system file browser.


Dialog Painter

Shortcut: CTRL+SHIFT+D

Prompts for a file or member to be created or edited with the
Dialog Painter.

Select Painter Input
Select Painter Input


PQLForms Painter

Prompts for a file or member to be created or edited with the PQLForms Painter.

Use the create button to generate a default form from the current default database.


Database Connection

Shortcut: CTRL+D

Lists connected databases and lets you connect, disconnect and set the default database.

A list of recently connected databases is shown at the bottom of the dialog. Select one or more and press Connect... to connect to any of these databases.

Press Connect... without selecting any recently connected databases to browse the file system for database files.

If the selected database has a password or security levels then the Open Database dialog is displayed before the database is connected.

Press New... to create a new database.

Select a connected database and press Default to set that database as the default.

Select a connected database and press Disconnect to disconnect that database.

Press Done to close the dialog.


Export

Export creates a text file containing commands which define the database and its contents.

Export Database
EXPORT Database

You must have DBA level access to the database.

An Export can be used to transfer a database from one operating system to another.

An Export file can be used as the input to the Import dialog, or simply run as a text file containing SIR2002 commands.

Enter a Filename to contain the Export. Use the "[>>]" button to find a file using the operating system file browser.
Optionally specify a New Database name and New Password for the exported database. The default is that of the current database.
Options

Press Case Filter to define a subset of case data for the output.
Press Records to define a subset of record data for the output.
Press Database Help to view details on the structure of the current database, records and variables.

See also the DBMS EXPORT command.

Note

There is no IMPORT command as such. The export file is a set of commands that, when run, rebuilds the database. An export file can be run like any file with SIR2002 commands.


Subset

Creates a binary file containing a subset of the database and data.

You must have DBA level access to the database.

The output file can be used to create a new database. A Subset file can be used as input to the Reload dialog.

Enter a Filename to contain the Subset. Use the "[>>]" button to find a file using the operating system file browser.
Optionally specify a New Database name for the new database. The default is that of the current database.
Press
Case Filter to define a subset of case data for the output.
Press Records to define which record types are used in the subset.
Press Database Help to view details on the structure of the current database, records and variables.

See the SUBSET command.


Unload

Creates a binary file containing the database and data.

You must have DBA level access to the database.

A Unload file can be used as input to the Reload dialog.

Enter a Filename to contain the Unload. Use the "[>>]" button to find a file using the operating system file browser.
Optionally specify a New Database name and New Password for the exported database. The default is that of the current database.
Check Delete Journal to remove the database journal file.

See the UNLOAD command.


Journal Upload

Creates a text copy of the journal file.

You must have DBA level access to the database.

The output file can be applied to a mirror copy of this database using the Journal Download dialog. This file is transportable across operating systems. Enter a Filename to contain the Upload. Use the "[>>]" button to find a file using the operating system file browser.
Enter the name of the Journal to upload. The default is the current database journal file.
Enter the database Update Level to limit the upload. The default is the current update level.
Enter a number or a range of numbers using the keyword THRU.
Enter an optional Title for the upload. This title is ignored by the download procedure.
Press
Records to define which records updates are uploaded.
Press Database Help to view details on the structure of the current database, records and variables.

See the UPLOAD command.


Journal Restore

Applies the changes made to one database to the current database.

You must have DBA level access to the database.

Enter the name of the Journal File to apply. Use the "[>>]" button to find a file using the operating system file browser.

See the JOURNAL RESTORE command.


Download Journal

Applies the changes made to one database to the current database.

Enter the name of the Upload File to apply. Use the "[>>]" button to find a file using the operating system file browser.
Check Messages if you wish to view any informative messages as the download is applied.
See the DOWNLOAD command.


Verify Database

Check the database for integrity and corrects any errors if possible.

The Options can only be used by the Database Administrator (DBA).

See the VERIFY command.


Itemise File

Reports on the contents of a SIR2002 binary file. That is an Unload, Subset or Journal file. Enter the name of the File to be itemised. Use the "[>>]" button to find a file using the operating system file browser.

See the ITEMIZE command.


Reload Database

Reload Database
RELOAD Database

Creates a new database from a SIR2002 Unload file.

Database

Enter the Filename which contains the SIR2002 Database Unload file.

Use the "[>>]" button to find a file using the operating system file browser.
There may be more than one copy of the database in an unload file. By default the most recent database is reloaded. Uncheck the "Reload most recent database copy" and the first database is reloaded. If you press the Show Databases... button then you will be able to list all databases on the unload file and select any one of them.

***Note*** that inorder for this dialog to find out the contents of an unload file, it must perform an ITEMIZE FILE and this can take some time if the file is large or memory is short. Selecting the "Reload most recent database copy" and pressing OK will do the ITEMIZE FILE and ten the reload whereas Unchecking the "Reload most recent database copy" and pressing OK will not do an ITEMIZE FILE.

Password

Enter the database password if it exists. A valid password must be entered to attach to the database.
Enter a Read Security and Write Security password. These passwords determine the security level at which you access the database.
Enter a Database Directory where the database is to be created. If a database with the same name already exists here then the RELOAD fails.

Enter a Loading factor between 0 and 99 (the default is 99).

Check Reset Update Level to restart the database update level count to 1.

Check the Reload most recent database copy to ensure that the most up to date version of the database (if there are more than one on the unload) is reloaded. Uncheck this box if you are sure that there is only one copy of the database or if you want the oldest version.

Press the Show Databases... button to get the more detailed reload dialog below:

Reload Database
RELOAD Database

Creates a new database from a SIR2002 Unload file.

Check Journalling Enabled if you require a journal of database updates to be maintained.

Press Itemise File to more information on the contents of this unload file.

Enter a Number of Cases or Records at which to terminate the reloading of data.

Select a File Number if there is more than one copy of a database on the unload file. The Itemise file button will give details of all databases.

See the RELOAD command. See the ITEMIZE command.


Import Database

Creates a new database from a SIR2002 Export file.

Import Database
IMPORT Database

Enter the Import file name which contains the SIR2002 Export file. Use the "[>>]" button to find a file using the operating system file browser.
Enter a Database Directory where the database is to be created. If a database with the same name already exists here then the IMPORT fails.

Enter a Loading factor between 0 and 99 (the default is 99).

See IMPORT.


Delete Database

Deletes the current database data and dictionary from the disk.

You must have DBA level access to the database.

Check Delete Journal to delete the current database journal.
Check Delete Procfile to delete the current database procedure file.

See the PURGE command.


Database Settings

Controls the overall database dictionary (database schema) settings.

Database Settings
Database Schema Settings

Maximums

These limits control data integrity and also determine the size of the common information record. If the size of the CIR is changed the database must be Unloaded and Reloaded.

External File Format

These control the format of the data when it is dumped to a text file or read using the input file utilities. They do not effect the structure of the database.

Press Document to modify the commentary documentation stored with this database.
Press
Security to modify database access security settings.
Press Common to update the list of database common variables.
Press Temporary to update the list of temporary variables.

See overall commands.


Database Security

Database security is controlled by up to 31 levels of read and write access.

Specifying a read and write password associated with a particular level, at database connection time means you have that level of access to the database.

The Database Administrator (DBA) must have the highest level access (Read 30 / Write 30).
System Level is the minimum Read level of access required to use the UNLOAD FILE Utility. The default is 30.
Common Read Level is the DEFAULT level of access required to read data stored in Common Variables. The default is 0.
Common Write Level is the DEFAULT level of access required to update data stored in Common Variables. The default is 0.

The current read and write passwords are listed.
To define new passwords and associate them with access levels Type the Level (0 to 30), the new Password and press the Read or Write button. To remove an existing password, type the level and leave the password blank.


Common Variables

Common Variables are a set of variables stored in the Common Information Record (CIR).

A list of the current Common Variables is displayed.
Type a new Name, select a data type and press the Add button to define a new Common Variable.
Common Variable names must be valid SIR2002 Names, that is one to eight characters, case insensitive, starting with A-Z and containing characters A-Z;0-9;$ # @ _.

Common variables can be removed from the list if they have not yet been added to the database. i.e. If they have been added to the list in the dialog but the database schema has not yet been updated by pressing OK.

See the COMMON VARS command.


Temporary Variables

Temporary Variables are used in computations during batch data input.

The computations are defined in the record schema definition and the values of these variables are not stored in the database.

A list of the currently defined Temporary Variable is displayed.
Type a new Name and press the Add button to define a new Temporary Variable.
Temporary Variable names must be valid SIR2002 Names, that is one to eight characters, case insensitive, starting with A-Z and containing characters A-Z;0-9;$ # @ _. See the
TEMP VARS command.


Record Schema

Creates and modifies record definitions in the database dictionary.

Select Record Type
Select or Create a Record Type

To Modify an existing record, select a record from the list and press
Modify Record.
To Create a New Record, Enter a New Name and a Record Number. If there are existing records you can choose to copy an existing record's definition.
Then press Create Record.
If you have previously used these dialogs to modify a schema and saved a definition to a file then press Restore to continue with that definition.


Record Schema Definition

This is the main record schema definition screen.

Record Settings
Record Schema Settings

The record Name and Number are displayed.

General

Check LOCK to specify that, if the schema modification requires it, that this record type may be locked after the changes are made. The database must then be restructured using unload/reload before the data in the record is accessible. If lock is not requested and the modifications require the record be locked then an error message is displayed and the modifications are not applied.

Enter the R/W Security levels for accessing data in this record. Specify one or two numbers from zero to thirty separated by a blank or slash. If one number is specified then this is both the Read and Write security level required to access this record data.

The Max Rec Count limits the number of records of this type in one case. If there are no key fields defined then this number must be 1.
Max Input Cols is an overall database setting which can be increased if required.
Lines/Rec sets the number of lines for multi lined input/output files. If Sequence Columns for the database are set then check Sequence Check to check the order of input records.

Variables

A list of the current record variables is displayed. Left of the list are the buttons:

To add a new record variable to the record definition, type in the name at the New: prompt and press Add.
New variables are inserted after the currently selected variable in the list.
New variable names must be SIR2002 names, that is one to eight characters, case insensitive, starting with A-Z and containing characters A-Z;0-9;$ # @ _.

Keys

A list of the current record key variables is displayed. Left of the list are the buttons:

Document

Lets you view and modify the database record documentation.

Computes

Lets you view and edit the batch data input recodes, computes and ifs for this record.

Booleans

Lets you view and edit the batch data input accept and reject conditions for this record.

See record commands. Press OK to apply the changes.
Press Save As to save the changed definition to a file. This saved file can be restored and the record definition continued.


Record Schema Common

Copies the names of Common or Temporary variables from the CIR to this record definition.

Lists of the Common Variables and Temporary Variables are displayed. Select a variable and press the copy button.


Record Schema Copy Variables

Copies the full definition of one variable in this record to another variable. The field positions for batch data input are not copied.

A list of available Variables is displayed. Enter the name of a new or existing variable to copy the definition to.


Record Schema Variables

This is the main screen for variable definition.

The name of the current Variable is displayed.

Type

New variables default to four byte integers. Change the type as required. Choose:

Enter a Label for the variable.
Enter the R / W Security level to access this variable data (e.g. 20,30).
Enter a Scale Factor if this variable is a scaled integer.

Numeric variables can have a Statistical Type.

Missing Values

Enter one, two or three values to be missing values for this variable. The keyword BLANK can be used.

Minimum & Maximum Value

Use Minimum and Maximum to define a valid range for this variable. Specify both Minimum and Maximum or neither.

Output Format:

Define the input / output format for this variable. This format is used by the File Dump and File Input utilities.

Press Values / Labels to edit the variable's valid value and value labels lists.

Press Previous to save any changes to this variable and get the definition from the previous record variable.
Press Next to save any changes to this variable and get the definition from the next record variable.


Record Schema Values & Labels

Controls a variable's valid values and value labels lists.

Valid Values lists the values of a variable which can be accepted into the database. Missing values are not included in the valid value list.
If a string variable has valid values it becomes a categorical string variable (or
CATVAR) and is stored internally as a number corresponding to the valid value.

Value Labels lists the labels corresponding to particular values of a variable. Missing values can be included in the value label list.


Database Secondary Indexes

Lets you define and modify secondary indexes on database records. Note that if you redefine an index then the index is deleted and recreated.

Select a secondary index from the list and press Modify, or press New to create a new index.

The index must have a valid sir name and this name must be unique to this database.

Check the Unique box to create an index which points to a single record (e.g. Social Security Number on the Employee record). This ensures that no two records are added with the same value for the indexed variable(s).

Select a record and variable(s) to index on. Use the Key > button to add the variable to the key list.

Once a variable is in the key list:
use the A/D button to toggle the sort order;
Use the UPPER button to indicate that string keys are treated as case insensitive (converted to uppercase);
Use the v and ^ buttons to change the hierarchy of the keys;


Import records from ODBC

Lets you create record definitions and read data from ODBC data sources or the SirSQL Server. There are several dialogs to guide you through this procedure.

Import Data Source

Choose between ODBC and the SQLServer.

Select Columns

A list of Tables and Columns is displayed. Select one Table and any or all of the Columns. You can enter a
Where condition to select a subset of table rows. Press Next and SIR2002 attempts to query the data source.

Save Data In

Chose the database record type where you want to place the new data.


ODBC Data Source List

Select an ODBC data source from the list and press Connect.


Write Schema

Produces output based on the database schema.

Choose Commands to produce a copy of the schema definition.
Choose Form to produce a default data input form definition. This can be used with SirForms to input data into the database.
Choose Report to produce a report documenting the structure of the database.

Enter a Filename for the output. If no filename is entered then the output is displayed in the main window. Use the "[>>]" button to find a file using the operating system file browser.

Options

Not all options apply to each output type. Non applicable options are disabled.

Press Records to define a subset of record data for the output.
Press Variables to define which variables are included in the output
Press Database Help to view details on the structure of the current database, records and variables.

See the WRITE SCHEMA and SIR2002 SCHEMA LIST commands.


List Stats

Produces a status report about the database showing overall statistics and a line per defined record type.

See the LIST STATS command.


List Tabfiles

Shortcut: CTRL+T

Lists connected tabfiles and lets you connect, disconnect, view details of, and set the default tabfile.

Press Connect... to browse the file system for tabfile files.

Press New... to create a new tabfile.

Select a connected tabfile and press Default to set that tabfile as the default.

Select a connected tabfile and press Disconnect to disconnect that tabfile.

Press Done to close the dialog.


Tabfile Information

Displays a list of tables defined on the selected tabfile. The selected tabfile can be changed using the pull down list at the top.

Tables can be added with the New... button or viewed with the Details... button.

PAGE environ/menu/tablinfo

Table Information

Displays Table information. Press the Columns button to view the variables in the table.
Select a variable to see its type, label and ranges.

Press the Indexes button to view and modify the indexes on the table.
Select a secondary index from the list or press New to create a new index.

The index must have a valid sir name and this name must be unique to this tabfile.

Check the Unique box to create an index which points to a single row (e.g. Social Security Number on the Employee table). This ensures that no two rows are added with the same value for the indexed variable(s).

Select the variable(s) to index on. Use the Key > button to add the variable to the key list.

Once a variable is in the key list:
use the A/D button to toggle the sort order;
Use the UPPER button to indicate that string keys are treated as case insensitive (converted to uppercase);
Use the v and ^ buttons to change the hierarchy of the keys;


Variable labels and ranges

The left half of this dialog shows labels defined for this variable. The right half shows valid values and ranges.


Disconnect Tabfile

Closes the connection to the selected tabfile.


Default Tabfile

Sets the chosen tabfile as the default. Tabfile operations where the tabfile is not explicitly named apply to the default tabfile.


View Tabfile

Displays details of the chosen tabfile.

The Tabfile name is displayed along with its attributes.

Tables

A list of the tables in the tabfile is given.

Indices

A list of the indices on the selected table of the tabfile is given.


Table Details

Shows the columns (or variables) and their data types for the selected table.


Index Details

Shows the columns (or variables) used and their sort sequence for the selected index.


Create Index

Creates a new index for the chosen table on the tabfile.

The tabfile and table names are displayed.
Enter the new Index Name.
Check Unique Index if only one instance of the selected keys is allowed in this index.
Enter a Percent Free for this index. This is between 0 and 99 and indicates how much free space is left in each index block. Use small numbers for stable, read only tables and larger numbers (e.g. 50) for dynamic tables.

Columns

A list of the columns in the table is displayed. Press Key> to add the selected column to the list of keys for this index.

Keys

A list of the current keys in this index is displayed.

See the CREATE INDEX command.


Delete Tabfile

Deletes the selected tabfile if permissible.


Connect Tabfile

Attaches to a tabfile as the named user in the specified mode.

Enter the Tabfile Name and, optionally the Filename. If no filename is specified then it is set to the tabfile name with extension .tbf in the default directory. Use the "[>>]" button to find a file using the operating system file browser.

Security

Enter Group Name/Password and User Name/Password if these are required for this tabfile.

Mode

Choose auto to open the tabfile in read or write mode as needed.
Choose read to open the tabfile in read only mode.
Choose write to open the tabfile in read/write mode.

See the CONNECT TABFILE command.


Create Table

Creates a new table on this tabfile.

The Tabfile name is displayed.
Enter the new Table name.

A list of the currently defined Columns is given.


Verify Tabfile

Performs an integrity check on a tabfile. The tabfile need not be connected.

Enter the Tabfile Name and, optionally the Filename. If no filename is specified then the tabfile name with extension .tbf in the default directory is used. Use the "[>>]" button to find a file using the operating system file browser.

See the VERIFY TABFILE command.


Run SIRSQL

SirSQL starts the SIR SQL module.


File Attributes

File attributes are SIR2002 names (i.e up to 8 characters, case insensitive, starting with A-Z and containing characters A-Z;0-9;$ # @ _) associated with operating system filenames. All file references in programs are to the internal name which allows applications to operate on different physical files without altering program code.

For example, the attribute for the first file in the first database is always SIR011. This is mapped to the specific operating system file such as C:\mydir\myproject\projdb.sr1.

Internal names may be specified by a program, may be the filename if it is short and meets the specification of an attribute name or may be system generated such as SYSUSR1. Attributes are usually created automatically when you refer to a file but can also be created and amended specifically as necessary.


Buffers

SIR2002 Buffers are temporary text storage areas which exist until deleted or the SIR2002 session is terminated.

A list of the current buffers is displayed for selection. There are three buffers used by the system: The Current Command Buffer contains a command or set of commands built from dialog input. The Paste Buffer is used by the internal SIR2002 editor and the Previous Command Buffer stores commands issued through the DBMS Command dialog.


Global Variables

Global variables are text strings which are substituted where the global name appears in angle brackets (<>), as a command is read. There are several System Globals, and these are not listed here.

See globals.


Master Settings

Controls concurrent database access through master. A SirMaster must be running and have write access to a database to use concurrent database access.

Enter the name and port of the Master process (this name is shown when master is started, e.g.: SirMaster Started 09/27/99 11:31:18 on 'b2:3000' - the name is B2:3000). Press Connect.

Once Master is connected, the Master Administration button is enabled.

When Master is connected its name is shown in the SIR2002 main window title bar.

Press the Disconnect button to access databases in single user mode. Single user mode is much faster than concurrent access but, if master is controlling the database for other users, you are only able to read and the data you retrieve is current to the point master last copied the data to disk.


Master Administration

This dialog controls the master process.

The name of the current master process is displayed.

If master has been started with a password specification then this password must be entered correctly.

Master can be set to automatically perform a regular Difference File Copy. To set the update interval in minutes, enter a number and press the Reset Copy Interval button. A value of 0 specifies that the difference file copy is only done when all users stop using the database. This command requires a correct password.

The Copy Diff. File Now button does a difference file copy.

A list of clients of the current master is displayed. The current session client is marked with a "*". The connection time and last transaction time of the selected client is displayed below the list. Press the Refresh button to update this list.

Press the Disconnect User button to disconnect a user from master. This requires a password. Normally allow users to disconnect themselves.

A list of active databases opened by the current master is displayed.

Press the Shutdown Nologons button to initiate master shutdown. This requires a password. Each master user is sent a message and no new users are allowed to connect to this master. When all users have disconnected then master shuts down.

Press the Shutdown Now button to shut master down now. This requires a password. No warnings are given to users.


Preferences

The settings in this dialog control this and future SIR2002 sessions. The setting are saved in the sir.ini file.

Title

Sets the text displayed in the main window title bar.

Editor

SIR2002 has two
internal editors but also allows you to use your favourite editor in a seamless and integrated way for all your editing. To use an external editor, you must tell SIR2002 where to find it. Use the >> button to locate the executable file which starts the editor.
The SIR2002 internal editor is a simple windows text box; the EW internal editor is the editor used in older versions of SIR.

HTML Viewer

The SIR2002 on-line help is in HTML format. Use the >> button to locate the executable file which starts an HTML browser (e.g. Mosaic / Netscape / Internet Explorer...).

In Windows this defaults to your default web browser.

Start Up

These settings will not be applied until you restart SIR.

Novice Welcome

On starting SIR2002 with no database connection parameters, a "Welcome to SIR" dialog can be displayed. Uncheck this box to suppress this welcome dialog.

Font Size/Name

On Windows, enter a number (around 10) to set the size of the text used in the main menu, dialogs and in the Execution Window. On other machines enter the name of the font to be used. (the unix command xlsfonts lists available font names).

Splash screen / Duration

On Windows, uncheck this box to suppress the graphic displayed when SIR2002 is started. Check the box and enter a number in the duration box to set the number of seconds this graphic is displayed.

Output

These settings apply to this session only. The Page size, Error/Warning limits and Print back settings can be saved as defaults for future sessions.

Default Directory

Sets the default directory.

Output File

Sets a Filename to write output to. A blank filename (or the name CONSOL) directs output to the session window. Use the "[>>]" button to find a file using the operating system file browser.

Page Size

Sets the size of output file in character rows and columns. The number of rows applies to file output only and sets the number of lines on a page.

Error Warning Limit

Sets the limit on the number of error and warning messages displayed during the processing of input commands. Once the limit has been reached, processing continues but the messages are suppressed.

Print Back

Sets what types of messsages are displayed or printed to the current output.
Print back options control the text written to the output file or output window.

Check Remarks to show system remarks and messages;
Check Commands to echo top level commands;
Check Called to echo commands generated from the CALL command;
Check Do Repeat to echo commands generated by DO REPEAT blocks;
Check Skipped to display commands not processed due to CIF (Compile IF) commands;
Check Attributes to display information as a file is initially referenced;
Check Task Stats to display process information after a task completes .

See the PRINT BACK command. See the SET command.

Procedure Settings

These settings effect the behaviour of the commands under the Procedures menu. The setting are saved in the sir.ini file.

Exclude Database Variables defines a set of database variables to be excluded from the variable lists in the Procedures.
Sometimes database variables and records (and dummy CASES) are used for admin/audit and other purposes not directly related to the study. You can exclude these variables from the pick lists in the output procedures. Because these are related to a DATABASE rather than a user, these are defined and stored in the database PROCFILE. The member SYSTEM.EASYPROF or the member named by the GLOBAL "EASYPROF" is used. If the member does not exist all variables and cases are used.
The format of the file is:

CASE LIST = caseid_list
INCLUDE
 recname.varname
 recname.varname
 recname.varname
 ...
EXCLUDE
 recname.varname
 recname.varname
 recname.varname
 ...
Recname.varname can be a pattern (like rec@.va@me) in the EXCLUDE list. Extension / View With Shows which external programs are used to view the output of the procedure.

Press Remove to delete the association between the filename extension and external program.

New / View With enter a new or existing extension and use the >> button to locate the executable file associated with this extension.
Press Add to update the list with the new details.

Preview Records set the number of records to be processed in preview mode.

Use Master If you are accessing the database through Master and you uncheck this box then Master is not used.

HTML Style points to a member that is used with HTML reports. There are some members in the sysproc file with names like EASY.RSTYLEx. you can enter one of these or create your own member based on one of these and use that.


Execution Window Keymap

Controls the function keys used by SIR2002 system menus, dialogs and the editor in the Execution Window and other full screen applications.

The execution Window is displayed and shows two columns under a main menu. The left column describes each logical function and the right column lists which key(s), if any have been assigned to that logical function.

Several keys are mapped by default. These include the Up and Down Arrows and Enter. Use the arrows to select a function. Press the M key on the keyboard to Map that function to a key. Press the desired key to assign to that function. Note: this key cannot be a character key nor a key that has already been mapped. ] Then type in a description of that key (e.g. "Ctrl+Page Down") to be displayed in this screen.

Press the U key on the keyboard to Unmap a key association.

Press the S key on the keyboard to Save the key map. The definition is saved in the file sirdbms.kmp in the current directory or in the file named on the TRM= parameter on the command line. On starting SIR2002 the keymap file from the current directory is loaded. If there is no such keymap file then the one from the SIR2002 directory is used. To make a modified keymap file available as the default, copy the sirdbms.kmp file to the SIR2002 directory.

Press the X key on the keyboard to Exit the key mapping system.

Press the P key on the keyboard to save the contents of the screen to a text file (called sirkmap.tmp) .

Note: when the Page Up and Page Down functions are assigned keys, you can use these keys to move around the list of functions.


LIST REMARKS/LIST COMMANDS

These can be turned on or off to limit the amount of information displayed in the output as commands are processed. These are here for convenience. List Remarks, when on, means that various informative messages are displayed. List Commands, when on, echoes all input commands to the output.

Remarks and commands, as well as several other output message types, can be switched on and off in the Preferences dialog. They can also be controlled using the PRINT BACK DBMS commands


SIR HELP

The SIR2002 help is HTML based and can be viewed using any HTML browser. The preferred HTML browser can be chosen in user preferences.


Welcome to SIR

This dialog is displayed when SIR is started without a database parameter and when the novice welcome indicator is on.
Welcome Dialog
Novice Welcome

Press Cancel or select "Start with no database" to start SIR without connecting to any database.

Select "Create a new database" to start defining a new database.

Select "Open new database" to connect to selected databases in the list below. You are prompted for any passwords. If More... is selected then the file browser allows you to search for databases files.

Check the "Don't show this anymore" to prevent this dialog being displayed everytime you start SIR. It can be displayed again by checking "Display Novice Welcome" in the startup section in the Preferences dialog.

homecontents start chapter top of pagebottom of pagenext page index