Introduction
When you start SIR/XS, you see the main SIR 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) is the main way of interacting with SIR/XS.
(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 that 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) that 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 SIR/XS, you may get a 'Welcome to SIR/XS' 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 SIR/XS 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
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 SIR/XS main window. The action taken is based on the file 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
The New Database dialog requires a database name. 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 Journaling to keep a record of changes made to
the database and data that 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 that 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 or other file.
Shortcut: CTRL+O
If the file is a database with password or security defined, then a dialog is displayed:

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.
If other file types are selected and further information is needed to open that file then an appropriate dialog is displayed.
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 that 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

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. |
Tip
The default main menus program allows you to enter the name of a menu command in the output window. For example, if you type MEMBERS[ctrl+R] then the Members dialog is displayed. |
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.
You can change the size of this dialog in preferences.
Exit
Terminates the SIR session.
Spreadsheet

Spreadsheet table selection
The menu interface to the SIR/XS 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 SIR/XS spreadsheet can also be invoked by the SIR SPREADSHEET command and can be invoked as the SPREAD SHEET VisualPQL Procedure.

Spreadsheet
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:
- Close Closes the spreadsheet and returns to the main menu.
- Find Allows you to search the spreadsheet for specified strings. (Note the find/replace function only updates local data; it does not flag records for database update.)
- New Record Creates a single empty row after prompting for keys.
- Clone Record Copies the current row to create a new row.
- Delete Record Deletes the current row.
- Export Creates a copy of the spreadsheet in CSV (comma separated values) format.
- Print Prints the spreadsheet.
- Nullify Sets the value of the current cell to UNDEFINED.
Forms & Data Entry
Forms

Run SIRForms or PQLForms
Lets you create and run data entry forms. SIRForms is a character screen based data entry system.
PQLForms is a data entry system based on VisualPQL and has a graphic interface.
Check the PQLForms box to create or run PQLforms.
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.
If you are using SIRForms then 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 SIRForm 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.
Check Make this the default data entry for this database to save this as the method used by the Data Entry... menu item.
Data Entry
This option will run a default form for this database. The default will either be the generic PQLForms data entry system created by
WRITE SCHEMA
or it will call the default entry procedure set in the forms dialog above.
The default procedure is stored in the member RUN_DEF_FORM in the database's SYSTEM family.
SIR File Dump

SIR File Dump
The File Dump command writes a text file containing record data from selected record types and cases.
The output file is suitable for input to the File Input utilities. You must have DBA level access to use this utility.
Enter a filename to contain the dumped data. Use the "[>>]" button to find a file using the file browser.
Check the CSV option to dump the data in Comma Separated Values format.
Enter an optional Undefined Character to be written to the file when undefined data are found. The default undefined character is BLANK.
If the I/O formatted variables option is selected then the format is as defined in the data dictionary.
If the I/O formatted variables option is not selected then any variables without file formatting defined in the schema are written to the end of each line.
Check the Explicit Decimal Points box and real variables with decimal parts will be written with their decimal points. The default is that the decimal point character
is not written but implied by the default number of decimal places defined in the schema for that variable. (eg an F4 with a value of 3.1415936 will be dumped as 31416 and input
as 3.1416).
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

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 selection.
Select Cases

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.
- Check List and type a list of the case ids to be used (e.g.
1,2,4,8 thru 10,15).
- Check Count and type a number of cases, optional increment and optional starting case ordinal (e.g.
5,3,2).
- Check Sample and specify a percentage between 0 and 100 and an optional random number seed (e.g.
.5,18543545)
Press OK to check the syntax of the Boolean and list then save the settings.
Select Records

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
Updates the data in the database from a text input file. This file can be created using a SIR File Dump.
The format can be defined in the data dictionary or can be a Comma Separated Values format (CSV) file.
Choose the type of data updating required from the list:
- Add records adds new records if they don't currently exist.
- Replace records replaces existing records.
- Read input data adds or replaces records.
- Update records replaces selected variables on existing records.
- Evict records deletes existing records.
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.
- The Listing file contains error messages for rejected records.
- The Records file contains the rejected record in its original format.
Summary files
Optionally enter the names of files to contain information on
the input run.
- The Log file describes rejected records.
- The Stats file contains a summary of the numbers of
records added, modified or deleted.
Options
Not all options are applicable to all update types. Options that
are not applicable are disabled.
- Check Accept to accept records with erroneous data values.
- Check All to write records with errors to the error file
whether or not they are Accepted.
- Check Logall to write records with errors to the log file
whether or not they are Accepted.
- Check NoNew to specify that no new Cases are created.
- Check NoSeq to ignore sequence checking on multiple line input
records.
- Check EvictCir to delete the Common Information record if all
records in this case are deleted.
- Check Compute to specify that any data dictionary COMPUTEs are to
be reexecuted.
- Check Add to allow new records to be created.
- Check NoBool to specify that any data dictionary ACCEPT REC IFs
are bypassed.
- Check Blank=Undefined to specify that numeric variables will be set to Undefined when the input file contains blanks.
The default is for these variables to be set to zero if BLANK is not defined as a valid missing value.
- Check I/O Formatted Vars to only update variables with text file format settings in the schema.
- Check CSV to update from a Comma Separated Values format input file. If you choose this option then you may
need to specify a file record length. It does not matter if this length is longer than the physical record length.
Parameters
- Blip. Enter an approximate number of input records to enable the
progress bar.
- Rectype. Enter the record name or number that is to be updated in this run.
If this is not specified it is got from the record type columns on the input file.
- Loading. Enter a number between 0 and 99 (the default is 50).
- ALimit. Enter a number to limit the number of records accepted with errors.
- RLimit. Enter a number to stop the input run when that number of records is rejected.
- Skip. Enter a number of lines to skip at the start of the input file.
- Stop. Enter a number to stop the input run when that number of records is read.
See batch data input.
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 variables to include in the output
See the FILE LIST command.
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 items under the Procedures menu offer an easy way to generate output from your database. These are related to the
PQL Procedures in that they each generate a PQL program that includes one of those PQL Procedures.
The Output can be a report or tabulation, a graph or a file readable by another software package.
The procedures can be saved as either a set of selected options for the dialogs or as a PQL program. You can edit the saved PQL to perform more complex
operations than can be specified in the dialog interface.
The More Procedures selection in this menu is a place where you can store commonly run reports and other
programs. These programs appear by name in a list and you can add new programs and descriptions. The most recently executed program from the procedures above
can be stored in the More Procedures list, as can external programs in files or members.
The Preferences selection will open the main preferences dialog on the Procedures page.
The Export, Report, Tabulate, Graph and Statistics options in this menu all initiate a set of dialogs that allow you to select an output file, database and local variables,
sort, filters and layout options for the generated output. These dialogs are described below.
1. Output File Type and name
Enter an output filename and select an output type.

Select Output Type
The available output types for Export are:
- Comma Delimited File - readable by many packages (text)
- BMDP® Format - BMDP Statistical package (binary)
- DBASE® Format - readable by DBASE, Excel (binary)
- Data Interchange Format (DIF) - readable by many packages (text)
- Minitab® Portable Format - Minitab Statistical Software (text)
- SAS® Export Format - SAS Statistical Software (text)
- SPSS® system Format - SPSS Statistical Software (binary)
- SPSS® portable Format - SPSS Statistical Software (text)
- SYSTAT® Format - SYSTAT Statistical Software (binary)
- XML® Format - eXtensible Markup Language (text)
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.

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.
- Records Lists the available record types in the database. Select a record type and its variables are shown.
- Variables Lists the available variables in the selected record type. Select the variables required.
- Press Select All to select all variables in the current record.
- Press Clear Select to unselect all variables in this and any other record
- Press Get From... to get the variable selection from a previously saved procedure. Note: this also restores derived variables and record filtering options.
Check the Show Details box to include the variables' type and label in the selection list.
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.
Sequence

Modify Relations
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.
In the 'Via' dialog, choose the variables from previous records to use as the key fields for this record.
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.

Create Derived Variables
- Press New to create a new variable, then select the type of variable and give it a unique name.
- Press Delete to remove a local variable.
Use the other buttons to create an expression to define the local variable.
- Press Variable to put a variable name into the expression. Only variables of the appropriate type are listed.
- Press Value to put a constant value into the expression.
- Press Function to use a VisualPQL function in the expression. Only functions of the appropriate type are listed.
4. Sort Output
Select variables to sort the procedure output.

Sort Output
A list of available variables is displayed.
- Press Sort >: to append the selected variable to the sort variable list.
- Press A/D to toggle between Ascending and Descending sort.
- Press ^ or v to move the selected sort variable up or down in the list of variables.
- Press Remove to remove the selected sort variable.
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

Output type specific options
The following options are available on Report:
- Heading Specifies the text displayed at the top of each page of the report.
- Variables Lists all the variables available to the procedure.
- Output Variables Lists the variables, in report order, that are used in the report. If there are no variables in the list then ALL the variables available are used. Variables can be added to this list from the list of available variables, removed or resequenced.
- Break On Lists all Sort variables. Select one or more to break the report into sections.
- Total displays totals for all numeric variables at the end of the report.
- Subtotals displays totals for all numeric variables at the end of each section, if break variables are selected.
6. Filter Records
Use filter to specify a subset of the data to be used in the procedure.

Filter Output
Specify a percentage (0 - 100%) for a proportional Random Sample of the data.
Specify a logical Condition that records must satisfy to be used.
Use the buttons to create a logical expression.
- Press Variable to put a variable name into the logical expression.
- Press Value to put a constant value into the logical expression.
- Press Function to use a VisualPQL function in the logical expression.
7. Finished

Run & Save Program
- Run Runs the procedure and displays the output.
- Preview Runs the procedure on a small number of records and displays the output.
- View VisualPQL Shows the VisualPQL code that is generated. The options in the procedures represent a fraction of the options available in the VisualPQL language. You can save this code and use it as the basis of a more complex procedure.
- Save Saves the options and settings specified in this procedure. Saved files can be restored or run like any other set of SIR/XS 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.
More Procedures
This displays a dialog listing previously stored programs that will run on this database. These programs are stored in the PROCEDURE family belonging to the current database. There are also some SYSTEM procedures that will run on any database.
A user can add a USER procedure by pressing the Add button then entering information about the new procedure and selecting the procedure's program source. If you have run one of the other
procedures in the main menu (eg Report... Tabulate... Export...) in this session then you can also save its source as a stored procedure.
The program source along with the entered information is then copied to the procedure family.
If you uncheck the Copy Source button then the stored procedure will simply CALL the external source code. This way you can put
the procedure into several databases but only maintain one copy of the program.
Pressing the Run button will execute the selected procedure. What happens after you press run depends on the stored program.
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 that prompts for a filename.
Saved files can be restored or run like any other set of SIR/XS 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

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.
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:
- Press New to create a new family.
- Press Delete to delete the current family and all its members.
- Press Rename to change the name of the current family.
Members
There are different types of members that 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:
- Check the Show Text+Executable only box to hide system members (subroutines - :O and external variable blocks - :V) from the display.
- Press Edit (or double click on the member) to edit the current text member.
- Press Info to see the creation and modification dates and times, the size, type, security and first few lines of the current member.
- Press New to create a new member.
- Press Delete to delete the current member.
- Press Rename to change the name of the current member.
- Press Copy to copy the current member to a new member.
- Press >File to copy the current member to a file.
- Press <File to replace the selected member with a file.
- Press Print to print the current member, the current family or the entire file.
- Press Security to set Family and Member passwords.
- Press Run to execute the current member. If this is a text member, it is expected to contain SIR/XS commands.
Optionally specify a list of parameters using Args:. These values, delimited by commas, are substituted into any positional parameter variables in the member.
There are several other options:
- Press Search to search the current member, the current family or the entire file for a specified text string. All members searched are listed in the output window together with any lines containing a matching string.
- Press Condense to condense the file. As members are saved and re-saved in the procedure file, the old members take up disk space. Condense the file to physically delete the copies of old members and recover this space.
- Press Import Members to read a file produced by
PWRITE and store the members from that file. This gives options of notification and for permissions to overwrite existing members of the same name.
- Press Export Members to write the current member, the current family or all text members on the procedure file to a file. You require DBA security to write the whole procedure file or selected families.
- Press Create to create a new procedure file.
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
The system procedure file is shipped with the software and contains various programs and procedures to run the system. The system procedure file has the internal name SYSPROC and the external name SirProc.srp.
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.
Member Types
There are different types of members that are identified by a suffix delimited from the name with a colon (:).
There are four current types of members. 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 and can be edited. The other member types are 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.
Search Members
Searches the procedure file for members that match the search criteria.

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 and 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
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(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.
You can optionally save the formatted output to a named file.
Import Members
Import Members (also known as PREAD) processes a file as generated by Export Members or 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.
Export Members
Produces a text file containing the chosen Member(s) in a format suitable for input to the PREAD command or Import Members.
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.
Member Name

New Member
This generic dialog requires a member name for use with the previous dialog.
Type the member Name, that can 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.
Compare Procfiles
Compare Procfiles lets you compare members between two procedure files or PWRITE files.
Selected members can be copied from one procedure file to another or from a PWRITE file to a procedure file.
Select two procedure files or a procedure file and a PWRITE (export version of a procedure file);
Select type of members to compare (Text, or compiled executables).
Check the size, date or contents boxes to compare these attributes. If none of these are checked then members that do not exist in the one of the files are selected. Size selects members that differ by size; Date selects members that differ on modification date; Contents selects members if they differ by size or, if they are the same size, then the text is compared and the member is selected if different.
Press Compare to start comparison process.
After comparison the different members selected are in each list. Use the < or > buttons to copy selected members from one side to the other.
Files
Shortcut: CTRL+SHIFT+F
Performs operations on operating system text files.

Files
Type in the Filename.
Use the "[>>]" button to find a file using the operating system file browser.
- Press Edit to edit the file using your current text editor.
- Press Delete to remove the file. It cannot be undeleted.
- Press Rename to change the name of the file.
- Press Info... to display size and history information on the file.
- Press Print to print the contents of the file, maintaining any SIR/XS report formatting.
- Press >Member and you are prompted for the member to save this file in.
- Optionally enter Arguments for substitution parameters in the file and
- Press Run to execute a set of SIR/XS commands stored in the file.
Dialog Painter
Shortcut: CTRL+SHIFT+D
Prompts for a file or member to be created or edited with the Dialog Painter.

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.
PQL Debugger
Starts the GUI PQL Debugger allowing a previously debug-compiled program to be selected and debugged. The use of the debugger is described in the a VisualPQL Reference manual.
Database Connection
Shortcut: CTRL+D
Lists connected databases and lets you connect, disconnect and set the default database.

Databases
Press Recent for a list of recently connected databases.
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 Connect... to get the Open Database dialog.
Press Properties... to display some information about the selected database.
Press New... to create a new database.
Press Close to close the dialog.
Export
Export creates a text file containing commands that define the database and its contents.

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 SIR/XS 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
- Check Passwords to include the current database passwords to the export file.
- Check Data to include the data section of the database.
- Check Procedures to include the procedure file section of the database.
- Check Indexes to include the secondary index creation commands the database.
- Check Recalculate Max Key Size on import to suppress the generation of the MAX KEY SIZE command. This command is set from subsequent record definitions. If the current database has had a record type with a large key defined and then subsequently deleted then the new database inherits the large MAX KEY SIZE setting that may cause records and indexes to be larger than necessary.
- Check Backward Compatible to produce an export that is readable by earlier versions of SIR.
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.
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 SIR/XS commands. |
Unload

UNLOAD Database
Creates a binary file containing a subset or a full copy 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 unload 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 and New Password for the exported database. The default is that of the
current database.
Check Delete Journal to remove the database journal file.
To unload a subset of the database, select cases and records using the following buttons:
Case Filter to define a subset of case data for the unload.
Records to define record types used in the unload.
See the SUBSET command.
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 Levels to limit the upload. The default is the most recent update level.
Leave the first level blank to start from the first update in the journal. Leave the last blank to get all updates to the end of the
journal.
Enter an optional Title for the upload. This title is ignored by the download procedure.
Press Select Variables to define the records and variable updates to upload.
See the UPLOAD command.
Journal Restore
Restores the current database to a different update level using a journal file.
You must have DBA level access to the database.
The current database could be a reload of an earlier version of your database for which you have
subsequent updates stored on a database journal file (JOURNAL RESTORE), or you can restore the database to
and earlier update level by undoing the journalled changes (JOURNAL ROLLBACK).
Note that changes to the schema cannot be undone. It is possible to rollback data changes from before
some schema changes but this should be done with caution.
Use the "[>>]" button to find a Journal File using the operating system file browser.
Check Rollback and select an earlier update level to restore the database to;
Or check Restore and select a later update level to restore the database to;
If there are no appropriate journalled updates then the relevant option will be disabled.
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).
- Check CIRkey to list index values in the CIR.
- Check CIRdata to list all variables in the CIR.
- Check Check to check each variable against its schema definition.
- Check Ccf to switch the corruption flag off.
- Check Reckey to list index values in each record.
- Check Recdata to list all variables in each record
- Check Patch to repair any repairable problems.
- Check Rcf to list record counts from the CIR.
- Use Count to examine a subset of cases in the database. Enter one, two or three numbers specifying a total number of cases, an increment
or number of cases to skip and a starting case. (e.g.
4,2,5 checks cases 5,7,9 & 11)
See the VERIFY command.
Itemise File
Reports on the contents of a SIR/XS 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
Creates a new database from a SIR/XS Unload file.
Database
Enter the Filename that contains the SIR/XS Database Unload(s).
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 last (most recent) unload of a database is reloaded. Press Itemize to see if there is more than one unload on the file, if there are then you can change the File Number to select the update level to reload.
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.
Uncheck the most recent database copy box to select an earlier copy of the database if one exists on the file. You can use the Itemize
button to view details of the unload file.
Optionally enter new values for N OF CASES and
RECS PER CASE in the new database. These default to that of the original database.
Check the Reset Update Level box to set the update level of the created database to one. The default is the update level of the unloaded database.
Enter a Loading factor between 0 and 99 (the default is 99).
See the RELOAD command.
See the ITEMIZE command.
Import Database
Creates a new database from a SIR/XS Export file.

IMPORT Database
Enter the Import file name that contains the SIR/XS 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 Schema Settings
Documentation
The DB Label specifies a label of up to 78 characters to describe the database. The text
area below can be used to modify more detailed commentary documentation stored with this database.
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.
- Cases/Records limits the total number of cases in a case structured database or records in a caseless database.
- Recs per Case limits the total number of records of any type in a case.
- Recs per Type limits the number of records of any one type in a database.
- Record Types limits the number of record types that can be defined in a database. Also no record type number may
exceed this value.
- Key Size specifies the number of bytes required to store the largest record key.
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.
- Max Input Cols determines the record length of the dumped data.
- Rectype Cols specifies the columns containing the record number.
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
The overall database access password is shown and can be modified here.
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 using the standard record schema dialog.
Note that many options on this dialog do not apply to common variables or the CIR and have been disabled.
You can enter a new common variable and press Add, or Delete existing variables. You can also modify the variables labels, ranges and other meta data using the Detail... button.
Press OK or Apply to update the common variable definition. Press Save As... to save the common variable definition commands to a file without applying the changes to the schema.
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.
See the TEMP VARS command.
DATA FILES

Data Files
Specifies that the data file for this database is not a standard data file. It may have a different name, be in a different directory or may be split across multiple data files.
Type in a Key made up of the Case Id and optionally a record type and part of a record key. For a caseless database, just enter a record type and part of a record key. Enter a filename and press Add/Modify. Any records with keys after the entered one will be stored in that file.
If the key is blank then any records before the first entered key. If data files are specified then there must be exactly one blank key.
Press Edit to copy a selected existing data file definition to the text areas below for editing.
Press Delete to remove a data file definition.
Press OK exit and save the data file definitions. Note: the data files are not applied until the database is rebuilt by unload/reload or export/import
Record Schema
Creates and modifies record definitions in the database dictionary. You can also modify common variables and standard variables using this dialog.

Select or Create a Record Type
Press View... to look at the record definition without risk of changing any settings.
To Modify an existing record, select a record from the list and
press Modify....
Press Delete to remove the schema definition (and any record data) from the database.
To Create a New Record, Press New..., select a record number and enter a Record Name.
If there are existing records you can choose to start modifying from a copy of an existing record's definition. You can also just create a copy of the record schema and all the data records (but this may take some time).
Then press OK.
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.
You can save record schema commands to a file using the Write... button.
Record Schema Definition
This is the main record schema definition screen.

Record Schema Settings
The record Name and Number are displayed.
General
Optionally enter a descriptive Record Label of up to 60 characters.
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 that can be
increased if required.
Lines/Rec sets the number of lines for multi lined input/output files.
Variables
A list of the current record variables is displayed. Left of the
list are the buttons:
- Press Detail... to view and change the definition of the selected variable.
- Press ^ to move the selected variable up the list of variables.
- Press v to move the selected variable down the list of variables.
- Press Delete to remove the selected variable from the definition.
- Press Find... search the list for a variable. You can search by name, var label or value labels.
- Press Next... find the next matching variable from the search.
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.
You can also add variables and copy their meta data from other variables using the Fetch... button. If you enter a new name and press Fetch then that new name is used, otherwise the variable name is copied from the chosen variable.
Select a variable from another record definition and press OK.
Keys
A list of the current record key variables is displayed. Left of the
list are the buttons:
- Press Key> to make the selected record variable a Key Field for this record.
- Press A/D/I to toggle the sort order of the selected key (Ascending , Descending , or AutoIncrement).
- Press ^ to move the selected variable up the list of keys.
- Press v to move the selected variable down the list of keys.
- Press Remove to remove the selected variable from the list of key variables.
I/O Columns
Input Output columns are used when data is dumped to or read from a text file. These are not required and do not effect the way the data is stored in the database. The I/O columns screen
helps you modify the format of dumped data file.
Select items from the data list and press Auto Number to assign non-overlapping column numbers to the selected items.
De-Number removes column numbers from the selected items.
Move Up and Move Down change the order in which the variables are defined.
Remove and Insert can be used to cut and paste items from one place in the list to another.
Sort changes the order of definition to match the input column order.
Change the I/O position of a single item by selecting it, changing the details at the bottom and pressing the Change button.
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 and exit.
Press Apply to apply the changes and not exit.
Press Save As to save the changed definition to a file. This saved file can be restored
and the record definition continued.
Record Schema Variables
This is the main screen for variable detail definition.
The name of the current Variable is displayed.
Label
Optionally enter a descriptive Label for the variable. This label appears in reports and tabulations.
You can also include a long variable description in the Document box.
Enter the R / W Security level to access this variable data (e.g. 20,30).
Standard Variables
Standard variables are defined in a standard schema. Define a record variable as having the same meta data as a standard variable by checking the Standard Variable box and selecting one of the previously defined standard variables. When a variable is a standard variable, you can give it its own label or security level, overwriting the standard definition.
Type
New variables default to four byte integers. Change the type as required. Choose:
- Integer and enter the internal length in bytes (1, 2 or 4).
- Real and enter the default number of decimal places.
- String and enter the maximum string length.
- Date and enter the date format.
- Time and enter the time format.
Enter a Scale Factor if this variable is a scaled integer.
Numeric variables can have a Statistical Type.
- Choose Auto to let the software select the appropriate statistical type. Variables with
valid values or value labels are generally control variables.
- Choose Control if this variable is a category (e.g.
Gender, Type, Department).
- Choose Observation if this variable contains a continuous measurement (e.g.
Salary, Age, Duration).
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.
- Type the Line number for multiple line / record input/output.
- Type the start (and end) Columns for this variable.
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. You can also use the Find... button to search for a variable.
Record Schema Values & Labels
Controls a variable's valid values and value labels lists.
Valid Values
lists the values of a variable that 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.
- Press Del to remove the selected valid value from the list.
- Type in a new Value and press Add to add a value to the list.
Value Labels
lists the labels corresponding to particular values of a variable.
Missing values can be included in the value label list.
- Press Del to remove the selected value label from the list.
- Type in a new Value and its Label then press Add to add a value label to the 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/XS name and this name must be unique to this database.
Check the Unique box to create an index that 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 Table and 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 SIR/XS attempts to query the data source.
Save Data In
Choose the database record type where you want to place the new data.
- Select Create New Record Type or Use Existing Record Type.
- Select a Record Number from the list of available numbers.
- Enter a Record Name if this is a new record type.
- Case ID If this is a case database, choose where the case id on the imported data is coming from. It can be either the first sort variable selected below or a constant entered in the box beside.
- Variables lists the columns to be imported. Select any sort variables from this list and press:
Sort > to append to the list of
Sort Variables. If this is an existing record type then choose the same number of sort variables as defined in this record's schema.
- Press A/D to reverse the sort order of a variable (Ascending or Descending). This only applies to new record types.
- Press ^ v change the order of the sort variables.
- Press Remove to remove a sort variable from the list of sort variables.
Press Next > to see a list of source and target variables. You can change the target variable names and types. If this is an existing record type, select the target names from the list of available names. If it is a new record then specify any name or type of target variable.
Press Next > and you are prompted to save a data update program. This program can be run at any time to read the data source into the defined record type without needing to go through these steps again.
If this is a new record type it is created. There is a possibility that the creation of the record type may require a database restructure. If this is the case, unload and reload the database and then run the data update program that you saved above.
Write Schema
Produces output based on the database schema.
Choose Commands to produce a copy of the schema definition.
Choose PQLForm to produce a default data input PQLForm definition. This can be used to input data into the database.
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.
- Check Passwords to include the listing of passwords in the output.
- Check CIR to include the definition of the common information record in the output.
- Check Group by Variable to include all the meta data for each variable in the same place. The default is to group by the type of meta data.
- Check Expand TO lists to explicitly list all variables in meta data definition commands. The default is to group variables with the same definition into TO lists. For example
MISSING VALUES NAME to CURRPOS (BLANK)/.
- Check Booleans to include any accept and reject record clauses in a form.
- Check Computes to include any compute clauses in a form.
- Check Short to suppress the printing of long value labels.
- Check Structured to include information on the case id, record key fields and documentary text.
- Choose Regular to list most of the variable information; Detailed to include value labels
for each variable; Labels to include variable names and labels.
Press Records to define a subset of record data for the output.
Press Variables to define the variables 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
SIR 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.
Control Tabfiles
Shortcut: CTRL+T
Lists connected tabfiles and lets you connect, disconnect, view details of, and set the default tabfile.
Press Recent > to display a pick list of recently connected tabfiles.
Press Connect... to browse the file system for tabfile files.
Press New... to create a new tabfile.
Press Delete to delete the tabfile.
Press Details to show tabfile information.
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 Close 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.
.
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/XS name and this name must be unique to this tabfile.
Check the Unique box to create an index that 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