%SAS2PDF

A SAS macro for converting text files to AdobeTM Acrobat® (PDF) documents

Specifications

%sas2pdf(
infile=fileref,
file=fileref,
in=fileref,
out=fileref,
ls=number,
ps=number,
maxlines=number,
maxpages=number,
charset=keyword,
crlf=number );

Parameters

infile=fileref
Specifies the system file name (in quotes), or fileref, of the input text file.
file=fileref
Specifies the system file name (in quotes), or fileref, of the file where the PDF output will be written.
in=fileref
alternative keyword for the infile parameter.
out=fileref
alternative keyword for the file parameter.
ls=number
Specifies the number of characters per line in the input text file. This is used in conjunction with the ps parameter to determine an appropriate font size for the output file
ps=number
Specifies the number of lines per page in the input text file. This is used in conjunction with the ls parameter to determine an appropriate font size for the output file
maxlines=number
specifies a maximum number of lines per page. This is used to allocate memory to store individual pages during processing. exceeding this value causes a "Array subscript out of range" error. This defaults to the value of the ps parameter.
maxpages=number
specifies the maximum number of pages that can be processed from a single text file. This is used to allocate an array of 8-byte numerics--1 per page--to retain the offsets of each page. The default is 10,000 pages.
charset=number
Specifies the character set to use for output. All output is generated in the host platform's native character set. This parameter is used to choose the correct character for the left and right square brackets ("[", "]"), which are not always translated correctly when transferring files between platforms (specifically between EBCDIC and ASCII). This parameter can usually be left unspecified, unless the output file is intended to be transferred between platforms (see Usage Notes below). The following characters sets are defined:
crlf=number
Specifies the number of characters in a "newline" on this platform. The default is 2 for Windows ('0A0D'x), 2 for MVS (anticipating transfer to windows platform), and 1 for everything else ('0A'x, i.e. unix systems)

Usage Notes

Bugs