Chapter 10. Utility Routines

Revision History
Revision V7.1-004 27 June 2024
  • In “%YGBLSTAT()”, Added WFR,BUS,BTS,STG,KTG,ZTG,DEXA,GLB,JNL,MLK,PRC,TRX,ZAD,JOPA,AFRA,BREA,MLBA,TRGA,WRL,PRG,WFL,WHE,INC to the YGBLSTAT output

Revision V7.1-003 23 November 2023
Revision V7.1-002 19 September 2023
Revision V7.0-002 23 March 2022
Revision V7.0-001 24 November 2021
Revision V7.0-000 12 February 2021
Revision V6.3-012 08 April 2020
Revision V6.3-011 20 December 2019
Revision V6.3-009 27 June 2019
Revision V6.3-008 24 April 2019
Revision V6.3-007 04 February 2019
Revision V6.3-006 26 October 2018
Revision V6.3-004 23 March 2018
  • In “%PEEKBYNAME()”, Added note about RO database implications

  • In “ %GCE”, change strexpr to expr; add more information about $DEVICE.

  • In “ %GSE”, Updated %GSE entry to contain QUIET Utility Label

  • In “ %RCE”, Updated %RCE entry to include QUIET and QCALL utility labels.

  • In “ %RSE”, Updated %RSE entry to include QUIET and QCALL utility labels.

Revision V6.3-002 22 August 2017
  • In “%PEEKBYNAME()”, add an entry for jnlpool_ctl_struct.instfreeze_environ_inited replication parameter.

Revision V6.3-001 20 March 2017
Revision V6.0-001 21 March 2013

Added the following sections:

In “ %XCMD”, added the description of the LOOP^%XCMD utility label.

Table of Contents

Using the Utilities
Date and Time Utilities
%D
%DATE
%H
%T
%TI
%TO
Conversion Utilities
%DH
%DO
%HD
%HO
%JSWRITE
%LCASE
%OD
%OH
%UCASE
Mathematic Utilities
%EXP
%SQROOT
String Utilities
%TRIM
%MPIECE
Global Utilities
%G
%GC
%GCE
%GD
%GED
%GI
%GO
%GSE
%GSEL
%ZSHOWVTOLCL
Routine Utilities
%FL
%RANDSTR
%RCE
%RD
%RI
%RO
%RSE
%RSEL
Internationalization Utilities
%GBLDEF
%LCLCOL
%PATCODE
System Management Utilities
%DUMPFHEAD
%FREECNT
%XCMD
%PEEKBYNAME()
%YGBLSTAT()
UTF-8 Mode Utility Routines
%UTF2HEX
%HEX2UTF
GT.M Utilities Summary Table

GT.M provides library utilities to perform frequently used tasks, and to access frequently used information. Most of the utilities are for GT.M programmers, but some provide tools for system administration and operation.

The GT.M utilities fall into the following general categories:

The GT.M distribution includes the source files for these utilities. The default installation compiles them to produce object modules in the $gtm_dist distribution library.

You may wish to examine the utilities and include some of them in your programs if the programs access the function frequently or you may want to modify the utilities to better fit your particular needs. If you modify a utility, store your copy in a directory that precedes gtm_dist in the search list $ZROUTINES to prevent a new release of GT.M from overwriting your copy.