380 likes | 537 Views
SIR/XS. Next Release of SIR. Major New Features 32 character names New journaling and recovery New XML Procedure New GUI Debugger New PQL Server Multiple Data Files New schema features. Other Improvements New Syntax – slash separator not needed New gui controls
E N D
SIR/XS Next Release of SIR New York Conference 2005
Major New Features 32 character names New journaling and recovery New XML Procedure New GUI Debugger New PQL Server Multiple Data Files New schema features Other Improvements New Syntax – slash separator not needed New gui controls Regular expression functions Encryption SIR/XS
Alpha Release • Welcome to try • Expect to work • No SQL, Master, old Forms • No version control • Help/documentation still 2002 • Email tony@sir.com.au • For instructions on new features • Comments • Report Bugs
Database Schema Database Names Record Names Variable Names Index Names Passwords Tabfiles & Tables Families Members VisualPQL Variables Sub-Routines Sub-Procedures Labels Buffer Names Filenames SIR/XS32 character names
Standard Names • 1 – 32 characters • Start with alpha • Capitalized • Contain letters, numbers, four special characters $ # @ _
Non-Standard Names • Enclosed in curly braces { } • From 1 to 30 characters (plus braces) • No translation • Any characters • Stored without braces so sort normally
Other Syntax • Deprecate use of slash • Needed in schema commands • Optional everywhere else • Standard variable lists in () • New syntax for TABULATE • TABULATE [[Wafer,]Stub,]Header / OPTIONS • TABULATE HEADER = (EXP) STUB = (EXP) WAFER = (EXP) OPTIONS
Standard summary variable list • Variable names or three keywords • ALL All (with regard to INCLUDE/EXCLUDE) • AS Use alternate name • S(1) AS SALARY or S(1) 'Salary‘ • TO Creates list of selected variables A to B • end of the list when: • List starts and stops with brackets () • End of input e.g. next command (not next clause on same command) • Special character - slash / is valid, other may be • Name that is not a variable – if also not valid keyword gives ‘Error 4 Keyword is invalid'
New Schema • STANDARD SCHEMA • Variable definitions • RECORD SCHEMA • STANDARD VARIABLE varname • RECORD num,name ‘Label’ • VAR DOC command • WRITE SCHEMA • Writes TO lists • Writes in Variable Order
Multiple Data Files • Split the .sr3 data file • No overhead for existing single file databases • Split based on serial key ranges • Case structure – case values • Caseless – record type/key value • DATA FILES ‘filename’ • FROM () filename • FROM () filename • Before any data added • Requires restructure
Existing Data Structure Top Level Index Other Index Levels Data Level
New Data Structure FILE INDEX Top Level Index Other Index Levels Data Level
ENCRYPT • Encrypts data • 128 bit encryption • BLOWFISH algorithm • ENCRYPT/DECRYPT PQL Functions
New PQL Debugger • GUI Interface • Step through source • Set breakpoints at lines • See values in variables • Set values in variables • Set watchpoints (break when value changes) • Step into/over subroutines
Routine to debug • PROGRAM/RETRIEVAL/SUBROUTINE • DEBUG {= name} • Stores as a subroutine • If name not specified • Real subroutine uses subroutine name • Other SYSTEM.DEBUG • Generates debug source code • Can be useful even if not debugging • Specify NOEXECUTE if just want to debug
Run Debugger • Choose which module to debug • Module starts • Lists source • Lists variables • Look at other stuff • Members/Files/Buffers
Deprecated Commands accept character bell box cursor All template commands display text erase screen field input fill keypad on line attribute line character mapkey mouse refresh screen sense mouse horizontal menu vertical menu screen graphics No Execution Window
Improved Recovery • Journaling Rewritten • Itemize rewritten • Roll back • Roll forward • Auto recover • Transaction processing • Incremental Unload
File Header Database Name Version of Software Update Header Data/Schema Update Level Started Date/Time Started Date/Time Finished (for data updates) User Name Update Record Before update Before delete After insert After update Existing record previous update level User (in multi-user mode) Journal
Journal Utilities • Journal Recover • Rolls forward from given place • Journal Rollback • Rolls back from given place • Auto Recover on connect • Itemize • Lists contents (headers) • Upload • Creates machine independent text file
Journal Processing • New PQL commands to process journals • Access to header data • Access to record values • Audit Trail • Other recovery strategies
Journal Commands • PROCESS JOURNAL • JOURNAL RECORD IS • PQL access to record variables • END JOURNAL RECORD IS • END PROCESS JOURNAL
PROCESS JOURNAL • [FROM = updlevel | START = date [,time] ] • [THRU = updlevel | END = date [,time] ] • [REVERSE] • [FILENAME= fname ] (sr5 is the default) • Return Data • [DATE = varname] [ENDDATE = varname] • [TIME = varname] [ENDTIME = varname] • [LEVEL = varname] • [RECORD = varname] • [TYPE = varname] • [USER = varname]
Example program integer*4 jtype value labels jtype (1) 'Record written‘ (2) 'Before rewrite‘ (3) 'After rewrite‘ (4) 'Deleted record‘ (-1) ‘Data header‘ (-4) ‘Schema header‘ (-5) ‘User header' process journal TYPE= JTYPE RECORD = jrec level = jlevel FROM = 13 ifthen (jtype gt 0) . write [vallab(JTYPE)] 'Record Type ' jrec .else . write [vallab(JTYPE)] 'Update level ' jlevel fi journal record employee write id name salary end journal record end process journal end program
Transaction Processing* • Start Transaction • End Transaction (Commit) • Abort Transaction • Journal Based • Rollback on Abort
Incremental Unload* • Creates Journal of Updates • Add to end of Unload • Automatic processing of levels • Automatic restore by reload • Optional separate file
XML • XML File structure • Text File • Hierarchical • Tags enclose • Resembles HTML with own tags • XML Names • Begin with character (or _ :) • Case sensitive • Allow letters, numbers - _ : . (No spaces)
Example XML <company> <person> <name>John D Jones</name> <salary>2150</salary> <birthday>1956</ birthday > </person> <person> <name>James A Arblaster</name> <salary>1500</salary> < birthday >1961</ birthday > </person> </company>
XML SAVE FILE Procedure • Standard Clauses • FILENAME = filename BOOLEAN = (logical expression) MISSCHAR = character SAMPLE = fractionSORT = variable,.... • Special Clauses • ROOT = 'string'BREAK = variable ( TAG = 'string', ATTRIBUTES = (varname (format) ),...) ELEMENTS = (varname (format) ),...))DTD [= filename]SCHEMA [= filename]
Example XML <company> - ROOT = ‘people’ <person> - BREAK = ( id tag = ‘person’ - ELEMENTS =(name,salary,birthday)) <name>John D Jones</name> <salary>2150</salary> <birthday>1956</birthday> </person> <person> <name>James A Arblaster</name> <salary>1500</salary> < birthday >1961</ birthday > </person> </company>
SIR Server • Similar in concept to SQLServer • Started on network • Waits for users to logon • Process requests • Returns results • Machine Independent
Concept • Send commands (text) to server • Tell server to execute • Carry on or wait • Get status and count of output lines • All output to standard output can go back to client
Client/Server Functions SERLOG(Client,Server_name,Password) SERSEND(Client_Id,string) SERSENDB(Client_Id,buffername) SEREXEC(client_id,wait_factor) SERTEST(client_id,wait_factor) SERLINES(client_id) SERGET(client_id,skiplines) SERADMIN
Client Sample Program • Logon • Send Request (check error codes) • Get output line at a time • Logoff
GUI Improvements • New Messages • Right Mouse click • Mouse over • VSCROLL • SPIN & SLIDER Controls • TREE Control
Other Features • Suggestions encouraged and welcomed • Various improvements • Regular expression functions • REGEXP – Searches • REGREP - Replaces • STDOUT as filename • Cross record functions work with string values CNT CNTR MAX MAXR MIN MINR • PWRITE/ PREAD • outputs last amended date and time • option to overwrite based on date/time • Compare two PWRITE to spot differences • Facility to rename family
Where Next • Finish Features • Integrate with menus • Master, SQL and old Forms • Test • Documentation and Help • Beta Release in 3 months
SIR/XS New York Conference 2005