Using ObjectScript Introducing ObjectScript Features Language Overview Invoking Commands and Functions Syntax Rules Case Sensitivity Unicode Whitespace Comments String Literals Numeric Literals Identifiers Labels Namespaces Reserved Words Data Types and Values Strings Numbers Objects Persistent Multidimensional Arrays (Globals) Undefined Values Boolean Values Dates Variables Categories of Variables Local Variables Globals Process-Private Globals Rules About Subscripts Variable Typing and Conversion #dim (Optional) Global Variables and Journaling Special Variables Operators and Expressions Introduction to Operators and Expressions Operator Precedence String-to-Number Conversion Expressions Arithmetic Operators Numeric Relational Operators Logical Comparison Operators String Concatenate Operator (_) String Relational Operators Pattern Match Operator (?) Indirection Operator (@) Commands Command Keywords Command Arguments Command Postconditional Expressions Multiple Commands on a Line Variables Error Processing Transaction Processing Locking and Concurrency Control Invoking Code Controlling Flow Controlling I/O Callable User-defined Code Modules Procedures, Routines, Subroutines, Functions, and Methods: What Are They? Defining Procedures Parameter Passing Procedure Code Indirection, XECUTE Commands, and JOB Commands within Procedures Error Traps within Procedures Legacy User-Defined Code Using Macros Creating Custom Macros Saving Custom Macros Invoking Macros Referring to External Macros (Include Files) Where to See Expanded Macros Embedded SQL Embedded SQL Other Forms of Queries Multidimensional Arrays What Multidimensional Arrays Are Manipulating Multidimensional Arrays See Also String Operations Basic String Operations and Functions Delimited Strings List-Structure String Operations Lists and Delimited Strings Compared Locking and Concurrency Control Introduction Lock Names The Lock Table Locks and Arrays Using the LOCK Command Lock Types Escalating Locks Locks, Globals, and Namespaces Avoiding Deadlock Practical Uses for Locks Locking and Concurrency in SQL and Persistent Classes For Additional Information Details of Lock Requests and Deadlocks Waiting Lock Requests Queuing of Array Node Lock Requests ECP Local and Remote Lock Requests Avoiding Deadlock Managing the Lock Table Available Tools for Managing the Lock Table Viewing Locks in the Management Portal Removing Locks in the Management Portal ^LOCKTAB Utility Transaction Processing Managing Transactions Within Applications Automatic Transaction Rollback System-Wide Issues with Transaction Processing Suspending All Current Transactions Working with %Status Values Basics of Working with Status Values Examples Variation (%objlasterror) Multiple Errors Reported in a Status Value Returning a %Status %SYSTEM.Error See Also Using TRY-CATCH Introduction Using THROW with TRY-CATCH Using $$$ThrowOnError and $$$ThrowStatus Macros Using the %Exception.SystemException and %Exception.AbstractException Classes Other Considerations with TRY-CATCH Error Logging Logging Application Errors Using Management Portal to View Application Error Logs Using ^%ERN to View Application Error Logs Command-Line Routine Debugging Secure Debug Shell Debugging with the ObjectScript Debugger Debugging With BREAK Using %STACK to Display the Stack Other Debugging Tools (Legacy) Using ^%ETN for Error Logging (Legacy) Traditional Error Processing How Traditional Error Processing Works Handling Errors with $ZTRAP Handling Errors with $ETRAP Handling Errors in an Error Handler Forcing an Error Processing Errors at the Terminal Prompt