Pattern Code Selection

To establish a default patcode table for a database define the logical name:

	$ DEFINE GTM_PATTERN_FILE pattable-filename
	

where pattable-filename is the text file containing the patcode table definition, and

	$ DEFINE GTM_PATTERN_TABLE table-name
	

where table-name is the name of the patcode table within the file specification pointed to by GTM_PATTERN_FILE.

Within an active process, the patcode table is established using the M VIEW command and the %PATCODE utility. Before invoking the %PATCODE utility, you may use VIEW to load pattern definition files for GT.M. The required keyword and value are:

	VIEW "PATLOAD":"pathname"	
	

This allows you to use the %PATCODE utility or the VIEW command to set current patcode table. The format of the VIEW command to set the patcode table is:

	VIEW "PATCODE":"tablename"
	

This is equivalent to set ^%PATCODE explained below.

%PATCODE has the following extrinsic entry points:

	set^%PATCODE(tn)
	

sets the current patcode table to the one having the name specified by tn, in the defined file specification.

Example:

	GTM> WRITE $$set^%PATCODE("NEWLANGUAGE")
	1
	

If there is no table with that name, the function returns a false (0) and does not modify the current patcode table.

	get^%PATCODE
	

returns the current patcode table name.

Example:

	GTM> WRITE $$get^%PATCODE
	NEWLANGUAGE