Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mp_lib2cards.sas File Reference

Convert all library members to CARDS files. More...

Go to the source code of this file.

Detailed Description

Gets list of members then calls the mp_ds2cards() macro. Usage:

%mp_lib2cards(lib=sashelp
    , outloc= C:\temp )

The output will be one cards file in the outloc directory per dataset in the input lib library. If the outloc directory does not exist, it is created.

To create a single SAS file with the first 1000 records of each table in a library you could use this syntax:

%mp_lib2cards(lib=sashelp
    , outloc= /tmp
    , outfile= myfile.sas
    , maxobs= 1000
)

SAS Macros

Parameters
[in]lib=() Library in which to convert all datasets
[out]outloc=(sysfunc(pathname(work))) Location in which to store output. No quotes.
[out]outfile=(0) Optional output file NAME - if provided, then will create a single output file instead of one file per input table.
[in]maxobs=(max) limit output to the first maxobs rows
Version
9.2
Author
Allan Bowe

Definition in file mp_lib2cards.sas.