Welcome to The M Programmer's Guide!
- Main YottaDB Documentation Page
- About this Manual
- 1. About YottaDB
- 2. YottaDB Language Extensions
- 3. Development Cycle
- Overview of the Program Development Cycle
- Defining Environment Variables
- Preparing the Database
- Creating and Editing a Source Program
- Compiling a Source Program
- Executing a Source Program
- Executing from the Shell
- Processing Errors from Direct Mode and Shell
- 4. Operating and Debugging in Direct Mode
- Operating in Direct Mode
- Debugging a Routine in Direct Mode
- Creating and Displaying M Routines
- Executing M Routines Interactively
- Processing with Run Time and Syntax Errors
- Correcting Errors
- Stepping through a Routine
- Continuing Execution from a Breakpoint
- Interrupting Execution
- Using the Invocation Stack in Debugging
- Transferring Routine Control
- Displaying Source Code
- Correcting Errors in an M Routine
- Relinking the Edited Routine
- Reexecuting the Routine
- Using Forked Processes
- Summary of Debugging Tools
- 5. General Language Features of M
- Data Types
- M Names
- Variables
- Literals
- Expressions
- Operators
- Commands
- M Locks
- Intrinsic Functions
- Intrinsic Special Variables
- Routines
- Indirection
- Parameter Passing
- External Calls
- Extrinsic Functions
- Extrinsic Special Variables
- Transaction Processing
- 6. Commands
- Break
- Close
- Do
- Else
- For
- Goto
- HALT
- HANG
- If
- Job
- Kill
- Lock
- Merge
- New
- Open
- Quit
- READ
- Set
- TCommit
- TREstart
- TROllback
- TStart
- Use
- View
- Keywords in VIEW Command
- [NO]BADCHAR
- BREAKMSG:value
- DBFLUSH[:REGION[:N]]
- DBSYNC[:REGION]
- [NO]DMTERM
- EPOCH[:REGION]
- FLUSH[:REGION]
- [NO]FLUSHONCALLOUT
- [NO]FULL_BOOL[EAN|WARN]
- GBLDIRLOAD:str
- GDSCERT:value
- GVDUPSETNOOP:value
- GVSRESET:<region>
- JNLFLUSH[:region]
- JNLWAIT
- JOBPID:value
- LABELS:value
- LINK:[NO]RECURSIVE
- [NO]LOGN[ONTP][:intexpr]
- [NO]LOGT[PRESTART][:intexpr]
- LV_GCOL
- LV_REHASH
- LVNULLSUBS|NOLVNULLSUBS|NEVERLVNULLSUBS
- NOISOLATION:<expr>
- PATCODE:tablename
- PATLOAD:file-specification
- POOLLIMIT:<region>:expr
- RCTLDUMP
- RESETGVSTATS
- [UN]SETENV:<expr>[:value]
- [NO]STATSHARE[:<region-list>]
- STP_GCOL
- TRACE:value:<expr>
- [NO]UNDEF
- ZDATE_FORM:value
- ZTRIGGER_OUTPUT:value
- Examples of VIEW
- Keywords in VIEW Command
- Write
- Xecute
- ZAllocate
- ZBREAK
- ZCOMpile
- ZContinue
- ZDeallocate
- ZEdit
- ZGoto
- ZHALT
- ZHelp
- ZKill
- ZLink
- ZMessage
- ZPrint
- ZRUPdate
- ZSHow
- ZSTep
- ZSYstem
- ZTCommit
- ZTRigger
- ZTStart
- ZWIthdraw
- ZWRite
- 7. Functions
- $ASCII()
- $CHAR()
- $DATA()
- $EXTRACT()
- $FIND()
- $FNUMBER()
- $GET()
- $INCREMENT()
- $JUSTIFY()
- $LENGTH()
- $NAME()
- $NEXT()
- $ORDER()
- $PIECE()
- $QLENGTH()
- $QSUBSCRIPT()
- $QUERY()
- $RANDOM()
- $REVERSE()
- $SELECT()
- $STACK()
- $TEXT()
- $TRANSLATE()
- $VIEW()
- $ZAHANDLE()
- $ZASCII()
- $ZATRANSFORM()
- $ZAUditlog()
- $ZBIT Functions
- $ZCHAR()
- $ZCOLLATE()
- $ZCONVERT()
- $ZDATA()
- $ZDATE()
- $ZEXTRACT()
- $ZFIND()
- $ZGETJPI()
- $ZJOBEXAM()
- $ZJUSTIFY()
- $ZLENGTH()
- $ZMESSAGE()
- $ZPARSE()
- $ZPEEK()
- $ZPIECE()
- $ZPREVIOUS()
- $ZQGBLMOD()
- $ZSEARCH()
- $ZSIGPROC()
- $ZSOCKET()
- $ZSUBSTR()
- $ZSYSLOG()
- $ZTRANSLATE()
- $ZTRIGGER()
- $ZTRNLNM()
- $ZWIDTH()
- $ZWRITE()
- $ZYHASH()
- $ZYISSQLNULL()
- $ZYSUFFIX()
- 8. Intrinsic Special Variables
- $DEVICE
- $ECODE
- $ESTACK
- $ETRAP
- $HOROLOG
- $IO
- $JOB
- $KEY
- $PRINCIPAL
- $QUIT
- $REFERENCE
- $STACK
- $STORAGE
- $SYSTEM
- $TEST
- $TLEVEL
- $TRESTART
- $X
- $Y
- $ZA
- $ZALLOCSTOR
- $ZAUDIT
- $ZB
- $ZCHSET
- $ZCLOSE
- $ZCMDLINE
- $ZCOMPILE
- $ZCSTATUS
- $ZDATEFORM
- $ZDIRECTORY
- $ZEDITOR
- $ZEOF
- $ZERROR
- $ZGBLDIR
- $ZHOROLOG
- $ZININTERRUPT
- $ZINTERRUPT
- $ZIO
- $ZJOB
- $ZKEY
- $ZLEVEL
- $ZMALLOCLIM
- $ZMAXTPTIME
- $ZMODE
- $ZONLNRLBK
- $ZPATNUMERIC
- $ZPIN
- $ZPOSITION
- $ZPOUT
- $ZPROMPT
- $ZQUIT
- $ZREALSTOR
- $ZRELDATE
- $ZROUTINES
- $ZSOURCE
- $ZSTATUS
- $ZSTEP
- $ZSTRPLLIM
- $ZSYSTEM
- $ZTEXIT
- $ZTIMEOUT
- $ZTRAP
- $ZUSEDSTOR
- $ZUT
- $ZVERSION
- $ZYERROR
- $ZYINTRSIG
- $ZYRELEASE
- $ZYSQLNULL
- Trigger ISVs
- 9. Input/Output Processing
- I/O Intrinsic Special Variables
- I/O Devices
- Using Terminals
- Using Sequential Files
- FIFO Characteristics
- Using NULL Devices
- Using PIPE Devices
- Using Socket Devices
- I/O Commands
- Open
- APPEND
- ATTACH
- CHSET
- COMMAND
- CONNECT
- DELIMITER
- EXCEPTION
- EMPTERM
- FFLF
- FIFO
- FIXED
- FOLLOW
- GROUP
- ICHSET
- INDEPENDENT
- IKEY
- IOERROR
- KEY
- LISTEN
- MOREREADTIME
- NEWVERSION
- OCHSET
- OKEY
- OWNER
- OPTIONS
- PAD
- PARSE
- READONLY
- RECORDSIZE
- REWIND
- SEEK=strexpr
- SHELL
- STDERR
- STREAM
- TRUNCATE
- UIC
- VARIABLE
- WORLD
- WRAP
- WRITEONLY
- ZBFSIZE
- ZDELAY
- ZFF
- ZIBFSIZE
- USE
- ATTACH
- CANONICAL
- CENABLE
- CLEARSCREEN
- CONNECT
- CONVERT
- CTRAP
- DELIMITER
- DETACH
- DOWNSCROLL
- ECHO
- EDITING
- EMPTERM
- ERASELINE
- ESCAPE
- EXCEPTION
- FFLF
- FILTER
- FOLLOW
- HOSTSYNC
- HUPENABLE
- IKEY
- INREWIND
- INSEEK=strexpr
- INSERT
- IOERROR
- KEY
- LENGTH
- OKEY
- OPTIONS
- OUTREWIND
- OUTSEEK=strexpr
- PASTHRU
- READSYNC
- REWIND
- SEEK=strexpr
- SOCKET
- TERMINATOR
- TRUNCATE
- TTSYNC
- TYPEAHEAD
- UPSCROLL
- WIDTH
- WRAP
- X
- Y
- ZBFSIZE
- ZDELAY
- ZFF
- ZIBFSIZE
- READ
- WRITE
- WRITE *
- CLOSE
- Deviceparameter Summary Table
- Open
- 10. Utility Routines
- 11. Integrating External Routines
- Introduction
- Access to non-M Routines
- Creating a Shareable Library
- Using External Calls: Call-Outs
- Calls from External Routines: Call-Ins
- Type Limits for Call-Ins and Call-Outs
- Error cases for ydb_buffer_t*
- Choosing the right parameter type for strings
- 12. Internationalization
- Collation Sequence Definitions
- Creating the Alternate Collation Routines
- Transformation Routine (gtm_ac_xform_1 or gtm_ac_xform)
- Inverse Transformation Routine (gtm_ac_xback or gtm_ac_xback_1)
- Version Control Routines (gtm_ac_version and gtm_ac_verify)
- Using the %GBLDEF Utility
- Example of Upper and Lower Case Alphabetic Collation Sequence
- Example of Collating Alphabets in Reverse Order using gtm_ac_xform_1 and gtm_ac_xback_1
- Implementing an Alternative Collation Sequence for Unicode® Characters
- Matching Alternative Patterns
- 13. Error Processing
- Compile Time Error Message Format
- Processing Compile Time Errors
- Run Time Error Message Format
- Processing Run-Time Errors
- Program Handling of Errors
- Error Actions
- 14. Triggers
- 15. Database Encryption Extensions to the YottaDB External Interface
- Appendix A: M Coding Standards - Do's and Don'ts
- M Coding Standards - Do's and Don'ts
- Do's
- Character Set
- Internationalization
- Alias Variables and Containers
- Parameter Passing
- Naked References
- Entryrefs
- Lines with Multiple Commands
- Lines Width
- Error Handling
- Transaction Processing
- BREAK
- Argumentless DO
- GOTO and ZGOTO
- HALT,QUIT and HALT
- LOCK, ZALLOCATE, and ZDEALLOCATE
- NEW
- READ
- SET
- XECUTE, Indirection, $ZSYSTEM and PIPE device commands
- ELSE
- Post Conditionals
- $ZDATA() and $DATA()
- $INCREMENT()
- $NEXT()
- $PIECE()
- $RANDOM()
- $ZPREVIOUS()
- $ETRAP vs. $ZTRAP
- $KEY vs. $ZB
- $STACK vs. $ZLEVEL
- $ZCMDLINE
- Extrinsic Functions and Special Variables ($$)
- Triggers
- Call-in/Call-outs
- Autorelink
- Don'ts
- Do's
- M Coding Standards - Do's and Don'ts
- Appendix B: Creating Shebang Scripts
- LICENSE