Chapter 7. Functions

Revision History
Revision V7.1-00323 November 2023
  • In “$ZPEEK()”, Revise the Note on selection among multiple replication journal pools

Revision V7.1-00126 June 2023
Revision V7.1-00004 April 2023
Revision V7.0-00502 December 2022
Revision V7.0-00420 September 2022
  • In “$ZSOCKET()”, add new $ZSOCKET() keywords for getsockopt() items. Disabled support for pre-TLSv1.2

Revision V7.0-00324 June 2022
Revision V7.0-00223 March 2022
Revision V7.0-00124 November 2021
Revision V6.3-01208 April 2020
Revision V6.3-01031 October 2019
Revision V6.3-00704 February 2019
Revision V6.3-00626 October 2018
Revision V6.3-00529 June 2018
Revision V6.3-00423 March 2018
Revision V6.3-00312 December 2017
Revision V6.3-00120 March 2017
Revision V6.2-00127 February 2015
  • Updated “$ZTRIgger()” for V6.2-001 multi-line XECUTE string enhancements, $ZTRIGGER() return status, specified that $ZTRIGGER() always operates within a TP transaction even if it needs to implicitly create one, and added a note on the support of triggers in spanning regions.

  • Added a new section called “$ZSOCKET()”.

  • In “$ZPEEK()”, specified that $ZPEEK() function generates an UNDEF error when VIEW UNDEF is not set and format parameter is specified but is undefined and added the JNL[REG]:region and JBF[REG]:region keyword first arguments.

  • In “Argument Keywords of $VIEW()”, added "RTNCHECKSUM" as a new ARG1.

Revision V6.1-00028 August 2014
Revision V6.0-00324 February 2014
Revision V6.0-00121 March 2013

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()
$ZAscii()
Examples of $ZASCII()
$ZATRansform
Examples of $ZATRANSFORM()
$ZAUditlog
Examples of $ZAUDitlog()
$ZBIT Functions
$ZBITAND()
$ZBITCOUNT()
$ZBITFIND()
$ZBITGET()
$ZBITLEN()
$ZBITNOT()
$ZBITOR()
$ZBITSET()
$ZBITSTR()
$ZBITXOR()
Examples of $ZBIT Functions
$ZCHar()
Example of $ZCHAR()
$ZCOllate()
Example of $ZCOllate()
$ZCOnvert()
Examples of $ZCONVERT()
$ZDATA()
Examples of $ZDATA()
$ZDate()
$ZDATE Format Specification Elements
Examples of $ZDATE()
$ZExtract()
Examples of $ZEXTRACT()
$ZFind()
Examples
$ZGetjpi()
Examples
$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()
$ZSOCKET()
$ZSYSLOG()
$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.

loading table of contents...