Publish Package Interface |
Inserts HTML files into a package.
CALL INSERT_HTML(packageId, body, bodyUrl, frame, frameUrl, contents, contentsUrl, page, pageUrl, desc, nameValue, rc<, properties, propValue1, ...propValueN>);
properties
parameter. Valid property values are defined as follows:
Note: All files in the specified directory will be included as companion files.
Alternatively, you can specify "NONE" as the GPATH_URL property value. If the value of "NONE" is specified, only the file name is used as the URL.
Note: If GPATH_URL is specified, you must also specify the GPATH property.
Note: The NESTED_NAME property is valid only when publishing to the WebDAV-compliant server transport.
The files that may be inserted include the body, frame, contents, and page files.
When the NEWFILE= option is specified in the ODS HTML statement, ODS may generate multiple body files. When ODS generates multiple body files it uses a numeric file naming sequence of the general form: bodyfilenameNumber, as in body1.html, body2.html, body3.html. To insert an entire sequence of body files, use the following syntax:
FILENAME: bodyFilename*.extension
When an asterisk is specified in the body
parameter, an asterisk
should also be specified in the bodyUrl
parameter. For further
information on ODS, refer to SAS Language: Reference and
SAS Language Reference: Concepts.
The following example generates ODS files and inserts those files into a package.
Desc='HTML output for payroll processing'; nameValue = ''; filename f '/users/f.html'; filename c '/users/c.html'; filename b '/users/b.html'; filename p '/users/p.html'; ods html frame=f contents=c(url='c.html') body=b(url='b.html') page=p(url='p.html'); /* insert SAS statements here to generate ODS output */ ods html close; CALL INSERT_HTML(packageId, 'fileref:b', "b.html", 'fileref:f', "f.html", 'fileref:c', "c.html", 'fileref:p', "p.html", desc, nameValue, rc);
The following example replaces the INSERT_HTML CALL routine in the example above with another version of the CALL routine that inserts ODS files using the ENCODING property. In this case the ENCODING property specifies the ISO-Latin-1 character set.
Desc='HTML output for payroll processing'; nameValue = ''; CALL INSERT_HTML(packageId, 'fileref:b', "b.html", 'fileref:f', "f.html", 'fileref:c', "c.html", 'fileref:p', "p.html", desc, nameValue, rc, "encoding", "ISO-8859-1");
The following example specifies a character set encoding and adds two HTML files to the original set of inserted files.
Desc='HTML output for payroll processing'; nameValue = ''; properties='encoding, companion_file, companion_file'; encodingV = "ISO-88591-1"; file1 = "filename: report.html"; file2 = "filename: dept.html"; CALL INSERT_HTML(packageId, 'fileref:b', "b.html", 'fileref:f', "f.html", 'fileref:c', "c.html", 'fileref:p', "p.html", desc, nameValue, rc, properties, encodingV, file1, file2);
The following example uses an asterisk (*) to specify that all body files are to be included in the set of inserted HTML files. The naming sequence used is the same as the naming sequence used in ODS. So the files body.html, body1.html, body2.html and so on (for all files found in this sequence), will be published. See the SAS Language Reference: Concepts for further information on the ODS naming sequence used in conjunction with the NEWLINE= option.
Desc='HTML output for payroll processing'; nameValue = ''; CALL INSERT_HTML(packageId, 'filename:/users/jsmith/body*.html', "body*.html", 'fileref:f', "f.html", 'fileref:c', "c.html", 'fileref:p', "p.html", desc, nameValue, rc);
Publish Package Interface |