Re: Storing SAS-programs and -macros in SAS-datasets on a HOST-platform #4

SI provide an example of using a sas catalog as if it were a pds
(as a "aggregate storage location"), in the onlinedoc at
(this is a 9.1.3 link, but the example is valid since before sas v8)

However, sas catalogs don't (neccessarily) make cross/platform
operations easier. A program is usually a lot smaller that the
space it takes up in a sas catalog as a source entry. If you have
a lot of programs, the proc upload or download time may become
less welcome ;-)

"Aggregate storage location" syntax seems to have been abandoned
by the Enhanced-Editor, but remains a most convenient method for
%include-ing programs. It also can remove platform dependancy, by
the use of a logical reference rather than physical paths.

Peter Crawford

On Tue, 5 Oct 2004 18:45:43 -0500, Pudding Man <pudding.man@GMAIL.COM>

>On Tue, 5 Oct 2004 09:57:46 -0700, Jesper Sahner
><jespersahner@hotmail.com> wrote:
>> Hi!
>> Ususally SAS-programs and -macros on a HOST-platform are stored in
>> PDS-datasets, which are not SAS-datasets. However I am interested in
>> storing programs in a regular SAS-dataset in the same way tables and
>> formats are stored. Is that possible? (this should be easy in SCL -
>> which I am not familiar with - but how do you do it in Base-SAS?
>> I believe that storing programs this way makes it easier to
>> communicate with other platforms (e.g. PC-platforms) in the sense,
>> that PDS-datasets are specific to HOST-platforms, while SAS-datasets
>> are the same across platforms.
>Native SAS datasets on ebcdic (i.e. mainframe) systems
>cannot be read (as SAS datasets) on non-ebcdic systems.
>Storage of source code in SAS catalogs is certainly relevant
>and has been amply illustrated. Particularly for source
>modules requiring no mods, this may be viable for you.
>Most SAS source-program modules contain i/o (i.e. FILENAME,
>LIBNAME, JCL) and perhaps other statements that would
>require modification on other (i.e. pc) platforms. Also,
>many programmers need a ready means of searching the code
>in the various modules for specific strings and/or statements.
>Can one search all entries in a SAS source catalog for a
>particular string?
>For these reasons and general convenience, you might want to
>consider a more traditional approach to tranferring source
>code modules to a differing platform.
>One can "unload" a PDS using PROC SOURCE (or IBM utility
>IEBCOPY) on the mainframe. This creates a flat file with a
>definition line (module name, etc) followed by the source
>code (for each PDS module selected). If the platforms support
>ftp, the flat file can be transferred to, say, your pc in
>the same batch step.
>On the target platform it is relatively easy to write a SAS
>program to "reload" the modules to a directory using INFILE,
>INPUT, and FILE xxx FILEVAR= statements in a data step. So,
>if your PDS was stored as UID.PROJECTX.CNTL on the
>mainframe, you could store the reloaded code in, say,
>c:\mySAS\MVS_ProjectX on a pc, using the same or similar
>module names. I probably have some code lying around
>somewhere ...
>Thereafter one can use -all- the native facilities of the
>target platform (search, editors, SAS DM, etc) to find and
>modify the needed code. My guess is that this would be
>easier than trying to search/edit code stored in a SAS
>catalog ('tho some might prefer the latter).
>  Skoal,
>  Puddin'
>*** Puddin' Man      PuddingDotMan at GmailDotCom  ***
10/7/2004 12:17:40 PM
comp.soft-sys.sas 140428 articles. 1 followers. Post Follow

0 Replies

Similar Articles

[PageSpeed] 39