The `%mp_ds2ddl` macro acts as a simplified interface for the more generic `%mp_getddl` macro. It takes a complete library and dataset reference (`libds`) as input, then extracts the library and dataset name. A verification mechanism is in place to default to the `WORK` library if no library is explicitly provided in the `libds` parameter. All other parameters (`fref`, `flavour`, `showlog`, `schema`, `applydttm`) are directly passed to the underlying `%mp_getddl` macro, which is effectively responsible for the DDL generation logic.
Data Analysis
Type : INTERNE
The macro operates on an existing SAS table specified by the `libds` parameter. It does not introduce new data or read external files not managed by the script itself. Data is assumed to be already available in the SAS environment when the macro is called.
1 Code Block
MACRO MP_DS2DDL
Explanation : This block defines the `%mp_ds2ddl` macro. It starts by declaring a local `libref` variable. It then converts the `libds` parameter value to uppercase. The macro extracts the 'libref' part from `libds`. If `libds` contains only a table name (no library specified), it prefixes `WORK.` to form a complete reference. Finally, it calls the `%mp_getddl` macro, passing it the extracted library and table name, as well as all other received parameters.
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Copyright Info : Copyright 2010-2023 HMS Analytical Software GmbH, http://www.analytical-software.de
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.