You are here: Command Parameters > All

All

All is used to specify the extent to which a command is executed on all fields/variables (command mode and command dialog) or records (command dialog only).

Command Mode Syntax

All can be used to specify that a command is to be executed on all fields, expressions or variables. In other circumstances, All can be used to specify that a command is to be processed against all fields or expressions of an appropriate type (usually numeric field types when accumulating fields).

In command mode only, All also supports the LIKE and EXCEPT qualifiers which can be used to output fields/variables whose names start with a common value or to output all fields/variables except those whose names match or start with a common value.

The ALL field parameter has the following syntax:

ALL < {LIKE | EXCEPT} mask >

Examples - Basic

In the first example, All causes the Extract command to output all fields or expressions for the identified records:

EXTRACT FIELDS ALL TO "Exceptions" OPEN IF Value < 0

In the second example, All causes all numeric fields or expressions to be totalled for each key value in the Summarize command:

SUMMARIZE ON Loc ACCUMULATE ALL TO "Summary_File" OPEN

In the third example, All is used to ensure all variables are referred to:

DELETE ALL OK

Examples - Using Qualifiers

The ALL command parameter also supports the optional qualifiers LIKE and EXCEPT. These qualifiers are useful for reducing large field lists to include only fields containing specific naming characteristics or to exclude fields containing specific naming characteristics.

For example:

Assume a general ledger file, containing a large number of fields including a GL number field called GL, a balance field called BALANCE, and 12 monthly budget amount fields called BUDGET01 through BUDGET12.

Note: The purpose for using the wildcards * and ? are explained in more detail in the LIKE and EXCEPT qualifier sections that follow these examples.

An easy way to extract just these 14 fields would be:

EXTRACT GL BALANCE ALL LIKE "BUDGET??" TO FILE_A

Alternatively, the syntax could be specified as:

EXTRACT GL BALANCE ALL LIKE "BUDGET*" TO FILE_A

However, to extract all fields except the budget amount fields, then an easy way to exclude them would be:

EXTRACT ALL EXCEPT "BUDGET??" TO FILE_A

LIKE

Fields

The LIKE qualifier allows the ALL field parameter to output only fields whose names meet a specific characteristic.

For example:

EXTRACT GL BALANCE ALL LIKE "BUDGET*" TO FILE_A

The use of ALL LIKE 'BUDGET*' will only output only fields whose field names start with "BUDGET".

Note: Use of LIKE is case-insensitive.

The asterisk is used to indicate that the remainder of the field name is ignored.

If no asterisk is included, only fields explicitly named "BUDGET" would be output.

Note: * matches any remaining characters in the field name (0 or more characters), so "ab*" will match the field names "ab", "abc", "abcd", etc. If an asterisk "*" is used it must be the last character specified. If the asterisk is used prior to the last specified character, the asterisk will be ignored).

The LIKE qualifier also supports use of a question mark "?". The question mark can be used to indicate acceptance of any character in the field name in a specified position. For instance, users could specify one or more questions marks "?", in order to accept any character in a field name in multiple positions, for example:

EXTRACT GL BALANCE ALL LIKE "BUDGET??" TO FILE_A

The use of "BUDGET??" will only output fields whose field name explicitly contains "BUDGET" in position 1 to 6, and contains any two characters in positions 7 and 8.

Note: If a question mark "?" is specified, there must be a character at that position in the field name, so "BUDGET??" would not match the field name "BUDGET"

The LIKE qualifier can also be specified more than once.

Note: When using the LIKE and EXCEPT qualifiers to specify multiple fields, the field list must be surrounded by quotes and must not contain any spaces between the listed fields, with only commas separating each field. Inserting spaces before or after a field name will cause that field to be ignored.

For example:

EXTRACT ALL LIKE "GL*" ALL LIKE 'B*' TO FILE_A

Multiple LIKE qualifiers can also be condensed into a single LIKE qualifier. For example:

EXTRACT ALL LIKE "GL*,B*" TO FILE_A

The use of multiple LIKE qualifiers ensures that the command will only output fields whose field name begins with either "GL" or a "B".

Note: Use of the question mark and asterisk can be combined but the asterisk must always be the last character specified.

Related Fields

The ALL parameter using LIKE can also be used to reference fields in related child tables.

Note: Referencing related fields can only be used with ALL LIKE and cannot be used with ALL EXCEPT.

The following restrictions apply to referencing fields in related tables:

you can only reference a single related table per specification, so if you wanted to bring in selected fields from related tables A and B then you would need to make multiple specifications:

ALL LIKE "Table_A.BUDGET*" ALL LIKE "Table_B.ACCOUNT*"

if you want several to list multiple related field name values from the same related table then you only specify the table name once:

ALL LIKE "A.BUDGET*,ACCOUNT*,GL*"

Variables

The ALL parameter using LIKE can also be used to reference variables. To delete only temporary variables using a leading prefix of "TMP_":

DELETE ALL LIKE "TMP_*" OK

EXCEPT

Fields

The EXCEPT qualifier will output all fields except those whose field name begins with the specified qualifier.

Note: When using the LIKE and EXCEPT qualifiers to specify multiple fields, the field list must be surrounded by quotes and must not contain any spaces between the listed fields, with only commas separating each field. Inserting spaces before or after a field name will cause that field to be ignored.

For example:

EXTRACT ALL EXCEPT "GL*" TO FILE_A

The use of EXCEPT 'GL*' will output all fields except fields whose field names begin with a "GL".

Note: Use of EXCEPT is case-insensitive.

The EXCEPT qualifier will also allow specification of multiple exceptions. The use of multiple qualifiers will output all fields except those fields listed in the EXCEPT qualifier.

Note: When using the LIKE and EXCEPT qualifiers to specify multiple fields, the field list must be surrounded by quotes and must not contain any spaces between the listed fields, with only commas separating each field. Inserting spaces before or after a field name will cause that field to be ignored.

For example:

EXTRACT ALL EXCEPT "GL*,BUDGET*" TO FILE_A

Note: As noted for the LIKE parameter above, the asterisk after entries GL and BUDGET imply exclusion of any fields whose names start with GL or BUDGET (regardless of the remainder of the field name).

EXTRACT ALL EXCEPT "GL,BUDGET??" TO FILE_A

Note: As noted for the LIKE parameter above, the question marks after BUDGET imply exclusion of any fields with 8 character names which start with BUDGET (regardless of the remainder of the field name).

Variables

The ALL parameter using EXCEPT can also be used to reference variables. To delete all variables except permanent variables:

DELETE ALL EXCEPT "_*" OK

Command Dialog Box

The All fields option is available in most field selection list boxes in both the main command dialog and also in the expanded command dialog by clicking the [More] button.

The All Records option is available by clicking the [More] button in all command dialogs, then clicking the “Limit Processing To” pull-down and selecting All Records (selected by default). This specifies that every record is to be processed.

ALL is a field parameter that selects all fields instead of specifying a long field list. The ALL field parameter is available to commands that support specifying a field list.

ALL also supports the optional qualifiers LIKE and EXCEPT to restrict fields selected, however these qualifiers are only available for use on the command line.