Chapter Contents |
Previous |
Next |
The BUILD Procedure |
Restriction: | The PRINT statement can print the contents of CBT, HELP, LIST, MENU, PROGRAM, SCL, and SOURCE entries. It cannot print the contents of FRAME, CLASS, RANGE, and RESOURCE entries or of any other entry types that are not supported by the BUILD procedure. |
Note: | The print operation is performed before the procedure opens any windows. |
Tip: | By default, the procedure attempts to print all entries in the current catalog (the catalog that was specified in the PROC BUILD statement). You can use the SELECT= option to select individual entries to print, or use the EXCLUDE= option to prevent certain entries from being printed. |
PRINT
items
|
where items must be one or more of the following:
ATTR | |
DISPLAY<SHOWPAD> | |
LISTDIR | |
SOURCE |
Required Arguments |
You must always supply at least one of the following arguments with the PRINT statement. Any combination of the following arguments can be specified.
For PROGRAM entries, user fields in the display are by default represented by their respective field names. Use the SHOWPAD option in conjunction with the DISPLAY option to represent user fields by their corresponding pad characters instead.
For LIST entries, the values in the list are printed.
Options |
You can use the following options in the PRINT statement:
To print entries of more than one type, use a separate PRINT statement for each entry type.
If you use the ENTRYTYPE= option in the same PRINT statement, you can omit the entry-type portion of the entry specification for the EXCLUDE= or SELECT= options because only entries of the type specified in the ENTRYTYPE= option can be printed.
When you use the SELECT= option to print CBT or MENU entries, you can also use the XREF option to print two cross-reference tables for each MENU or CBT entry. One table lists all entries that are called by that entry, and the other table lists all entries that call the entry.
Each PRINT statement can include only one EXCLUDE= option or one SELECT= option. However, you can use multiple PRINT statements with the same PROC BUILD statement.
Note: The LINENUM option is valid only when
SOURCE is specified for the items argument .
Note: The NOPAGEBREAK option is valid
only when SOURCE is specified for the items argument
.
By default, if output is sent to a print file that already exists, the output overwrites the current contents of the file. Add the APPEND option to append printed output to the end of the file if it already exists.
Using the PRINT Statement |
You can use the PRINT statement to generate hardcopy documentation of the displays, attributes, and source code in your applications. By default, output is sent to the default printer or to the printer specified in the FORM= option. You can use the PRTFILE= option to route output to a file instead.
PRINT Statement Examples |
The following example shows how to print the DISPLAY window views for two entries, GETFIELD.PROGRAM and GETTYPE.PROGRAM. Pad characters are printed to show the DISPLAY windows as users see them. Because the PRTFILE= option is not specified, the output is sent to the default printer. This example uses batch mode, which is the optimum way to print entries when you do not need to view the catalog or its entries.
proc build cat=mylib.mycat batch; print display showpad et=program select=(getfield gettype); run;
The following example shows how to print the SCL source programs for all PROGRAM entries in the MYLIB.MYCAT catalog except GETFIELD.PROGRAM and GETTYPE.PROGRAM. Because the BATCH option is not specified, the Explorer window opens after the printing is performed so that you can work in the BUILD session.
proc build cat=mylib.newcat; print source etype=program exclude=(getfield gettype); run;
The following example prints a cross reference of entries that call or are called by the MAIN.MENU entry. Output is routed to the file identified by the fileref MENUREF, which you must have previously assigned.
proc build cat=mylib.newcat batch; print xref select=main.menu prtfile=menuref; run;
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.