Using the Utilities

You can either use a utility in Direct Mode or include it in a source application program with one or more of the following formats. Italicized items are to be supplied by the user:

Many utilities contain labels that invoke variations of the basic utility functionality. Some also provide the label FUNC to invoke an extrinsic function with optional or required parameters.

GT.M passes input to non-extrinsic forms of the utilities interactively or by using "input" variables. GT.M passes output from non-extrinsic forms of the utilities using "output" variables. For extrinsic entry points, the utilities receive input as parameters and pass output as the returned result. For other entry points, GT.M uses predefined "input" and "output" variables to pass information. Some utilities interactively request user inputs and display their results. Each utility is described individually in this chapter where appropriate labels, input, and output variables are identified.

By convention, the utilities use upper-case variables for external input and output. Since M is case-sensitive, when an invocation uses a lower-case or misspelled variable name, the routine does not output the expected information. Instead it supplies a default value, if one exists, or produces an error message.

Example:

	GTM>SET %ds="11/22/2002"
	GTM>DO INT^%DATE
	GTM>ZWRITE
	%DN=59123
	%ds="11/22/2002"
	

This example sets the lowercase variable %ds to the date 11/22/2002. Since the %DATE routine expects the input to be provided in the uppercase %DS variable, it returns a default value in the output variable $DN. The default is the $HOROLOG format of the current date, which is 11/15/2002 in the example.