Prints the contents of entries from the catalog specified in the PROC BUILD statement.
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. |
You must always supply at least one of the following arguments with the PRINT statement. Any combination of the following arguments can be specified.
must be one or more of the following: ATTR, DISPLAY<SHOWPAD>, LISTDIR, SOURCE
prints all of the attribute information that is associated with each entry.
prints a listing of the contents of the catalog specified in the PROC BUILD statement.
Alias | LD |
prints the SAS Component Language source code from each PROGRAM, SCL, or SOURCE entry.
Alias | SRC |
You can use the following options in the PRINT statement:
specifies the type of entry to print. By default, all CBT, HELP, LIST, MENU, PROGRAM, SCL, and SOURCE entries in the current catalog are printed (unless you also use the SELECT= or EXCLUDE= option). Use the ENTRYTYPE= option to print only entries of the specified type.
Alias | ETYPE, ET |
specify catalog entries to exclude from or select for printing. By default, all CBT, HELP, LIST, MENU, PROGRAM, SCL, and SOURCE entries in the current catalog are printed (unless you also use the ENTRYTYPE= option). Use the EXCLUDE= option to prevent specified entries from being printed. Use the SELECT= option to print only specified entries. If you specify more than one entry for either of these options, enclose the list in parentheses and separate the names with spaces.
specifies the name of a FORM entry to control the output generated by the PRINT statement. Specify either a one- or three-level name for form-name. A one-level name is assumed to be the name of a FORM entry in the current catalog. If the FORM entry is in a different catalog, use a three-level name (libref.catalog-name.entry-name). The default is the standard system form, SASHELP.FSP.DEFAULT.FORM.
specifies that output produced by the PRINT statement is aligned at the left margin of the page or print file. By default, output is indented four spaces.
prints entries without page breaks. By default, a page break is generated each time the number of lines per page defined by your FORMS entry is reached, and each page of the program listing has a page header. Blank lines are printed at the end of the program listing until the specified page length is reached. Use the NOPAGEBREAK option to print the program listing without page breaks. Headers are printed only at the top of the entry and every 32,768 lines thereafter.
specifies a file to receive the output of the PRINT statement. By default, output is sent to the default printer or to the printer specified in the form identified in the FORM= option. Use the PRTFILE= option to redirect the output to a file instead. Specify the print file using either
proc build cat=mylib.mycat batch; print display showpad et=program select=(getfield gettype); run;
proc build cat=mylib.newcat; print source etype=program exclude=(getfield gettype); run;