Using Caché ObjectScript
Contents
 
   
Server:docs1
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

 
Contents

Preface : 
 
 
Chapter 1: 
 
  • 1.1 Features
  • 1.2 Language Overview
  • 1.3 Invoking Commands and Functions
  • 1.3.1 Statements and Commands
  • 1.3.2 Functions
  • 1.3.3 Expressions
  • 1.3.4 Variables
  • 1.3.5 Operators
  • 1.4 Relationship with ISO Standard M
  • Chapter 2: 
     
  • 2.1 Case Sensitivity
  • 2.1.1 Identifiers
  • 2.1.2 Keyword Names
  • 2.1.3 Class Names
  • 2.1.4 Namespace Names
  • 2.2 Unicode
  • 2.2.1 Letters in Unicode
  • 2.3 Whitespace
  • 2.4 Comments
  • 2.4.1 Comments in INT Code for Routines and Methods
  • 2.4.2 Comments in MAC Code for Routines and Methods
  • 2.4.3 Comments in Class Definitions Outside of Method Code
  • 2.5 Literals
  • 2.5.1 String Literals
  • 2.5.2 Numeric Literals
  • 2.6 Identifiers
  • 2.6.1 Punctuation Characters within Identifiers
  • 2.7 Labels
  • 2.7.1 Using Labels
  • 2.7.2 Ending a Labelled Section of Code
  • 2.8 Namespaces
  • 2.8.1 Extended References
  • 2.9 Reserved Words
  • Chapter 3: 
     
  • 3.1 Strings
  • 3.1.1 Escaping Quotation Marks
  • 3.1.2 Concatenating Strings
  • 3.1.3 String Comparisons
  • 3.1.4 Long Strings
  • 3.1.5 Bit Strings
  • 3.2 Numbers
  • 3.2.1 Fundamentals of Numbers
  • 3.2.2 Canonical Form of Numbers
  • 3.2.3 Strings as Numbers
  • 3.2.4 Concatenating Numbers
  • 3.2.5 Fractional Numbers
  • 3.2.6 Scientific Notation
  • 3.2.7 Extremely Large Numbers
  • 3.3 Objects
  • 3.4 Persistent Multidimensional Arrays (Globals)
  • 3.5 Undefined Values
  • 3.6 Boolean Values
  • 3.7 Dates
  • Chapter 4: 
     
  • 4.1 Categories of Variables
  • 4.1.1 Local Variables
  • 4.1.2 Process-private Globals
  • 4.1.3 Globals
  • 4.1.4 Subscripted Variables
  • 4.1.5 Array Variables
  • 4.1.6 Special Variables
  • 4.1.7 Object Properties
  • 4.2 Variable Typing and Conversion
  • 4.2.1 Object Values
  • 4.3 Variable Declaration and Scope
  • 4.3.1 Using #Dim
  • Chapter 5: 
     
  • 5.1 Introduction to Operators and Expressions
  • 5.1.1 Table of Operator Symbols
  • 5.1.2 Operator Precedence
  • 5.1.3 Expressions
  • 5.1.4 Assignment
  • 5.2 String-to-Number Conversion
  • 5.2.1 Numeric Strings
  • 5.2.2 Non-numeric Strings
  • 5.3 Arithmetic Operators
  • 5.3.1 Unary Positive Operator (+)
  • 5.3.2 Unary Negative Operator (-)
  • 5.3.3 Addition Operator (+)
  • 5.3.4 Subtraction Operator (-)
  • 5.3.5 Multiplication Operator (*)
  • 5.3.6 Division Operator (/)
  • 5.3.7 Exponentiation Operator (**)
  • 5.3.8 Integer Divide Operator ( \ )
  • 5.3.9 Modulo Operator (#)
  • 5.4 Logical Comparison Operators
  • 5.4.1 Unary Not
  • 5.4.2 Precedence and Logical Operators
  • 5.4.3 Binary And
  • 5.4.4 Binary Or
  • 5.5 String Concatenate Operator
  • 5.5.1 Concatenate Encoded Strings
  • 5.6 Numeric Relational Operators
  • 5.6.1 Binary Less Than
  • 5.6.2 Binary Greater Than
  • 5.6.3 Greater Than or Equal To
  • 5.6.4 Less Than or Equal To
  • 5.7 String Relational Operators
  • 5.7.1 Binary Equals
  • 5.7.2 Binary Contains
  • 5.7.3 Binary Follows
  • 5.7.4 Binary Sorts After
  • 5.8 Pattern Matching
  • 5.8.1 Specifying How Many Times a Pattern Can Occur
  • 5.8.2 Specifying Multiple Patterns
  • 5.8.3 Specifying a Combination Pattern
  • 5.8.4 Specifying an Indefinite Pattern
  • 5.8.5 Specifying an Alternating Pattern (Logical OR)
  • 5.8.6 Using Incomplete Patterns
  • 5.8.7 Multiple Pattern Interpretations
  • 5.8.8 Not Match Operator
  • 5.8.9 Pattern Complexity
  • 5.9 Indirection
  • 5.9.1 Name Indirection
  • 5.9.2 Pattern Indirection
  • 5.9.3 Argument Indirection
  • 5.9.4 Subscript Indirection
  • 5.9.5 $TEXT Argument Indirection
  • Chapter 6: 
     
  • 6.1 Wildcard and Quantifiers
  • 6.2 Literals and Character Ranges
  • 6.3 Character Type Meta-Characters
  • 6.3.1 Single-letter Character Types
  • 6.3.2 Unicode Property Character Types
  • 6.3.3 POSIX Character Types
  • 6.4 Grouping Construct
  • 6.5 Anchor Meta-Characters
  • 6.5.1 String Beginning or End
  • 6.5.2 Word Boundary
  • 6.6 Logical Operators
  • 6.7 Character Representation Meta-Characters
  • 6.7.1 Hexadecimal, Octal, and Unicode Representation
  • 6.7.2 Control Character Representation
  • 6.7.3 Symbol Name Representation
  • 6.8 Modes
  • 6.8.1 Mode for a Regular Expression Sequence
  • 6.8.2 Mode for a Literal
  • 6.9 Comments
  • 6.9.1 Embedded Comments
  • 6.9.2 Line End Comment
  • 6.10 Error Messages
  • Chapter 7: 
     
  • 7.1 Command Keywords
  • 7.2 Command Arguments
  • 7.2.1 Multiple Arguments
  • 7.2.2 Arguments with Parameters and Postconditionals
  • 7.2.3 Argumentless Commands
  • 7.3 Command Postconditional Expressions
  • 7.3.1 Postconditional Syntax
  • 7.3.2 Evaluation of Postconditionals
  • 7.4 Multiple Commands on a Line
  • 7.5 Variable Assignment Commands
  • 7.5.1 SET
  • 7.5.2 KILL
  • 7.5.3 NEW
  • 7.6 Code Execution Context Commands
  • 7.7 Invoking Code
  • 7.7.1 DO
  • 7.7.2 JOB
  • 7.7.3 XECUTE
  • 7.7.4 QUIT and RETURN
  • 7.8 Flow Control Commands
  • 7.8.1 Conditional Execution
  • 7.8.2 FOR
  • 7.8.3 WHILE and DO WHILE
  • 7.9 I/O Commands
  • 7.9.1 Display (Write) Commands
  • 7.9.2 READ
  • 7.9.3 OPEN, USE, and CLOSE
  • Chapter 8: 
     
  • 8.1 Procedures, Routines, Subroutines, Functions, and Methods: What Are They?
  • 8.1.1 Routines
  • 8.1.2 Subroutines
  • 8.1.3 Functions
  • 8.2 Defining Procedures
  • 8.2.1 Invoking Procedures
  • 8.2.2 Procedure Syntax
  • 8.2.3 Procedure Variables
  • 8.2.4 Public and Private Procedures
  • 8.3 Parameter Passing
  • 8.3.1 Passing By Value
  • 8.3.2 Passing By Reference
  • 8.3.3 Variable Number of Parameters
  • 8.4 Procedure Code
  • 8.5 Indirection, XECUTE Commands, and JOB Commands within Procedures
  • 8.6 Error Traps within Procedures
  • 8.7 Legacy User-Defined Code
  • 8.7.1 Subroutines
  • 8.7.2 Functions
  • Chapter 9: 
     
  • 9.1 Using Macros
  • 9.1.1 Creating Custom Macros
  • 9.1.2 Saving Custom Macros
  • 9.1.3 Invoking Macros
  • 9.1.4 Referring to External Macros (Include Files)
  • 9.2 Preprocessor Directives Reference
  • 9.2.1 #;
  • 9.2.2 #Def1Arg
  • 9.2.3 #Define
  • 9.2.4 #Dim
  • 9.2.5 #Else
  • 9.2.6 #ElseIf
  • 9.2.7 #EndIf
  • 9.2.8 #Execute
  • 9.2.9 #If
  • 9.2.10 #IfDef
  • 9.2.11 #IfNDef
  • 9.2.12 #Import
  • 9.2.13 #Include
  • 9.2.14 #NoShow
  • 9.2.15 #Show
  • 9.2.16 #SQLCompile Mode
  • 9.2.17 #SQLCompile Path
  • 9.2.18 #SQLCompile Select
  • 9.2.19 #UnDef
  • 9.2.20 ##;
  • 9.2.21 ##Continue
  • 9.2.22 ##Expression
  • 9.2.23 ##Function
  • 9.2.24 ##Lit
  • 9.2.25 ##Quote
  • 9.2.26 ##SQL
  • 9.2.27 ##Unique
  • 9.3 Using System-supplied Macros
  • 9.3.1 Making System-supplied Macros Accessible
  • 9.3.2 System-supplied Macro Reference
  • Chapter 10: 
     
  • 10.1 Embedded HTML
  • 10.1.1 &html Marker Syntax
  • 10.2 Embedded JavaScript
  • 10.3 Embedded SQL
  • Chapter 11: 
     
  • 11.1 What Multidimensional Arrays Are
  • 11.1.1 Multidimensional Tree Structures
  • 11.1.2 Sparse Multidimensional Storage
  • 11.1.3 Settings for Multidimensional Arrays
  • 11.2 Manipulating Multidimensional Arrays
  • 11.3 For More Information
  • Chapter 12: 
     
  • 12.1 Basic String Operations and Functions
  • 12.1.1 Advanced Features of $EXTRACT
  • 12.2 Delimited Strings
  • 12.2.1 Advanced $PIECE Features
  • 12.3 List-Structure String Operations
  • 12.3.1 Sparse Lists and Sublists
  • 12.4 Lists and Delimited Strings Compared
  • 12.4.1 Advantages of Lists
  • 12.4.2 Advantages of Delimited Strings
  • Chapter 13: 
     
  • 13.1 Managing Current Locks System-wide
  • 13.1.1 Viewing Locks Using the Lock Table
  • 13.1.2 Removing Locks Using the Lock Table
  • 13.2 ^LOCKTAB Utility
  • 13.3 Waiting Lock Requests
  • 13.3.1 Queuing of Array Node Lock Requests
  • 13.3.2 ECP Local and Remote Lock Requests
  • 13.4 Avoiding Deadlock
  • Chapter 14: 
     
  • 14.1 Managing Transactions Within Applications
  • 14.1.1 Transaction Commands
  • 14.1.2 Using LOCK in Transactions
  • 14.1.3 Using $INCREMENT and $SEQUENCE in Transactions
  • 14.1.4 Transaction Rollback within an Application
  • 14.1.5 Examples of Transaction Processing Within Applications
  • 14.2 Automatic Transaction Rollback
  • 14.3 System-Wide Issues with Transaction Processing
  • 14.3.1 Backups and Journaling with Transaction Processing
  • 14.3.2 Asynchronous Error Notifications
  • Chapter 15: 
     
  • 15.1 The TRY-CATCH Mechanism
  • 15.1.1 Using THROW with TRY-CATCH
  • 15.1.2 Using $$$ThrowOnError and $$$ThrowStatus Macros
  • 15.1.3 Using the %Exception.SystemException and %Exception.AbstractException Classes
  • 15.1.4 Other Considerations with TRY-CATCH
  • 15.2 %Status Error Processing
  • 15.2.1 Creating %Status Errors
  • 15.2.2 %SYSTEM.Error
  • 15.3 Traditional Error Processing
  • 15.3.1 How Traditional Error Processing Works
  • 15.3.2 Handling Errors with $ZTRAP
  • 15.3.3 Handling Errors with $ETRAP
  • 15.3.4 Handling Errors in an Error Handler
  • 15.3.5 Forcing an Error
  • 15.3.6 Processing Errors in Programmer Mode
  • Chapter 16: 
     
  • 16.1 Debugging with the Caché Debugger
  • 16.1.1 Using Breakpoints and Watchpoints
  • 16.1.2 Establishing Breakpoints and Watchpoints
  • 16.1.3 Disabling Breakpoints and Watchpoints
  • 16.1.4 Delaying Execution of Breakpoints and Watchpoints
  • 16.1.5 Deleting Breakpoints and Watchpoints
  • 16.1.6 Single-step Breakpoint Actions
  • 16.1.7 Tracing Execution
  • 16.1.8 INTERRUPT Keypress and Break
  • 16.1.9 Displaying Information About the Current Debug Environment
  • 16.1.10 Using the Debug Device
  • 16.1.11 Caché Debugger Example
  • 16.1.12 Understanding Caché Debugger Errors
  • 16.2 Debugging With BREAK
  • 16.2.1 Using Argumentless BREAK to Suspend Routine Execution
  • 16.2.2 Using Argumented BREAK to Suspend Routine Execution
  • 16.2.3 Programmer Prompt Shows Program Stack Information
  • 16.2.4 Resuming Execution after a BREAK or an Error
  • 16.2.5 The NEW Command in Programmer Mode
  • 16.2.6 The QUIT Command in Programmer Mode
  • 16.2.7 Caché Error Messages
  • 16.3 Using %STACK to Display the Stack
  • 16.3.1 Running %STACK
  • 16.3.2 Displaying the Process Execution Stack
  • 16.3.3 Understanding the Stack Display
  • 16.4 Other Debugging Tools
  • 16.4.1 Displaying References to an Object with $SYSTEM.OBJ.ShowReferences
  • 16.4.2 Error Trap Utilities
  • Chapter 17: 
     
  • 17.1 Displaying and Switching Language Mode
  • 17.2 DSM-11 Language Compatibility
  • 17.2.1 Using Routine Interlock Devices
  • 17.2.2 Issuing I/O Commands for Routine Interlock Devices
  • 17.2.3 Working with DSM-11 Mode Routines
  • 17.2.4 Transferring Globals from DSM-11 Systems
  • 17.2.5 I/O Programming in DSM-11 Compatibility Mode
  • 17.2.6 VIEW Command and $VIEW Function
  • 17.2.7 ZAllocate and ZDeallocate
  • 17.2.8 Extended Functions for DSM-11 Mode
  • 17.2.9 Unsupported DSM-11 Functions
  • 17.2.10 Extended Special Variables for DSM-11 Mode
  • 17.2.11 Extended Commands for DSM-11 Compatibility Mode
  • 17.2.12 Error Handling for DSM-11 Compatibility Mode
  • 17.2.13 $TEXT Comment Lines
  • 17.3 DSM Language Compatibility
  • 17.3.1 Porting Routines from DSM to Caché
  • 17.3.2 Programming in DSM Language Mode
  • 17.3.3 Device Control Mnemonic Spaces and Device Control Mnemonics
  • 17.3.4 Other DSM Language Features Implemented in Compatibility Mode
  • 17.3.5 VIEW Command and $VIEW Function
  • 17.3.6 Database Conversion
  • 17.4 DSM-J Language Compatibility
  • 17.5 DTM Language Compatibility
  • 17.5.1 Programming in DTM Compatibility Mode
  • 17.5.2 Commands, Functions, and Special Variables
  • 17.5.3 Database Conversion
  • 17.6 MSM Language Compatibility
  • 17.6.1 Commands, Functions, and Special Variables
  • 17.6.2 Database Conversion