Skip to content

Chapter10.Utility Routines

Chapter10.Utility Routines

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:

  • Date and time utilities
  • Conversion utilities
  • Mathematic utilities
  • Global utilities
  • Routine utilities
  • Internationalization utilities
  • System Management utilities
  • UTF-8 mode Utility Routines

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.