Chapter 7. Functions

Revision History
Revision V6.1-000 28 August 2014
Revision V6.0-003 24 February 2014
Revision V6.0-001 21 March 2013
Revision V5.5-000/2 31 October 2012

Added the description of “$ZSIGPROC()”.

Revision V5.5-000/1 05 October 2012

Removed the incorrect reference to "M" as a formatting code in “$FNumber()”, corrected the example of “$ZBITSTR()”, and corrected the default value of BREAKMSG and the description of SPSIZE in “Argument Keywords of $VIEW()”.

Revision V5.5-000 15 June 2012

Updated Section : “$ZDate()” for V5.5-000, improved the description of “$STack()” and corrected syntax errors in an example for $ZSEARCH().

Revision V5.4-002B 26 December 2011 Conversion to documentation revision history reflecting GT.M releases with revision history for each chapter.

Table of Contents

$ASCII()
Examples of $ASCII()
$Char()
Examples of $CHAR()
$Data()
Examples of $DATA()
$Extract()
Examples of $EXTRACT()
$Find()
Examples of $FIND()
$FNumber()
Examples of $FNUMBER()
$Get()
Examples of $GET()
$Increment()
Examples of $INCREMENT()
$Justify()
Examples of $JUSTIFY()
$Length()
Examples of $LENGTH()
$NAme()
Examples of $NAME()
$Next()
$Order()
Examples of $ORDER()
$Piece()
Examples of $PIECE()
$Qlength()
Examples of $QLENGTH()
$QSubscript()
Examples of $QSUBSCRIPT()
$Query()
Examples of $QUERY()
$Random()
Examples of $RANDOM()
$REverse()
Examples of $REVERSE()
$Select()
Examples of $SELECT()
$STack()
Examples of $STACK()
$Text()
Examples of $TEXT()
$TRanslate()
Examples of $TRANSLATE()
$View()
Argument Keywords of $VIEW()
Examples of $VIEW()
$ZAHandle()
$ZBIT Functions
$ZBITAND()
$ZBITCOUNT()
$ZBITFIND()
$ZBITGET()
$ZBITLEN()
$ZBITNOT()
$ZBITOR()
$ZBITSET()
$ZBITSTR()
$ZBITXOR()
Examples of $ZBIT Functions
$ZAscii()
Examples of $ZASCII()
$ZCHar()
Example of $ZCHAR()
$ZCOnvert()
Examples of $ZCONVERT()
$ZDATA()
Examples of $ZDATA()
$ZDate()
$ZDATE Format Specification Elements
Examples of $ZDATE()
$ZExtract()
Examples of $ZEXTRACT()
$ZFind()
Examples
$ZGetjpi()
$ZJOBEXAM()
Examples of $ZJOBEXAM()
$ZJustify()
Examples of $ZJUSTIFY()
$ZLength()
Examples of $ZLength()
$ZMessage()
Examples of $ZMESSAGE()
$ZPARSE()
Examples of $ZPARSE()
$ZPiece()
Examples of $ZPIECE()
$ZPEEK()
$ZPrevious()
$ZQGBLMOD()
$ZSEARCH()
Examples of $ZSEARCH()
$ZSIGPROC()
Examples of $ZSIGPROC()
$ZSUBstr()
Examples of $ZSUBSTR()
$ZTRanslate()
Examples of $ZTRANSLATE()
$ZTRIgger()
Examples of $ZTRIGGER()
$ZTRNLNM()
Examples of $ZTRNLNM()
$ZWidth()
Examples of $ZWIDTH()
$ZWRite()

This chapter describes M language Intrinsic Functions implemented in GT.M. Traditional string processing functions have parallel functions that start with the letter "z". The parallel functions extend the byte-oriented functionality of their counterparts to UTF-8 mode. They are helpful when applications need to process binary data including blobs, binary byte streams, bit-masks, and so on.

Other functions that start with the letter "z" and do not have counterparts implement new functionality and are GT.M additions to the ANSI standard Intrinsic Functions. The M standard specifies standard abbreviations for Intrinsic Functions and rejects any non-standard abbreviations.

M Intrinsic Functions start with a single dollar sign ($) and have one or more arguments enclosed in parentheses () and separated by commas (,). These functions provide expression results by performing actions that are impossible or difficult to perform using M commands.