Macro to Replace a Default Output Specification

You can create a macro to function in place of multiple data definition items. For example, data definition items can be set up by variable names and only one macro with the name 1 is required to display default headings for LIST and SORT type commands.

Creating a Default Definition Item Macro

  1. Create the required data definition items in the file's dictionary, using names rather than numbers.

  2. Create a macro definition item, naming the item 1.

  3. On line one, enter the macro code "M".

  4. On line two, enter the names of the data definition items previously defined in the dictionary. The names must be separated by spaces.

  5. If required, enter other clauses, calls to other macros, or comments on subsequent lines.

Example

For this example assume the following data definition items:

   NAME          ADDR          PHONE
001 A 001 A 001 A
002 1 002 2 002 3
003 Name 003 Address 003 Phone No.
. . .
009 L 009 L 009 L
010 30 010 30 010 16

The following are macro definition items 1 and HEAD:

    1
001 M                         Macro code
002 NAME ADDR PHONE           Data Definition Item names
003 HEAD                      Call to another macro
HEAD
001 M
002 * Default heading for CUST
003 HEADING "Customer File as of 'C' 'D' 'L'"

When the following sentence, which does not have an output specification clause, is entered, the system looks for definition 1. Macro 1 calls macro HEAD.

:LIST CUST

Customers File as of 01 MARCH 1994
CUST  :  1
Name      Moutagne et Cie
Address   33 Rue de Chevre, Paris
Phone No. 22-44-678
CUST  :  2
Name      Sowieso GMBH
Address   60 Orber Str., Essen
Phone No. 05-66-777
CUST  :  3
Name      Main Supply Inc.
Address   2200 Main St., Chicago
Phone No. (312) 555-8000
CUST  :  4
Name      Katnip Inc.
Address   100 Valley Blvd., LA
Phone No. (818) 888-9000