Upload
lionel-barker
View
217
Download
0
Embed Size (px)
Citation preview
ApproachApproach
One single projectOne single project Range of tasksRange of tasks Your choice to ‘mix and match’Your choice to ‘mix and match’ Plenty of tasks to keep everyone Plenty of tasks to keep everyone
busybusy No need to try to do allNo need to try to do all
ProjectProject Define a DatabaseDefine a Database Create Data Input FormsCreate Data Input Forms Add some data from external sourceAdd some data from external source Develop basic retrievalsDevelop basic retrievals Debug Program using debuggerDebug Program using debugger Display selected data using GUIDisplay selected data using GUI Create XML outputCreate XML output Produce html table with new Tabulate Produce html table with new Tabulate
syntaxsyntax Use Journal Processing to produce AuditUse Journal Processing to produce Audit
WorkgroupsWorkgroups
Work on own if you wantWork on own if you want Work in pairs or threesWork in pairs or threes If not confident, join with very If not confident, join with very
experiencedexperienced Start with group discussion of project Start with group discussion of project
and any questionsand any questions Start with schema design and data entry Start with schema design and data entry
formsforms Further details on other requirements as Further details on other requirements as
we progresswe progress
ObjectivesObjectives
Practical Exposure to features in Practical Exposure to features in SIR/XSSIR/XS
Tasks that promote understandingTasks that promote understanding Range of tasks to allow for current Range of tasks to allow for current
knowledge of SIR/XSknowledge of SIR/XS
OptionsOptions
Complexity of Database designComplexity of Database design Complexity of data input processComplexity of data input process Customising of PQLFormsCustomising of PQLForms Effort in populating Effort in populating Complexity of reportsComplexity of reports
ProjectProject
Genealogy DatabaseGenealogy Database PeoplePeople Ancestors / DescendantsAncestors / Descendants Family TreeFamily Tree
Review of What’s NewReview of What’s New Extended syntax allowing names up to 32 Extended syntax allowing names up to 32
characters characters Non-standard names Non-standard names Enhanced standardised syntax Enhanced standardised syntax STANDARD SCHEMA and STANDARD VARS STANDARD SCHEMA and STANDARD VARS New Common Vars definition New Common Vars definition New variable documentation New variable documentation New write schema options New write schema options Upgraded record schema modification Upgraded record schema modification ADD VARS, DELETE VARS, MODIFY VARS, ADD VARS, DELETE VARS, MODIFY VARS,
RENAME VARS RENAME VARS
What’s NewWhat’s New
Multiple Data Files Multiple Data Files New Batch Data Utility features New Batch Data Utility features
including CSV Input/Output including CSV Input/Output New Journaling and Recovery New Journaling and Recovery New XML Procedure New XML Procedure New GUI Debugger New GUI Debugger New PQL Server New PQL Server Regular Expressions Regular Expressions SEEK function to control file position SEEK function to control file position
What’s NewWhat’s New Timestamp functions Timestamp functions Extended syntax on PROCESS CASE Extended syntax on PROCESS CASE CAT VARS in VisualPQL CAT VARS in VisualPQL PQLForms update PQLForms update Encryption Encryption Enhanced date and time format specification Enhanced date and time format specification Enhanced picture specification on WRITE and Enhanced picture specification on WRITE and
PFORMAT PFORMAT HTML on WINDOW OUTPUTHTML on WINDOW OUTPUT New GUI Controls New GUI Controls VARMAP shows AUTOSET variablesVARMAP shows AUTOSET variables Default String Length 32Default String Length 32
SIR/XS New NamesSIR/XS New Names
Standard NamesStandard Names– from 1-32 charactersfrom 1-32 characters– do not start with a numberdo not start with a number– can contain letters, numbers and the four can contain letters, numbers and the four
characters $, #, @ and _characters $, #, @ and _– e.g. NAME and EMPLOYEE_NAME are valid e.g. NAME and EMPLOYEE_NAME are valid
standard namesstandard names– a name in lower or mixed case, e.g. a name in lower or mixed case, e.g.
Employee_Name, is translated to upper caseEmployee_Name, is translated to upper case
SIR/XS New Names SIR/XS New Names
Non-Standard NamesNon-Standard Names– To specify a non-standard name, enclose To specify a non-standard name, enclose
from 1 to 30 characters in curly braces {}from 1 to 30 characters in curly braces {}– Name can contain any characters except Name can contain any characters except
curly braces and no translation is done on itcurly braces and no translation is done on it– Non-standard names are stored without the Non-standard names are stored without the
braces and appear in sorted lists at the braces and appear in sorted lists at the appropriate sort sequenceappropriate sort sequence
– E.g. {$100 dollars} and {Employee_Name} E.g. {$100 dollars} and {Employee_Name} are valid references to non-standard namesare valid references to non-standard names
SIR/XS – New NamesSIR/XS – New Names
Schema ScreensSchema Screens– All uppercase / special characters/ All uppercase / special characters/
numbers - Standardnumbers - Standard– All lowercase / allowed characters/ All lowercase / allowed characters/
numbers - Standard (translated to numbers - Standard (translated to uppercase)uppercase)
– Mixed case – Non-standardMixed case – Non-standard– Breaks rule – Non-standard (Starts Breaks rule – Non-standard (Starts
with number/contains not allowed with number/contains not allowed character)character)
Names v ExpressionsNames v Expressions Some commands require namesSome commands require names
– PROCESS REC record_namePROCESS REC record_name Some commands require expressionsSome commands require expressions
– CREATE BUFFER buffer_name_expCREATE BUFFER buffer_name_exp Existing inconsistenciesExisting inconsistencies
– Buffers retain non-standard nameBuffers retain non-standard name– Functions uppercase names from expressionsFunctions uppercase names from expressions
For compatibility do not need curly brackets For compatibility do not need curly brackets in buffer commandsin buffer commands– Returned non-standard names have brackets Returned non-standard names have brackets
(except (BUFNAME function)(except (BUFNAME function)
Using NamesUsing Names– If you are using non-standard names as strings in If you are using non-standard names as strings in
VisualPQL functions, wrap the name in curly VisualPQL functions, wrap the name in curly brackets within the quotesbrackets within the quoteseg VARLABSC(1,'{Employee Name}'),eg VARLABSC(1,'{Employee Name}'),
– There may also be occasions when you want to There may also be occasions when you want to create commands or other output where you create commands or other output where you need the bracketsneed the brackets
– PQL Functions that return names, wrap curly PQL Functions that return names, wrap curly braces automatically if non-standard (except braces automatically if non-standard (except BUFNAME)BUFNAME)
– New STDNAME function checks a name and wraps New STDNAME function checks a name and wraps curly brackets around if it is a non-standard curly brackets around if it is a non-standard name. This function does not uppercase inputname. This function does not uppercase input
GET VARSGET VARS
GET VARS allows generation of GET VARS allows generation of new local variable names using a new local variable names using a prefix or suffix prefix or suffix
GET VARS ALL PREFIX 'EMPLOYEE_‘GET VARS ALL PREFIX 'EMPLOYEE_‘ GET VARS ALL SUFFIX ‘_EMPLOYEE' GET VARS ALL SUFFIX ‘_EMPLOYEE'
Schema in XS - CIRSchema in XS - CIR
RECORD SCHEMA 0 CIRRECORD SCHEMA 0 CIRDATA LIST ID * (I2)DATA LIST ID * (I2)
MISSING VALUES ID (BLANK)MISSING VALUES ID (BLANK)
VAR LABEL ID 'Identification Number'VAR LABEL ID 'Identification Number'
END SCHEMAEND SCHEMA Put common vars in data list in individual record Put common vars in data list in individual record
typetype Do not repeat detail definitionDo not repeat detail definition Batch Data Input does not process CIR directly - Batch Data Input does not process CIR directly -
data expected to be extracted from a record typedata expected to be extracted from a record type
Schema in XS - STANDARD Schema in XS - STANDARD SCHEMASCHEMA
STANDARD SCHEMA commandSTANDARD SCHEMA command– similar to a RECORD SCHEMA similar to a RECORD SCHEMA – signifies the start of a set of variable signifies the start of a set of variable
definitionsdefinitions– set is ended with END SCHEMA commandset is ended with END SCHEMA command– Define Variables using DATA LIST commandDefine Variables using DATA LIST command– Use any of the normal variable definition Use any of the normal variable definition
commands such as MISSING VALUES, VALUE commands such as MISSING VALUES, VALUE LABELS or VAR RANGESLABELS or VAR RANGES
STANDARD SCHEMASTANDARD SCHEMASTANDARD SCHEMASTANDARD SCHEMADATA LISTDATA LIST POSITION * (I1)POSITION * (I1) SALARY * (I2)SALARY * (I2) SALDATE * (DATE'YYYY/MM/DD')SALDATE * (DATE'YYYY/MM/DD')VAR RANGES POSITION (1 18)VAR RANGES POSITION (1 18) SALARY (600 9000)SALARY (600 9000)VAR SECURITY SALARY (30,30)VAR SECURITY SALARY (30,30)MISSING VALUES POSITIONMISSING VALUES POSITION TO SALDATE (BLANK)TO SALDATE (BLANK)VALUE LABELS POSITION (1)'Clerk'VALUE LABELS POSITION (1)'Clerk' (2)'Secretary'(2)'Secretary' ........................VAR LABEL POSITION 'Position'VAR LABEL POSITION 'Position' SALARY 'Salary'SALARY 'Salary' SALDATE 'Date Salary Set'SALDATE 'Date Salary Set'END SCHEMAEND SCHEMA
STANDARD VARSSTANDARD VARS
STANDARD VARS commandSTANDARD VARS command– A variable defined in the standard A variable defined in the standard
schema can be referenced in record schema can be referenced in record definitionsdefinitions
– benefit of this is that coding does not benefit of this is that coding does not have to be repeated for the variable have to be repeated for the variable when it occurs in multiple recordswhen it occurs in multiple records
– optionally allows a variable to be optionally allows a variable to be renamed when used in a recordrenamed when used in a record
STANDARD VARSSTANDARD VARS
RECORD SCHEMA 1 EMPLOYEERECORD SCHEMA 1 EMPLOYEE
DATA LISTDATA LIST
ID 1 - 4 (I2)ID 1 - 4 (I2)
NAME 6 - 30 (A25)NAME 6 - 30 (A25)
………………… …………………
CURRPOS 55 - 56 (I1)CURRPOS 55 - 56 (I1)
STANDARD VARS STANDARD VARS
CURRPOS AS POSITIONCURRPOS AS POSITION
Schema in XS - ModifyingSchema in XS - Modifying RECORD SCHEMARECORD SCHEMA
– No DATA LIST modifies existing record definitionNo DATA LIST modifies existing record definition– All standard schema commands e.g.All standard schema commands e.g.
MISSING VALUESMISSING VALUES VALUE LABELSVALUE LABELS
– CLEAR BOOLEANS/COMPUTES/RECODES/VALUE CLEAR BOOLEANS/COMPUTES/RECODES/VALUE LABELSLABELS
– ADD VARADD VAR– DELETE VARDELETE VAR– MODIFY VAR (for input columns)MODIFY VAR (for input columns)– Use DATA LIST for complete redefinition of Use DATA LIST for complete redefinition of
recordrecord
LabelsLabels
Label lengths 78 charactersLabel lengths 78 characters Value LabelsValue Labels Variable labels Variable labels
Record LabelRecord Label
RECORD SCHEMA allows a RECORD SCHEMA allows a short label (up to 78 chs) for short label (up to 78 chs) for the record typethe record type
Enclose the label in quotes e.g.Enclose the label in quotes e.g.
RECORD SCHEMA 3 OCCUP RECORD SCHEMA 3 OCCUP 'Position Details''Position Details'
VAR DOCVAR DOC
Multiple lines of text about variableMultiple lines of text about variableRECORD SCHEMA 1 EMPLOYEERECORD SCHEMA 1 EMPLOYEEVAR DOC CURRPOS VAR DOC CURRPOS The current position is a The current position is a coded field using a copy of coded field using a copy of the standard var POSITION.It the standard var POSITION.It is the most recent permanent is the most recent permanent position of the employee.position of the employee.
WRITE SCHEMAWRITE SCHEMA Default:Default:
– Variables grouped by commandVariables grouped by command– Use ‘TO’ format for identical specificationUse ‘TO’ format for identical specification– Suppresses repeated definition of common Suppresses repeated definition of common
variablesvariables NOTO suppresses TO optionNOTO suppresses TO option VARSEQ groups commands by variableVARSEQ groups commands by variable COMMON repeats common definitionsCOMMON repeats common definitions EXPORT - Backward compatible with slashes EXPORT - Backward compatible with slashes
– No REC 0, STANDARD SCHEMA, DATA FILES, TONo REC 0, STANDARD SCHEMA, DATA FILES, TO
Date & Time FormatsDate & Time Formats
Existing format specificationsExisting format specifications– Input orientedInput oriented– Ignore separator – default on outputIgnore separator – default on output– DDIMMIYYYY HHIMMISSDDIMMIYYYY HHIMMISS– Output format on WRITE, DATEC, TIMECOutput format on WRITE, DATEC, TIMEC
Maintains separator charactersMaintains separator characters Allows days of weekAllows days of week 12 Hour time12 Hour time Wwww DD/Mmmm/YYYYWwww DD/Mmmm/YYYY HH:MM PPHH:MM PP
New Date & Time FormatsNew Date & Time Formats Schema FormatSchema Format PQL Variable DefinitionPQL Variable Definition Format as per output formatsFormat as per output formats Two special formats – no monthsTwo special formats – no months
– YYYY DDDYYYY DDD– YYYY WWYYYY WW
Input ProcessingInput Processing– No separators – must match exactlyNo separators – must match exactly– Separators – variable length componentsSeparators – variable length components– Month number or nameMonth number or name– ‘‘E’ as first character – must match ExactlyE’ as first character – must match Exactly
Example New FormatsExample New FormatsFormat Possible Inputs Displayed DateFormat Possible Inputs Displayed Date
------------------ ---------------- ---------------------------------- ---------------- ----------------
'mmddyyyy' 05312006 05312006'mmddyyyy' 05312006 05312006
'MMIDDIYY' 5/31/6 or 5 31 2006 05 31 06'MMIDDIYY' 5/31/6 or 5 31 2006 05 31 06
'MM/DD/YYYY' 5-31-6 or 5 31 06 05/31/2006'MM/DD/YYYY' 5-31-6 or 5 31 06 05/31/2006
'DD-MM-YY' 31/5/2006 or 31 May 6 31-05-06'DD-MM-YY' 31/5/2006 or 31 May 6 31-05-06
'YYYY' 2006 or 6 2006'YYYY' 2006 or 6 2006
'MMM DD, YY' As per other M/D/Y formats MAY 31, 06'MMM DD, YY' As per other M/D/Y formats MAY 31, 06
'WWW, DD MMM YYYY' 31/05/06 or xxx 31/5/2006 FRI, 31 MAY 2006'WWW, DD MMM YYYY' 31/05/06 or xxx 31/5/2006 FRI, 31 MAY 2006
'Mmm/DD/YYYY' As per other M/D/Y formats May/31/2006'Mmm/DD/YYYY' As per other M/D/Y formats May/31/2006
'Www, Mmm dddd' xxxx 05/31 Fri, May 31st'Www, Mmm dddd' xxxx 05/31 Fri, May 31st
'yyyy/ww 6/13 2006/13 (weeks)'yyyy/ww 6/13 2006/13 (weeks)
'ddd/yy' 85/2006 085/06 (days)'ddd/yy' 85/2006 085/06 (days)
‘‘Eddd/yy' 085/06 085/06 (days)Eddd/yy' 085/06 085/06 (days)
Database DesignDatabase Design
Person DataPerson Data– NamesNames
Surname, Given Name, Middle NameSurname, Given Name, Middle Name
– DatesDates– PlacesPlaces– EventsEvents
Birth, Death, Marriage, …..Birth, Death, Marriage, ….. Adopted, Buried, Census, Divorced, Emigrated, Adopted, Buried, Census, Divorced, Emigrated,
Engaged, Occupation, Residence,….Engaged, Occupation, Residence,….
Link to other peopleLink to other people Notes, PicturesNotes, Pictures
Things to allow forThings to allow for
– Uncertainty of informationUncertainty of information DatesDates PlacesPlaces
– Identifying a personIdentifying a person Multiple NamesMultiple Names
– Finding parents from personFinding parents from person– Finding children from personFinding children from person
Names in WorkshopNames in Workshop
Advise using long standard namesAdvise using long standard names Be aware when typing in Schema Be aware when typing in Schema
ScreensScreens All upper or lower – Standard All upper or lower – Standard
upperupper Mixed case – kept Non-StandardMixed case – kept Non-Standard
SuggestionsSuggestions
Use a numeric id as main keyUse a numeric id as main key– Easier to use to link recordsEasier to use to link records
Use secondary indexes for namesUse secondary indexes for names Use secondary indexes to find Use secondary indexes to find
related peoplerelated people Once design done identify Once design done identify
standard variable types and create standard variable types and create ‘template’ variables first‘template’ variables first
One ApproachOne Approach
Record Types & IndexesRecord Types & Indexes– BirthBirth
Indexes on Father, Mother, SurnameIndexes on Father, Mother, Surname
– DeathDeath– MarriageMarriage
Indexes on Husband, WifeIndexes on Husband, Wife
– TextText– FilesFiles
Data EntryData Entry
Generate default screensGenerate default screens CustomiseCustomise
– Do all your variable names/labels fitDo all your variable names/labels fit– Enough space for data fieldsEnough space for data fields– Automatically assign next id when Automatically assign next id when
adding new personadding new person– Automatically get Father/Mother namesAutomatically get Father/Mother names– List existing IdsList existing Ids
GRIDGRID
Utility SIR SPREADSHEETUtility SIR SPREADSHEET– MenuMenu– Displays Database or TabfileDisplays Database or Tabfile– Used to updateUsed to update
SPREADSHEET ProcedureSPREADSHEET Procedure GRID ControlGRID Control
– Use ArraysUse Arrays– Can sort and resize arraysCan sort and resize arrays
TaskTask
Generate Default ScreensGenerate Default Screens Use Screen Painter to customiseUse Screen Painter to customise Elaborate/simple – your choiceElaborate/simple – your choice
Batch Data InputBatch Data Input
Set of utilities that take data from file Set of utilities that take data from file and update databaseand update database
File Input on menuFile Input on menu– ADD REC/REPLACE/READ/UPDATE/EVICTADD REC/REPLACE/READ/UPDATE/EVICT
'Classic' BDI 'Classic' BDI – fixed format records fixed format records – correspond to input columns on schemacorrespond to input columns on schema– FILE DUMP produces compatible fileFILE DUMP produces compatible file– Useful maintenance toolUseful maintenance tool
Problem with * input in schemaProblem with * input in schema
Batch Data InputBatch Data Input
Auto I/O columnsAuto I/O columns– Assigns calculated columns for * varsAssigns calculated columns for * vars– Only need to assign columns if real fileOnly need to assign columns if real file
CSV optionCSV option– Order as per schemaOrder as per schema– FILE DUMP encloses in “”FILE DUMP encloses in “”
Record Type as first fieldRecord Type as first field
– Own CSV fileOwn CSV file Omit record type and specify to utilityOmit record type and specify to utility May have to SKIP 1 to skip headerMay have to SKIP 1 to skip header
CIR & BDICIR & BDI
SIR FILE DUMP and the batch data input SIR FILE DUMP and the batch data input utilities support a separate input for CIR utilities support a separate input for CIR
SIR FILE DUMP can write a record 0 in an SIR FILE DUMP can write a record 0 in an appropriate format and the batch data appropriate format and the batch data input utilities can process that record. input utilities can process that record.
Specify input format definitions for the Specify input format definitions for the CIR or utilities can use defaultsCIR or utilities can use defaults
Does not support the extended BDI Does not support the extended BDI definitions of ACCEPT REC,REJECT definitions of ACCEPT REC,REJECT REC,COMPUTE,IF or RECODE.REC,COMPUTE,IF or RECODE.
RetrievalsRetrievals
Generic RetrievalGeneric Retrieval– Get AncestorsGet Ancestors– Get DescendantsGet Descendants– Produce Family TreeProduce Family Tree
Use DebuggerUse Debugger
New PQL DebuggerNew PQL Debugger
GUI InterfaceGUI Interface Step through sourceStep through source
– Set breakpoints at linesSet breakpoints at lines See values in variablesSee values in variables
– Set values in variablesSet values in variables– Set watchpoints (break when value Set watchpoints (break when value
changes)changes) Step into/over subroutinesStep into/over subroutines
Routine to debugRoutine to debug
PROGRAM/RETRIEVAL/SUBROUTINEPROGRAM/RETRIEVAL/SUBROUTINE– DEBUG {= name}DEBUG {= name}– Stores as a subroutine Stores as a subroutine – If name not specified If name not specified
Real subroutine uses subroutine nameReal subroutine uses subroutine name Other SYSTEM.DEBUGOther SYSTEM.DEBUG
– Generates debug source codeGenerates debug source code Can be useful even if not debuggingCan be useful even if not debugging Specify NOEXECUTE if just want to debugSpecify NOEXECUTE if just want to debug
Run DebuggerRun Debugger
Choose which module to debugChoose which module to debug Module startsModule starts
– Lists sourceLists source– Lists variablesLists variables
Look at other stuffLook at other stuff– Members/Files/BuffersMembers/Files/Buffers
TaskTask
Develop generic program to get Develop generic program to get ancestors from single personancestors from single person
Develop generic program to get Develop generic program to get descendants from single persondescendants from single person
Use simple procedure as test e.g. Use simple procedure as test e.g. CSV SAVE FILECSV SAVE FILE
TREE ControlTREE Control
TREE id,row,height,col,width,read A tree control can display a hierarchical list of items
such as the structure of a database or the data within that database.
The items in the tree list can have child items and, if they do then they will also have a button that can show or hide that items child items
Set values with BRANCH functionX = BRANCH (id,parent,node,text)
No message when user showing/hiding Message when clicked on entry
– M_ARG1 or GETPOS (IDTREE) for node
XMLXML
XML File structureXML File structure– Text FileText File– HierarchicalHierarchical– Tags encloseTags enclose– Resembles HTML with own tagsResembles HTML with own tags
XML Names XML Names – Begin with character (or _ :)Begin with character (or _ :)– Case sensitiveCase sensitive– Allow letters, numbers - _ : . (No spaces) Allow letters, numbers - _ : . (No spaces)
Example XMLExample XML
<company><company> <person><person> <name>John D Jones</name><name>John D Jones</name> <salary>2150</salary><salary>2150</salary> <birthday>1956</ birthday ><birthday>1956</ birthday ></person></person> <person><person> <name>James A Arblaster</name><name>James A Arblaster</name> <salary>1500</salary><salary>1500</salary> < birthday >1961</ birthday >< birthday >1961</ birthday > </person></person></company></company>
XML SAVE FILE ProcedureXML SAVE FILE Procedure Standard ClausesStandard Clauses
– FILENAME = filename FILENAME = filename BOOLEAN = (logical expression) BOOLEAN = (logical expression) MISSCHAR = character MISSCHAR = character SAMPLE = fractionSAMPLE = fractionSORT = variable,....SORT = variable,....
Special ClausesSpecial Clauses– ROOT = 'string'ROOT = 'string'
BREAK = variable (BREAK = variable (TAG = 'string',TAG = 'string',ATTRIBUTES = (varname (format) ),...) ATTRIBUTES = (varname (format) ),...)
ELEMENTS = ELEMENTS = (varname (format) ),...))(varname (format) ),...))DTD [= filename]DTD [= filename]SCHEMA [= filename]SCHEMA [= filename]
Example XMLExample XML
<company> - <company> - ROOT = ‘people’ROOT = ‘people’ <person> - <person> - BREAK = ( id tag = ‘person’ BREAK = ( id tag = ‘person’ - -
ELEMENTS =(name,salary,birthday))ELEMENTS =(name,salary,birthday)) <name>John D Jones</name><name>John D Jones</name> <salary>2150</salary> <salary>2150</salary>
<birthday>1956</birthday> <birthday>1956</birthday> </person></person> <person><person> <name>James A Arblaster</name><name>James A Arblaster</name> <salary>1500</salary><salary>1500</salary> < birthday >1961</ birthday >< birthday >1961</ birthday > </person></person></company></company>
TaskTask
Simple list of people and children in XMLSimple list of people and children in XML– Hint - GET VARS PREFIX ‘xxx_’Hint - GET VARS PREFIX ‘xxx_’– GET VARS from a RECORD does not get the GET VARS from a RECORD does not get the
Case IdentifierCase Identifier
Full set of descendants for a personFull set of descendants for a person– Hint. XML needs the value identifying a break Hint. XML needs the value identifying a break
level as an XML valid name so it is the name of level as an XML valid name so it is the name of the variable NOT the value in the variablethe variable NOT the value in the variable
Standard summary variable listStandard summary variable list
Variable names or three keywordsVariable names or three keywords ALL All (with regard to INCLUDE/EXCLUDE)ALL All (with regard to INCLUDE/EXCLUDE) AS Use alternate name AS Use alternate name
– S(1) AS SALARY or S(1) 'Salary‘ S(1) AS SALARY or S(1) 'Salary‘ TO Creates list of selected variables A to BTO Creates list of selected variables A to B
– end of the list when:end of the list when: List starts and stops with brackets ()List starts and stops with brackets () End of input e.g. next command (not next clause End of input e.g. next command (not next clause
on same command)on same command) Special character - slash / is valid, other may beSpecial character - slash / is valid, other may be Name that is not a variable – if also not valid Name that is not a variable – if also not valid
keyword gives ‘Error 4 Keyword is invalid'keyword gives ‘Error 4 Keyword is invalid'
ProceduresProcedures
StandardStandard– BMDP, CONDESCRIPTIVE,BMDP, CONDESCRIPTIVE,
CSV (+format), DBASE(+old rename),CSV (+format), DBASE(+old rename),DIF (+header),FREQUENCIES,DIF (+header),FREQUENCIES,MINITAB,REPORT(+options),MINITAB,REPORT(+options),SAS,SAVE TABLE,SIR SAVE FILE,SAS,SAVE TABLE,SIR SAVE FILE,SPREAD SHEET,SPSS, SYSTAT,SPREAD SHEET,SPSS, SYSTAT,WRITE RECORDSWRITE RECORDS
Non-StandardNon-Standard– DESCRIPTIVE, GRAPH, PLOT, TABULATE,XMLDESCRIPTIVE, GRAPH, PLOT, TABULATE,XML
TabulateTabulate
TABULATE [[Wafer,]Stub]Header/ TABULATE [[Wafer,]Stub]Header/ OPTIONSOPTIONS
New syntax for TABULATENew syntax for TABULATE– TABULATE HEADER = (EXP)TABULATE HEADER = (EXP)
STUB = (EXP) STUB = (EXP) WAFER = (EXP) WAFER = (EXP) OPTIONS OPTIONS
TaskTask
Produce a tabulation grouping Produce a tabulation grouping population by gender and age at population by gender and age at deathdeath
JournalJournal File HeaderFile Header
– Database NameDatabase Name– Version of SoftwareVersion of Software
Update Header Update Header – Data/SchemaData/Schema– Update Level Update Level
Started Started – Date/Time StartedDate/Time Started– Date/Time Finished Date/Time Finished
(for data updates)(for data updates)– User NameUser Name
Update RecordUpdate Record– Before update Before update – Before delete Before delete – After insert After insert – After update After update – Existing record Existing record
previous update previous update levellevel
– User (in multi-user User (in multi-user mode)mode)
Journal ProcessingJournal Processing
New PQL commands to process New PQL commands to process journals or unload filesjournals or unload files– Access to header dataAccess to header data– Access to record valuesAccess to record values
Audit TrailAudit Trail Other recovery strategiesOther recovery strategies
Journal CommandsJournal Commands
PROCESS JOURNALPROCESS JOURNAL JOURNAL RECORD ISJOURNAL RECORD IS PQL access to record variablesPQL access to record variables END JOURNAL RECORD ISEND JOURNAL RECORD IS END PROCESS JOURNALEND PROCESS JOURNAL
PROCESS JOURNALPROCESS JOURNAL [FROM = updlevel | START = date [,time] ][FROM = updlevel | START = date [,time] ] [THRU = updlevel | END = date [,time] ][THRU = updlevel | END = date [,time] ] [REVERSE][REVERSE] [FILENAME= fname ] (sr5 is the default)[FILENAME= fname ] (sr5 is the default) Return DataReturn Data
– [DATE = varname] [ENDDATE = varname][DATE = varname] [ENDDATE = varname]– [TIME = varname] [ENDTIME = varname][TIME = varname] [ENDTIME = varname]– [LEVEL = varname][LEVEL = varname]– [RECORD = varname][RECORD = varname]– [TYPE = varname][TYPE = varname]– [USER = varname][USER = varname]
TaskTask
Produce Audit Trail of UpdatesProduce Audit Trail of Updates– Record TypeRecord Type– Amendment TypeAmendment Type– Person UpdatedPerson Updated– Date/TimeDate/Time
Turn Journaling OnTurn Journaling On– Should be off when creatingShould be off when creating
Make a couple of updatesMake a couple of updates