SAS 9.1.3 Integration Technologies » Developer's Guide


SAS Publisher
Requirements
How SAS Publisher Works
Starting SAS Publisher
Publishing a Package
Defining Package Content
Specifying Package Destination
Specifying Package Format
Using SAS Publisher with SAS/Warehouse Administrator
Publishing Framework

Adding a SAS Data Set to a Package

If you specify SAS Data Set as the item type in the Specify Item to Insert window, additional fields and an additional button appear in the Specify Item to Insert window.

  1. Specify the format for the SAS data set by clicking the appropriate Packaging Format for Dataset button:

    Native SAS Dataset
    maintains SAS data in a proprietary format that is necessary for continued data processing in a SAS environment.

    Comma Separated Value
    specifies a delimiter character that SAS Publisher uses to separate data columns, which is useful when exporting SAS data to an external application, such as a third-party spreadsheet. A comma is the default delimiter.

    If you choose a comma-separated list format, you can accept the default delimiter or enter an alternative delimiter in the Separator to Use for CSV field. You can also specify whether to exclude variable names, labels, or both from the file by clicking the appropriate check boxes.

  2. Identify the instance of the item to be included in the package. Click the Select Data Set to Publish button to display the Select a Member window, which works similarly to an Explorer window and lets you navigate a directory structure so that you can locate and select the item to be included in the package.

    Select a data set and click OK. The Select a Member window closes, and the name of the data set appears automatically in the Select Data Set to Publish field in the Specify Item to Insert window.

  3. You can also specify a description and a name/value pair. For details, see Adding an Item (Specify Item to Insert).

  4. In the Data Set Options field, specify options as a text string in the following form:
       option1=value option2=value ...

    For example:

       pw='born2run' keep=empno

    Surround string values, such as a password, with single quotation marks.

    You can specify a value for data set options that apply to a data set that is opened for input.

    The following are examples of options that you can specify in this field.

    • GENNUM=
    • LABEL=
    • OUTREP=
    • SORTEDBY=
    • TOBSNO=
    • TRANTAB=
    • PW=
    • READ=
    • WRITE=
    • ALTER=
    • FIRSTOBS=
    • OBS=
    • WHERE=
    • IDXNAME=
    • IDXWHERE=
    • DROP=
    • KEEP=
    • RENAME=

    For a complete list of data set options, refer to the SAS Data Set Options topic in either the SAS Online Help, Release 9.0, or the SAS Release 9 online documentation.

  5. To include either a read- or password-protected data set in the package, check Allow Read Protected Data Sets to be Published.

    If the data set that you specify is read-protected, you must also assign a password value to the PW= data set option. This is the same password that the user must supply to access the read-protected data set when retrieving the package. Publishing fails if you do not select the check box or specify a valid password. If you do not select the check box, the SAS log contains the following message:

       Publish of package failed - 
          ERROR:  Unable to publish read protected data set

  6. From the Specify Item to Insert window, click OK again to return to the What to Publish tab to continue specifying the package.