34   ,
outpath=%sysfunc(pathname(WORK))
    39 %let type=%upcase(&type);
    42 ods 
package open nopf;
    44 %
if &type=FILE %then %
do;
    45   ods 
package add file="&in" mimetype="application/x-compress";
    47 %
else %
if &type=DIRECTORY %then %
do;
    48   %mp_dirlist(path=&in,outds=_data_)
    52     length __command $4000;
    53     if file_or_folder=
'file';
    54     command=cats(
'ods package add file="',filepath
    55       ,
'" mimetype="application/x-compress";');
    56     call execute(command);
    59   %
if &debug=NO %then %
do;
    60     proc sql; drop table &ds;quit;
    63 %
else %
if &type=DATASET %then %
do;
    66     length __command $4000;
    67     command=cats(
'ods package add file="',&incol
    68       ,
'" mimetype="application/x-compress";');
    69     call execute(command);
    71   ods 
package add file="&in" mimetype="application/x-compress";
    75 ods 
package publish archive properties
    76   (archive_name="&outname..zip" archive_path="&outpath");