Production Ready Macros for SAS Application Developers
https://github.com/sasjs/core
mm_tree.sas File Reference

Returns all folders / subfolder content for a particular root. More...

Go to the source code of this file.

Detailed Description

Shows all members and SubTrees for a particular root.

Model:

metauri char(64),
name char(256) format=$256. informat=$256. label='name',
path char(1024),
publictype char(32),
MetadataUpdated char(32),
MetadataCreated char(32)

Usage:

%* load macros;
filename mc url "https://raw.githubusercontent.com/sasjs/core/main/all.sas";
%inc mc;

%* export everything;
%mm_tree(root= ,outds=iwantthisdataset)

%* export everything in a specific folder;
%mm_tree(root=%str(/my/folder) ,outds=stuff)

%* export only folders;
%mm_tree(root=%str(/my/folder) ,types=Folder ,outds=stuf)

%* show only exportable content;
%mm_tree(root=%str(/) ,types=EXPORTABLE ,outds=exportable)

%* with specific types;
%mm_tree(root=%str(/my/folder)
  ,types= 
      DeployedJob 
      ExternalFile 
      Folder 
      Folder.SecuredData 
      GeneratedTransform 
      InformationMap.Relational 
      Job 
      Library 
      Prompt 
      StoredProcess
      Table
  ,outds=morestuff)

Dependencies

Parameters
root=the parent folder under which to return all contents
outds=the dataset to create that contains the list of directories
types=Space-seperated, unquoted list of types for filtering the output. Special types:

ALl - return all types (the default) EXPORTABLE - return only the content types that can be exported in an SPK

Version
9.4
Author
Allan Bowe

Definition in file mm_tree.sas.