Caché ObjectScript and MUMPS
Table of Contents
Disadvantages and Criticisms of Caché. 2
Quote by Arthur B. Smith on Databases. 2
Variable Manipulation and Interrogation. 2
Exercises on Set, Write, If, Plus and Kill commands. 8
Answers to exercises on Set, Write, If, Plus and Kill commands. 8
Concatenation - the underscore character. 8
Chapter 2 Basic Concepts II 15
Formats for Calling Routines. 26
Globals, Local Arrays and Variables. 27
Chapter 3 System-Supplied Functions I 31
System-Supplied Functions - Strings. 31
Chapter 4 System-Supplied Functions II 47
System-Supplied Functions - Data. 47
System-Supplied Functions - Number formatting. 52
System-Supplied Functions - Character Representation. 56
System-Supplied Functions - Decision Making. 57
System-Supplied Functions - Miscellaneous. 58
$ListBuild or $LB – build a list. 62
$ListData or $LD (similar to $Data) 64
$ListGet or $LG (similar to $Get) 65
$ListFind or $LF (similar to $Find) 65
$ListLength or $LL (similar to $Length with two parameters) 66
$ListNext or $LN - sequentially returns elements in a list. 66
$ListSame or $LS compares two lists. 67
$ListToString or $LTS creates a string from a list. 67
$ListFromString or $LFS creates a list from a string. 68
$ListValid or $LV checks for a valid list. 68
Exercises on List Processing Exercises. 69
$Piece System-Supplied Function. 73
$Data – (similar to $ListData) 75
$Get – (similar to $ListGet) 75
Exercises on Delimited List Processing. 76
Compound $Piece and $ListBuild. 78
List Processing versus Array Processing. 79
Chapter 6 Global Processing I 81
Data Global and Indexed Global. 104
Chapter 7 Global Processing II 105
Naked Indicators or Naked References. 108
Chapter 8 Commands Revisited. 121
If, ElseIf and Else commands. 125
While and Do While command. 128
Secret Escape Hatch in Structured Code. 130
New command used without variables. 131
New command used with variables. 137
New command used with variables in parentheses. 140
New command used improperly. 141
Examples of the New command. 142
Chapter 10 Pattern Matching. 145
Validate an American Social Security Number with Pattern Matching. 145
Validating Alpha Characters. 147
Validating Uppercase Characters. 147
Validating a Capitalized Word. 148
Validating Numeric Digits. 148
Validating a Numeric with Two Decimal Positions. 149
Validating Punctuation Characters. 149
Search a string for a substring. 149
Validating Control Characters. 150
Pattern Matching to Validate Data of Specific Lengths. 150
More complex Pattern Matching. 151
Exercises on Pattern Matching. 154
Answers to Exercises on Pattern Matching. 154
Chapter 11 Comparison Operators. 157
Table of Comparison Operators. 157
How COS Interprets True and False. 158
Exercises on True, False, Not and $Data. 162
Answers to Exercises on True, False, Not and $Data. 163
Binary Greater Than and Binary Less Than. 164
Exercises on Binary Less Than and Greater Than. 166
Answers to Exercises on Binary Less Than and Greater Than. 167
Exercises on Binary And and Binary Or. 172
Answers to Exercises on Binary And and Binary Or. 173
The Binary Follows Operator and Binary Sort After Operator. 176
Chapter 12 File Processing. 179
Read and writ an external file. 179
Cycle through several Files. 184
Search multiple files for a specific string. 185
Miscellaneous File Functions. 186
Chapter 13 Error Processing. 189
Why take all this trouble with Errors?. 189
Call Stack or Frame Stack. 201
Chapter 14 Testing and Debugging. 203
Objective of Testing - Quality. 203
Types of Testing: Static and Dynamic. 204
Debugging (Dynamic Testing) 204
Elements of a COS Procedure. 212
Template of a COS Procedure. 213
Public and Private Procedures. 214
Exercise on a COS Procedure. 227
Chapter 16 Structured Code. 229
If command with Structured Code. 229
For Loop commands with Structured Code. 229
Setting up the TM (Transportation Machines) Global. 230
Traversing a Global Array with the Do While command and Structured Code. 231
Traversing a Global Array with the While command and Structured Code. 231
If and Else commands with Structured Code. 232
Nested If and Else commands with Structured Code. 233
If, ElseIf and Else commands with Structured Code. 234
If, (multiple) ElseIf and Else commands with Structured Code. 234
Comparison between Inline Do command and Structured Code. 235
Chapter 17 Writing Robust Code. 239
Chapter 18 Miscellaneous Topics. 249
How can I learn to read Caché ObjectScript code?. 249
Function, SubRoutine and $Quit. 250
When should I use Post-Conditionals?. 251
When should I use dynamic code?. 252
Job Command – start another process. 255
Chapter 19 Miscellaneous Examples. 257
Chapter 20 Date and Time System Supplied Functions. 269
Date and Time Functions and Variables. 269
Examples using Date and Time. 290
Chapter 21 Object Technology Introduction. 293
Direct Global Manipulation. 299
Chapter 22 Object Class & Properties. 301
Defining a Class of Actors. 301
References to Persistent Objects. 308
References to Embedded Objects. 313
Chapter 23 Embedded and Dynamic SQL. 317
Chapter 24 Object Property Datatypes. 331
Chapter 25 Class & Object Properties - Collection List of Data Types. 339
Introduction to Collections. 339
Collection Lists and Collection Arrays. 340
Table of Collection Methods. 341
Collection List of Data Types. 343
Chapter 26 Class & Object Properties - Collection Array of Data Types. 357
Introduction to Collections. 357
Collection Lists and Collection Arrays. 358
Collection Array of Data Types. 358
Chapter 27 Class & Object Properties - Collection List of References to Persistent Objects. 371
Introduction to Collections. 371
Collection List of References to Persistent Objects. 372
Chapter 28 Class & Object Properties - Collection Array of References to Persistent Objects. 387
Introduction to Collections. 387
Collection Array of References to Persistent Objects. 388
Chapter 29 Class & Object Properties - Collection List of References to Embedded Objects. 401
Introduction to Collections. 401
Collection List of References to Embedded Objects. 402
Chapter 30 Class & Object Properties - Collection Array of References to Embedded Objects. 417
Introduction to Collections. 417
Collection Array of References to Embedded Objects. 418
Chapter 31 Object Relationships. 431
One-To-Many Object Relationships. 431
Parent-To-Child Relationship. 439
Class Definition for MyPackage.Cars. 448
Object Property Definitions for MyPackage.Cars. 448
Chapter 33 SQL Queries and Class Queries. 461
Chapter 34 File Processing with Objects. 469
Read and write an external files. 469
Cycle through several Files. 473
Search multiple files for a specific string. 474
Search multiple files in multiple directories for a specific string. 475
Miscellaneous File Functions. 477
Chapter 35 Caché ObjectScript – Object Commands Reference Table. 481
System/Product/Version Calls. 484
General Miscellaneous Calls. 484
Chapter 36 Caché ObjectScript - Good Programming Concepts. 485
Attractive and Easily Readable. 485
Thoroughly and Concisely Documented. 486
--
http://groups.google.com/group/Hardhats
To unsubscribe, send email to Hardhats+u...@googlegroups.com