SYMBOL

[ Program Manual | User's Guide | Data Files | Databases ]

Table of Contents
FUNCTION
DESCRIPTION
EXAMPLE
OUTPUT
RELATED PROGRAMS
RESTRICTIONS
CONSIDERATIONS
SUGGESTIONS
COMMAND-LINE SUMMARY
LOCAL DATA FILES
PARAMETER REFERENCE

FUNCTION

[ Top | Next ]

Symbol creates, changes, deletes, or displays GCG symbol(s) from the GCG symbol table.

DESCRIPTION

[ Previous | Top | Next ]

Programs of the Wisconsin Package(TM) use symbols to refer to various optional values that control operation of the Wisconsin Package. Examples of these symbols include the plotting protocol and device to be used, file protections, and the level of command-prompt verbosity. Each symbol has an identifier and a single associated value. For example, the identifier PlotDriver has as its value the name of the driver used to perform graphics output for the Wisconsin Package. The symbol identifiers and their values are maintained in a table by a server process. The Symbol program provides a command-line interface to the symbol table.

Symbol identifiers are case insensitive, meaning you can enter the letters in uppercase, lowercase, or mixed case. For example, the symbol you specify as PlotDriver is the same as specifying plotdriver. An identifier can have up to 31 characters and can contain any combination of alphanumeric characters, plus the dollar sign ($), underscore (_), and hyphen (-) characters. The values associated with a symbol are case sensitive and can contain up to 1,024 characters, but must not contain any null characters.

When the Wisconsin Package is initialized at the start of a session, the Symbol program is used to establish a table of symbols with values that are appropriate for your site. During the course of your session, some programs may establish new symbols and may modify the values of some existing symbols as a side effect of their execution.

To display the current contents of the table, type % symbol . To find the symbols that start with a specific character pattern, you can use the asterisk (*) and question mark (?) wildcards. For example, to find all symbols that start with di you would type % symbol di* . In this case the di* acts as an identifier specification because it may refer to more than one symbol.

EXAMPLE

[ Previous | Top | Next ]

Here is an example that shows you how to create a symbol:

% symbol -set

Set what symbol ?   documentation

Set to what value ?   FALSE

%

For the rest of your GCG session, Wisconsin Package programs that examine the value of this symbol identifier, which determines whether or not to display program documentation, will read the value FALSE and as a result, not display documentation text.

Here is a session that shows you how to delete the symbol you just created:

% symbol -unset

Unset what name ?   documentation

%

With the -Unset parameter, you can also use an identifier specification to refer to a related group of symbols. For example, you could have entered % symbol -unset plot* to unset any or all symbols with identifiers that begin with plot.

OUTPUT

[ Previous | Top | Next ]

There is no output for this program.

RELATED PROGRAMS

[ Previous | Top | Next ]

Name creates, changes, deletes, or displays GCG logical name(s) from the GCG logical names table. (Also referred to as the name(1) command.)

RESTRICTIONS

[ Previous | Top | Next ]

The TableMap program must establish a memory table before Symbol can operate.

The values associated with a symbol are case sensitive and can contain up to 1,024 characters, but must not contain any null characters. An identifier can have up to 31 characters and can contain any combination of alphanumeric characters, plus the dollar sign ($), underscore (_), and hyphen (-) characters. The values associated with a symbol are case sensitive and can contain up to 1,024 characters, but must not contain any null characters.

CONSIDERATIONS

[ Previous | Top | Next ]

Symbols differ from environment variables in the manner in which they are inherited by programs. When you use Symbol to change a current symbol or create a new one, the change to the symbol table becomes immediately visible to all GCG processes running in the context of the current session. In contrast, processes always see the contents of the environment table as it existed at the time that they were started.

The order of the parameters for -Set is identifier followed by value. If you like, you can bypass this implied order by using the -Name=identifier and -Value=value parameters in any order on the command line. (See the PARAMETER REFERENCE topic for more information.)

(If you use Symbol in a shell script, note that it sets its exit status to zero when operation is successful, or to -1 if unsuccessful.)

SUGGESTIONS

[ Previous | Top | Next ]

Any change you make to the symbols table for a session is in effect during that session only; once you log off, the change is lost. If you want to assign values to symbols at login, you should put the information in your .gcgrc file. (See "Customizing Your Login" in Chapter 1, Getting Started of the User's Guide for information about the .gcgrc file.)

COMMAND-LINE SUMMARY

[ Previous | Top | Next ]

All parameters for this program may be added to the command line. Use -CHEck to view the summary below and to specify parameters before the program executes. In the summary below, the capitalized letters in the parameter names are the letters that you must type in order to use the parameter. Square brackets ([ and ]) enclose parameter values that are optional. For more information, see "Using Program Parameters" in Chapter 3, Using Programs in the User's Guide.


Minimal Syntax: % symbol

Prompted Parameters:  None.

Optional Parameters:

-Set identifier value     changes the value of the symbol or adds a
                            new symbol
-Unset identifier-spec    deletes all symbols matching identifier-
                            spec
-Name=identifier          lets you enter a symbol identifier anywhere
                            on the command line
-Value=value              lets you enter a symbol value anywhere on
                            the command line
-Quiet                    suppress all messages
-KILL                     stops the symbols service for the session
-List identifier-spec     lists all symbols matching the identifier-
                            spec

LOCAL DATA FILES

[ Previous | Top | Next ]

None.

PARAMETER REFERENCE

[ Previous | Top | Next ]

You can set the parameters listed below from the command line. For more information, see "Using Program Parameters" in Chapter 3, Using Programs in the User's Guide.

Note that although there are no required parameters for the Symbol command, you would generally use it with the -Set or -Unset parameters.

-Set identifier value

creates a symbol or assigns a new value to an existing one. For example, % symbol -s documentation TRUE changes the symbol Documentation to TRUE. If you leave out the identifier value, Symbol prompts you for the information.

-Unset identifier-spec

deletes an existing symbol. This parameter is the opposite of the -Set parameter.

-Quiet

suppresses any screen display (exit status is set as usual).

-KILL

stops the symbol service from running. (If you use this parameter, and we can think of no reason why you would, you must restart the Wisconsin Package by entering % gcg .)

-Name=identifier

lets you enter a symbol identifier anywhere on the command line.

-Value=value

lets you enter a value for the symbol anywhere on the command line.

-List identifier-spec

displays the symbols that match an identifier specification, along with the values associated with those symbols.

Printed: December 9, 1998 16:30 (1162)

[ Program Manual | User's Guide | Data Files | Databases ]


Documentation Comments: doc-comments@gcg.com
Technical Support: help@gcg.com

Copyright (c) 1982-2001 Genetics Computer Group, Inc. A subsidiary of Pharmacopeia, Inc. All rights reserved.

Licenses and Trademarks Wisconsin Package is a trademark of Genetics Computer Group, Inc. GCG and the GCG logo are registered trademarks of Genetics Computer Group, Inc.

All other product names mentioned in this documentation may be trademarks, and if so, are trademarks or registered trademarks of their respective holders and are used in this documentation for identification purposes only.

Genetics Computer Group

www.gcg.com