Contents Developing Windows Clients  

ResultPackage Object

A package of outputs such as HTML pages, datasets and external files.

ResultPackage Full Description

Attributes

Container Property
CreationDateTime Property
ExpirationDateTime Property
Description Property
Abstract Property
NameValues Property
BrowseOnly Property
EntryCount Property
Transport Property
TransportInformation Property

Methods

Close Method
GetProperties Method
GetNameValuePairs Method
ListEntries Method
GetEntry Method
AddEntry Method
AddFileEntry Method
AddHTMLEntry Method
AddLibraryMemberEntry Method
AddReferenceEntry Method
AddViewerEntry Method
ExpandViewer Method
GetDependency Method
Publish Method
PublishReturningPackage Method

Description

This object enables you to view, update, and add entries to a result package, as well as publish the result package. A result package is a collection of SAS System outputs such as HTML pages, SAS datasets and external files. The result package also contains meta-information such as a description, abstract and user-specified name/value pairs.

Besides merely collecting the information, the SAS System has flexible means for communicating the package to other users and applications via transports such as e-mail, disk filesystems and message-oriented middleware. At the highest level, the SAS Publishing Framework provides a network-wide infrastructure for publish/subscribe operations using result packages. You will need to refer to the various other sections of the SAS Integration Technologies documentation set for a full explanation of all the programming an administration options. This section is design to provide the details on who these SAS System features can be made available to IOM clients.

The object can be used in one of two modes, which are distinguished by the BrowseOnly property.

It can be used to browse a result package which is under the control of a transport. For example, calling the BrowseResultPackage method of the ResultPackageService to examine a package stored in an archive file on disk (the "TO_ARCHIVE" transport) returns a result package that is in read only mode. Packages owned by the transport do not support most forms of modification. Adding a viewer with ExpandViewer is the only case where modification is allowed.

The second mode of operation is package construction. The CreateResultPackage method of the ResultPackageService creates an empty package to which you can add or copy entries. You will typically want to Publish the package when you are finished constructing it.


ResultPackage_1_1 Object

A package of outputs such as HTML pages, datasets and external files.

ResultPackage_1_1 Full Description

Attributes

Container Property
CreationDateTime Property
ExpirationDateTime Property
Description Property
Abstract Property
NameValues Property
BrowseOnly Property
EntryCount Property
Transport Property
TransportInformation Property

Methods

Close Method
GetProperties Method
GetNameValuePairs Method
ListEntries Method
GetEntry Method
AddEntry Method
AddFileEntry Method
AddHTMLEntry Method
AddLibraryMemberEntry Method
AddReferenceEntry Method
AddViewerEntry Method
ExpandViewer Method
GetDependency Method
Publish Method
PublishReturningPackage Method
AddEntry_2 Method
AddFileEntry_2 Method
AddHTMLEntry_2 Method

Description



Readonly Property Container

The parent of this object.

Type: Object

Description

Use this property to navigate back to the parent of this result package. For most result packages, this will be the ResultPackageService. For nested result packages it will be the containing ResultPackage.

Example

Usage


Readonly Property CreationDateTime

Result package creation datetime.

Type: Date

Description

This property indicates the result package creation date and time. The creation datetime is assigned when the result package is published. The value is in UTC (not local) time.

Example

Usage


Readonly Property ExpirationDateTime

The date and time at which the result package is scheduled to expire.

Type: Date

Description

This property indicates the date and time on which the result package is scheduled to expire. The expiration datetime is assigned when the result package is created. The value should be stored and interpreted in UTC (not local) time.

Example

Usage


Readonly Property Description

Result package description.

Type: String

Description

Use this attribute to obtain the result package's description. This description is typically a single line summary of the package contents. It is assigned by the package's creator.

Example

Usage


Readonly Property Abstract

Result package abstract text.

Type: String

Description

Use this property to obtain the abstract text for this result package. Analogous to the abstract of a technical paper, the result package abstract is typically a paragraph length overview of the contents of the package. It is also assigned by the package's creator.

Example

Usage


Readonly Property NameValues

Result package name/value pairs.

Type: String

Description

Use this property to obtain the name/value pairs that are associated with this result package. The creator of the package often assigns these to support subsequent package retrieval in search operations, but they could be used for other purposes as well.

This property returns the name/value pairs in the form of a single string such as "author=ASmith confidential depts=(sales,marketing)".

Example

Usage

If you prefer to get these in a parsed form, use GetNameValuePairs.


Readonly Property BrowseOnly

True when result package may be browsed only (no updates).

Type: Boolean

Description

Use this property to determine if this result package is read only.

When you call the BrowseResultPackage method of the ResultPackageService, you obtain a ResultPackage that is owned by the specified transport. Packages that are owned by a transport can be browsed but not changed (see ExpandViewer for the sole exception to this rule).

When you call the CreateResultPackage method of the ResultPackageService, you obtain an empty package to which you will add or copy entries. Packages of this type, which are under construction for subsequent publication, will have the BrowseOnly property set to false.

Example

Usage


Readonly Property EntryCount

Number of entries in this result package.

Type: Long

Description

Use this property to obtain the number of entries in this result package.

Example

Usage


Readonly Property Transport

Identifies the transport from which this result package was loaded.

Type: String

Description

Use this property to obtain the name of the transport which manages this result package (see BrowseResultPackage and DeleteResultPackage). The property value will be an empty (zero length) string if the package is under construction (see BrowseOnly).

Example

Usage


Readonly Property TransportInformation

The name that is used by the transport to identify this result package.

Type: String

Description

Use this property to obtain the information (that is, some form of name) which identifies the result package to a transport (see BrowseResultPackage and DeleteResultPackage). This will be empty for packages that are being constructed (see BrowseOnly).

Example

Usage


Method Close

Close this result package object.

Description

Call this method to close the ResultPackage object. When this ResultPackage object is closed, all of its children (such as result package entries and streams opened against them) are closed as well.

Usage

Parameters: None

Example

See Also


Method GetProperties

Returns result package properties that are needed by the transport.

Description

Call this method to return a two-dimensional string array that contains additional control properties that are needed by the transport to identify or manage the package.

Usage

This is method is not useful for packages that are under construction.

Parameters

Name Direction Type Description
properties  out  String(row,col)  This output parameter is a two-dimensional array of transport-specific strings. These strings provide additional information that the transport needs to access or manage this result package. Column 0 represents the transport property names. Column 1 contains the corresponding values. See BrowseResultPackage for more details about possible properties and their values. An empty array is returned for packages that are still under construction (see BrowseOnly).  

Example

See Also


Method GetNameValuePairs

User or application control information for the package.

Description

Call this method to return a two-dimensional string array containing the parsed name/value pairs. These name/value pairs provide user or application control information describing the package.

Usage

These are often used in keyword search operations against a large group of packages that comprises an organizational knowledge base.

Parameters

Name Direction Type Description
nvPairs  out  String(row,col)  This output parameter returns the two-dimensional string array of name/value pairs.

For the name/value pair string: "author=ASmith confidential depts=(sales,marketing)" this array would contain:

                 Column 0        Column 1
        Row 0    "author"        "ASmith"
        Row 1    "confidential"  ""
        Row 2    "depts"         "sales"
        Row 3                    "marketing"

Thus, names without values have an empty string in column 1. Names with multiple values have all values after the first indicated by empty strings in column 0.  

Example

See Also


Method ListEntries

List the entries contained in this result package.

Description

Call this method to obtain the type and description for each result package entry. If no ListEntries::filter is specified, then the returned list will contain information for all result package entries.

Usage

Parameters

Name Direction Type Description
filter  in  String  This input parameter is a filtering expression which selects a subset of the package's entries. Supply an empty string if you want to retrieve the full set of entries. See the SAS Integration Technologies - Application Facilities documentation for details on the filtering expression syntax.  
entryType  out  PackageType(index)  Contains the PackageType constant that identifies the entry type.  
description  out  String(index)  Contains the description associated with the entry.  
index  out  Long(index)  Entry index to use when retrieving an entry via GetEntry. The index can differ from the returned array index when a filter is specified.  

Example

See Also


Method GetEntry

Navigate to one of the package's entries.

Description

This method obtains a particular result package entry as indicated by the GetEntry::index parameter.

Usage

Parameters

Name Direction Type Description
index  in  Long  The zero-based index of the desired result package entry.  

Returns Object

The selected result package entry object.

Example

See Also


Method AddEntry

Adds a new entry which is a copy of another entry.

Description

Call this method to add a new entry which is a copy of some existing entry. The existing entry can be from the same result package or from a different one, as long as the package is being accessed within the same Workspace.

You cannot use this method to add a ResultPackageViewerEntry. Use AddViewerEntry instead.

Only result packages which are under construction support the addition of new entries. If the containing ResultPackage is read only (see BrowseOnly), then this call will fail.

Usage

Parameters

Name Direction Type Description
entryHandle  in  Object  The existing entry that will be copied. Only entries of packages being accessed via this Workspace can be copied.  

Returns Object

The newly added entry within this result package.

Example

See Also


Method AddFileEntry

Creates a new file entry within the result package.

Description

Call this method to add a new file entry to this result package. A file entry copies the contents of an external file along with related descriptive information such as the file's name and its MIME type. The new ResultPackageFileEntry is returned from a successful call.

Usage

Parameters

Name Direction Type Description
description  in  String  A description that you are assigning to the new entry.  
nameValues  in  String  This parameter is a string of name/value pairs to be saved with the new entry. These name/value pairs provide user or application control information describing the entry.

The syntax allows for names (keywords) to be provided without values, with a single value or with multiple values. Here is an example name/value pair string:

   "region=east projection productIDs=(gz320, gz340)"
 
fileNameType  in  FileSpecType  A FileSpecType value that indicates whether the AddFileEntry::filename specifies a physical file name or a SAS fileref.  
filename  in  String  The name of the file whose contents are being copied to create the new result package entry.  
isText  in  Boolean  Indicates whether the file is text (true) or binary (false).  
MIMEType  in  String  Assigns the MIME type to associate with this file entry.  

Returns ResultPackageFileEntry

Returns the newly created ResultPackageFileEntry object.

Example

See Also

ResultPackageFileEntry


Method AddHTMLEntry

Creates a new ODS HTML set entry within the result package.

Description

Call this method to add a new ODS HTML set entry to this result package. This entry includes each of the HTML entities (body, frame, contents and page) that are created by ODS. The new ResultPackageHTMLEntry is returned from a successful call.

Usage

Parameters

Name Direction Type Description
description  in  String  A description that you are assigning to the new entry.  
nameValues  in  String  This parameter is a string of name/value pairs to be saved along with the new entry. These name/value pairs provide user or application control information describing the entry.

The syntax allows for names (keywords) to be provided without values, with a single value or with multiple values. Here is an example name/value pair string:

   "region=east projection productIDs=(gz320, gz340)"
 
bodyNameType  in  FileSpecType  A FileSpecType value that indicates whether the AddHTMLEntry::bodyName specifies a physical file name or a SAS fileref.  
bodyName  in  String  Use this parameter to name the HTML file or files whose contents are being copied as a body item of the new HTML set entry. When ODS produces multiple body files with sequential numbering, you can incorporate all of those files by adding an asterick to the end of the base name. See the SAS Integration Technologies - Application Facilities documentation for details about how to specify multiple body files.  
bodyURL  in  String  The URL (or URLs) to associate with the body of the HTML set. When you use an asterick to specify multiple body files, you should also use an asterick to specify their URLs.  
frameNameType  in  FileSpecType  A FileSpecType value that indicates whether the AddHTMLEntry::frameName specifies a physical file name or a SAS fileref.  
frameName  in  String  The name of the HTML file whose contents are being copied as the frame of the new result package entry.  
frameURL  in  String  The URL to associate with the frame of the HTML set.  
contentsNameType  in  FileSpecType  A FileSpecType value that indicates whether the AddHTMLEntry::contentsName specifies a physical file name or a SAS fileref.  
contentsName  in  String  The name of the HTML file whose contents are being copied as the table of contents of the new result package entry.  
contentsURL  in  String  The URL to associated with the contents stream.  
pageNameType  in  FileSpecType  A FileSpecType value that indicates whether the AddHTMLEntry::pageName specifies a physical file name or a SAS fileref.  
pageName  in  String  The name of the HTML file whose contents are being copied as the table of pages section for the new result package entry.  
pageURL  in  String  The URL to associate with the pages section of the HTML set.  
encoding  in  String  Identifies the encoding of the stored HTML.  

Returns ResultPackageHTMLEntry

The newly created ResultPackageHTMLEntry object for the HTML set.

Example

See Also


Method AddLibraryMemberEntry

Creates a new SAS library member entry within the result package.

Description

Call this method to add a new SAS library member entry to this result package. This entry can hold any of the following member types: DATASET, CATALOG, MDDB, FDB, DMDB or VIEW (PROC SQL views). Like other result package entries, it also holds descriptive information such as name/value pairs, the libref, the member name and the member type. The new ResultPackageLibraryMemberEntry is returned from a successful call.

Usage

Parameters

Name Direction Type Description
description  in  String  A description that you are assigning to the new entry.  
nameValues  in  String  This parameter is a string of name/value pairs to be saved along with the new entry. These name/value pairs provide user or application control information describing the entry.

The syntax allows for names (keywords) to be provided without values, with a single value or with multiple values. Here is an example name/value pair string:

   "region=east projection productIDs=(gz320, gz340)"
 
properties  in  String(row,col)  A two-dimensional array that contains properties and their values. These properties control options in the publishing process, such as whether to use the Comma Separated Value (CSV) format when publishing a dataset. Column 0 represents the property names. Column 1 contains the corresponding values. See the SAS Integration Technologies - Application Facilities documentation for more details about the properties and their values.  
memberType  in  String  One of "CATALOG", "DATA", "DMDB", "FDB", "MDDB", or "VIEW". Identifies the type of the library member.  
libname  in  String  The libref from which the member is copied when the new entry is added.  
member  in  String  The name of the member that is copied to create the new entry.  

Returns ResultPackageLibraryMemberEntry

Returns the newly created ResultPackageLibraryMemberEntry object.

Example

See Also


Method AddReferenceEntry

Creates a new reference entry within the result package.

Description

Call this method to add a new reference entry to this result package. A reference entry simply identifies (references) some data or file (such as a web page) that is external to the package. The new entry contains a type string (such as "URL") and an identifier string (such as "http://jsmith.pc.alpair.com/odsftpf.htm"). The new ResultPackageReferenceEntry is returned from a successful call.

Usage

Parameters

Name Direction Type Description
description  in  String  A description that you are assigning to the new entry.  
nameValues  in  String  This parameter is a string of name/value pairs to be saved along with the new entry. These name/value pairs provide user or application control information describing the entry.

The syntax allows for names (keywords) to be provided without values, with a single value or with multiple values. Here is an example name/value pair string:

   "region=east projection productIDs=(gz320, gz340)"
 
referenceType  in  String  A string describing the type of reference - currently either "HTML" or "URL".  
reference  in  String  A string (such as "http://jsmith.pc.alpair.com/odsftpf.htm") identifying the referenced file or data.  

Returns ResultPackageReferenceEntry

Returns the newly created ResultPackageReferenceEntry object.

Example

See Also


Method AddViewerEntry

Return a new result package viewer entry.

Description

Call this method to add a viewer entry to this result package. A viewer is a template that can be used to expand the other members of the package into a human-readable form (only HTML presently supported). The new ResultPackageViewerEntry is returned from a successful call.

Usage

Parameters

Name Direction Type Description
description  in  String  A description that you are assigning to the new entry.  
nameValues  in  String  This parameter is a string of name/value pairs to be saved along with the new entry. These name/value pairs provide user or application control information describing the entry.

The syntax allows for names (keywords) to be provided without values, with a single value or with multiple values. Here is an example name/value pair string:

   "region=east projection productIDs=(gz320, gz340)"
 
properties  in  String(row,col)  Options to store with the viewer. See the SAS Integration Technologies - Application Facilities documentation for more details.  
fileNameType  in  FileSpecType  A FileSpecType value that indicates whether the AddViewerEntry::filename specifies a physical file name or a SAS fileref.  
filename  in  String  The name of the viewer template file whose contents are being copied into the new result package entry.  
isText  in  Boolean  A boolean indicating whether the viewer template is text (true) or binary (false).  
MIMEType  in  String  A MIME type describing the template. At present, only "text/html" is supported.  
encoding  in  String  Identifies the destination encoding for the viewer template within the new entry.  

Returns ResultPackageViewerEntry

Returns the newly created ResultPackageViewerEntry object.

Example

See Also


Method ExpandViewer

Adds a viewer entry to the loaded package using a template from an external file.

Description

This method adds a viewer entry to the loaded package using a template found in an external file. It returns a transient ResultPackageViewerEntry object which can then be used to expand the view.

If this result package is read-only, the package as found on the transport (file, message queue, etc.) is not affected. Subsequently publishing this ResultPackage (via Publish) will store the new viewer entry in the package that is published.

Thus, this method is equivalent to AddViewerEntry except that it is supported for packages that are being browsed.

Usage

Parameters

Name Direction Type Description
description  in  String  A description that you are assigning to the new entry.  
nameValues  in  String  This parameter is a string of name/value pairs to be saved along with the new entry. These name/value pairs provide user or application control information describing the entry.

The syntax allows for names (keywords) to be provided without values, with a single value or with multiple values. Here is an example name/value pair string:

   "region=east projection productIDs=(gz320, gz340)"
 
properties  in  String(row,col)  Options to store with the viewer. See the SAS Integration Technologies - Application Facilities documentation for more details.  
fileNameType  in  FileSpecType  A FileSpecType value that indicates whether the ExpandViewer::filename specifies a physical file name or a SAS fileref.  
filename  in  String  The name of the viewer template file whose contents are being copied into the new result package entry.  
isText  in  Boolean  A boolean indicating whether the viewer template is text (true) or binary (false).  
MIMEType  in  String  A MIME type describing the template. At present, only "text/html" is supported.  
encoding  in  String  Identifies the destination encoding for the viewer template within the new entry.  

Returns ResultPackageViewerEntry

Returns the newly created ResultPackageViewerEntry object.

Example

See Also


Method GetDependency

Return the object for a package entry that is expanded by the package's viewer.

Description

Call this method to obtain a package entry object for a given dependency. A viewer dependency is an entry within this package that is used by one of the package's viewers.

Usage

Parameters

Name Direction Type Description
viewerDependency  in  String  The dependency name, as returned by GetViewerDependencies, that identifies which entry to return.  

Returns Object

The result package entry object for the specified dependency.

Example

See Also


Method Publish

Publish the result package.

Description

Call this method to publish this result package. The result package is published using the specified transport.

Besides publishing packages which you have just constructed, you can also use the method to publish a package which you are browsing. Doing so copies the package to the transport and location which you specify.

Usage

Parameters

Name Direction Type Description
transport  in  String  The transport in which to publish the result package. Currently supported transports are "TO_QUEUE", "TO_EMAIL", "TO_ARCHIVE", and "TO_SUBSCRIBERS". See the SAS Integration Technologies - Application Facilities documentation for more details.  
properties  in  String(row,col)  Options which tell the transport engine how to publish the result package. See the SAS Integration Technologies - Application Facilities documentation for a description of the properties supported by each transport.

For example, to specify the physical file for the "TO_ARCHIVE" transport on a Unix server, pass an input array arranged as follows:

                 Column 0         Column 1
        Row 0    "archive_path"   "/u/user1/data"
        Row 1    "archive_name"   "sales-jan"
This would create an archive file named "/u/user1/data/sales-jan.spk".  
destinations  in  String(index)  A one dimensional string array identifying where to publish the result package. Use this parameter with the "TO_EMAIL" transport to specify the e-mail addresses of receipients or with the "TO_QUEUE" transport to specify one or more message-oriented middleware queues.  

Example

See Also


Method PublishReturningPackage

Publish the result package returning a object that represents the published result package.

Description

Call this method to publish this result package. The result package is published using the specified transport just as in Publish.

Additionally, if the destination specified allows for the published result package to be browsed, a ResultPackage object is returned representing the published result package. Not all transports support this functionality.

Besides publishing packages which you have just constructed, you can also use the method to publish a package which you are browsing. Doing so copies the package to the transport and location which you specify.

Usage

Parameters

Name Direction Type Description
transport  in  String  The transport in which to publish the result package. Currently supported transports are; "TO_QUEUE", "TO_EMAIL", "TO_ARCHIVE", and "TO_SUBSCRIBERS". See the SAS Integration Technologies - Application Facilities documentation for more details.  
properties  in  String(row,col)  Options which tell the transport engine how to publish the result package. See the SAS Integration Technologies - Application Facilities documentation for a description of the properties supported by each transport.

For example, to specify the physical file for the "TO_ARCHIVE" transport on a Unix server, pass an input array arranged as follows:

                 Column 0         Column 1
        Row 0    "archive_path"   "/u/user1/data"
        Row 1    "archive_name"   "sales-jan"
This would create an archive file named "/u/user1/data/sales-jan.spk".  
destination  in  String(index)  A one dimensional string array identifying where to publish the result package. Use this parameter with the "TO_EMAIL" transport to specify the e-mail addresses of receipients or with the "TO_QUEUE" transport to specify one or more message-oriented middleware queues.  

Returns ResultPackage

Returns the newly created ResultPackage object describing the published result package.

Example

See Also


Method AddEntry_2

Adds a new entry which is a copy of another entry.

Description

Usage

Parameters

Name Direction Type Description
entryHandle  in  Object   
properties  in  String(row,col)   

Returns Object

Example

See Also


Method AddFileEntry_2

Creates a new file entry within the result package.

Description

Usage

Parameters

Name Direction Type Description
description  in  String   
nameValues  in  String   
properties  in  String(row,col)   
fileNameType  in  FileSpecType   
filename  in  String   
isText  in  Boolean   
MIMEType  in  String   

Returns ResultPackageFileEntry

Example

See Also


Method AddHTMLEntry_2

Creates a new ODS HTML set entry within the result package.

Description

Usage

Parameters

Name Direction Type Description
description  in  String   
nameValues  in  String   
properties  in  String(row,col)  Options which tell the transport engine how to publish the HTML entry. See the SAS Integration Technologies - Application Facilities documentation (INSERT_HTML) for a description of the properties supported.

The ENCODING, COMPANION_FILE, and COMPANION_URL properties are not supported. The encoding parameter should be used instead of the ENCODING property. The AddCompanions method of the ResultPackageHTMLEntry should be used instead of the COMPANION_FILE and COMPANION_URL properties.  

bodyNameType  in  FileSpecType   
bodyName  in  String   
bodyURL  in  String   
frameNameType  in  FileSpecType   
frameName  in  String   
frameURL  in  String   
contentsNameType  in  FileSpecType   
contentsName  in  String   
contentsURL  in  String   
pageNameType  in  FileSpecType   
pageName  in  String   
pageURL  in  String   
encoding  in  String   

Returns ResultPackageHTMLEntry

Example

See Also

Contents Developing Windows Clients