@sasjs/utils 3.5.1 → 3.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/file/file.js +4 -2
- package/file/file.js.map +1 -1
- package/macros/mf_abort.sas +7 -2
- package/macros/mf_deletefile.sas +1 -1
- package/macros/mf_existds.sas +1 -1
- package/macros/mf_existfileref.sas +2 -2
- package/macros/mf_existfunction.sas +1 -1
- package/macros/mf_existvar.sas +8 -4
- package/macros/mf_existvarlist.sas +2 -2
- package/macros/mf_getapploc.sas +1 -0
- package/macros/mf_getattrc.sas +2 -2
- package/macros/mf_getattrn.sas +2 -2
- package/macros/mf_getfmtlist.sas +3 -4
- package/macros/mf_getgitbranch.sas +37 -0
- package/macros/mf_getkeyvalue.sas +3 -2
- package/macros/mf_getplatform.sas +1 -1
- package/macros/mf_getschema.sas +1 -1
- package/macros/mf_getuniquelibref.sas +2 -2
- package/macros/mf_getuniquename.sas +1 -1
- package/macros/mf_getuser.sas +0 -2
- package/macros/mf_getvalue.sas +3 -3
- package/macros/mf_getvarformat.sas +2 -1
- package/macros/mf_getvarlen.sas +2 -2
- package/macros/mf_getvarnum.sas +2 -2
- package/macros/mf_getvartype.sas +2 -2
- package/macros/mf_getxengine.sas +1 -1
- package/macros/mf_increment.sas +2 -2
- package/macros/mf_isblank.sas +2 -2
- package/macros/mf_isdir.sas +1 -1
- package/macros/mf_loc.sas +6 -1
- package/macros/mf_mimetype.sas +436 -0
- package/macros/mf_mkdir.sas +1 -1
- package/macros/mf_mval.sas +2 -0
- package/macros/mf_nobs.sas +1 -1
- package/macros/mf_readfile.sas +63 -0
- package/macros/mf_trimstr.sas +2 -2
- package/macros/mf_wordsinstr1andstr2.sas +2 -2
- package/macros/mf_wordsinstr1butnotstr2.sas +2 -2
- package/macros/mf_writefile.sas +2 -2
- package/macros/mp_abort.sas +50 -13
- package/macros/mp_aligndecimal.sas +95 -0
- package/macros/mp_appendfile.sas +2 -2
- package/macros/mp_applyformats.sas +5 -5
- package/macros/mp_assert.sas +1 -1
- package/macros/mp_assertcols.sas +3 -3
- package/macros/mp_assertcolvals.sas +9 -5
- package/macros/mp_assertscope.sas +4 -4
- package/macros/mp_base64copy.sas +2 -2
- package/macros/mp_binarycopy.sas +7 -6
- package/macros/mp_chop.sas +4 -3
- package/macros/mp_cleancsv.sas +5 -4
- package/macros/mp_cntlout.sas +16 -7
- package/macros/mp_copyfolder.sas +2 -2
- package/macros/mp_createconstraints.sas +3 -3
- package/macros/mp_createwebservice.sas +1 -1
- package/macros/mp_csv2ds.sas +6 -5
- package/macros/mp_deleteconstraints.sas +5 -3
- package/macros/mp_deletefolder.sas +1 -1
- package/macros/mp_dictionary.sas +1 -1
- package/macros/mp_dirlist.sas +1 -1
- package/macros/mp_distinctfmtvalues.sas +5 -5
- package/macros/mp_ds2csv.sas +10 -1
- package/macros/mp_ds2ddl.sas +14 -2
- package/macros/mp_ds2md.sas +1 -0
- package/macros/mp_dsmeta.sas +2 -2
- package/macros/mp_filtercheck.sas +105 -16
- package/macros/mp_filtergenerate.sas +2 -2
- package/macros/mp_filterstore.sas +4 -3
- package/macros/mp_getcols.sas +6 -4
- package/macros/mp_getdbml.sas +4 -4
- package/macros/mp_getddl.sas +15 -10
- package/macros/mp_getformats.sas +13 -3
- package/macros/mp_gitlog.sas +104 -0
- package/macros/mp_gitstatus.sas +1 -1
- package/macros/mp_gsubfile.sas +6 -6
- package/macros/mp_guesspk.sas +1 -1
- package/macros/mp_hashdataset.sas +1 -1
- package/macros/mp_init.sas +1 -0
- package/macros/mp_lib2cards.sas +7 -7
- package/macros/mp_loadformat.sas +127 -47
- package/macros/mp_lockanytable.sas +31 -24
- package/macros/mp_md5.sas +3 -4
- package/macros/mp_perflog.sas +3 -3
- package/macros/mp_prevobs.sas +5 -5
- package/macros/mp_recursivejoin.sas +7 -6
- package/macros/mp_replace.sas +7 -5
- package/macros/mp_runddl.sas +3 -3
- package/macros/mp_searchcols.sas +7 -6
- package/macros/mp_stackdiffs.sas +1 -0
- package/macros/mp_storediffs.sas +8 -8
- package/macros/mp_stprequests.sas +4 -3
- package/macros/mp_stripdiffs.sas +256 -0
- package/macros/mp_testjob.sas +2 -2
- package/macros/mp_testwritespeedlibrary.sas +3 -3
- package/macros/mp_tree.sas +2 -2
- package/macros/mp_unzip.sas +5 -4
- package/macros/mp_updatevarlength.sas +3 -3
- package/macros/mp_validatecol.sas +3 -3
- package/macros/mp_wait4file.sas +1 -1
- package/macros/mp_webin.sas +1 -1
- package/macros/mp_zip.sas +5 -5
- package/package.json +5 -6
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@file
|
|
3
|
+
@brief Returns a mime type from a file extension
|
|
4
|
+
@details Provide a file extension and get a mime type.
|
|
5
|
+
The mappings were derived from this source:
|
|
6
|
+
https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@param [in] ext The file extension (unquoted)
|
|
11
|
+
@return output The mime type
|
|
12
|
+
|
|
13
|
+
@version 9.2
|
|
14
|
+
@author Allan Bowe
|
|
15
|
+
**/
|
|
16
|
+
|
|
17
|
+
%macro mf_mimetype(
|
|
18
|
+
ext
|
|
19
|
+
)/*/STORE SOURCE*/ /minoperator mindelimiter=' ';
|
|
20
|
+
|
|
21
|
+
%let ext=%lowcase(&ext);
|
|
22
|
+
|
|
23
|
+
%if &ext in (sas txt text conf def list log)
|
|
24
|
+
%then %do;%str(text/plain)%end;
|
|
25
|
+
%else %if &ext=xlsx %then %do;
|
|
26
|
+
%str(application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)%end;
|
|
27
|
+
%else %if &ext in (xls xlm xla xlc xlt xlw)
|
|
28
|
+
%then %do;%str(application/vnd.ms-excel)%end;
|
|
29
|
+
%else %if &ext=xlsm
|
|
30
|
+
%then %do;%str(application/vnd.ms-excel.sheet.macroenabled.12)%end;
|
|
31
|
+
%else %if &ext=xlsb
|
|
32
|
+
%then %do;%str(application/vnd.ms-excel.sheet.binary.macroenabled.12)%end;
|
|
33
|
+
%else %if &ext in (css csv html n3 sgml vcard)
|
|
34
|
+
%then %do;%str(text/&ext)%end;
|
|
35
|
+
%else %if &ext in (avif bmp cgm gif ief jxl ktx png sgi tiff webp)
|
|
36
|
+
%then %do;%str(image/&ext)%end;
|
|
37
|
+
%else %if &ext in (exi gxf ipfix json mbox mp21 mxf oda oxps pdf rtf sdp wasm
|
|
38
|
+
xml yang zip)
|
|
39
|
+
%then %do;%str(application/&ext)%end;
|
|
40
|
+
%else %if &ext in (jpeg jpg jpe) %then %do;%str(image/jpeg)%end;
|
|
41
|
+
%else %if &ext in (mp4 mp4v mpg4) %then %do;%str(video/mp4)%end;
|
|
42
|
+
%else %if &ext in (otf ttf woff woff2) %then %do;%str(font/&ext)%end;
|
|
43
|
+
%else %if &ext in (mpeg mpg mpe m1v m2v)
|
|
44
|
+
%then %do;%str(video/mpeg)%end;
|
|
45
|
+
%else %if &ext in (h261 h263 h264 jpm mj2 webm)
|
|
46
|
+
%then %do;%str(video/&ext)%end;
|
|
47
|
+
%else %if &ext in (f4v fli flv m4v mng smv)
|
|
48
|
+
%then %do;%str(video/x-&ext)%end;
|
|
49
|
+
%else %if &ext in (3ds cmx pcx rgb tga)
|
|
50
|
+
%then %do;%str(image/x-&ext)%end;
|
|
51
|
+
%else %if &ext in (asm nfo opml sfv)
|
|
52
|
+
%then %do;%str(text/x-&ext)%end;
|
|
53
|
+
%else %if &ext in (aac caf flac wav)
|
|
54
|
+
%then %do;%str(audio/x-&ext)%end;
|
|
55
|
+
%else %if &ext in (ts m2t m2ts mts)
|
|
56
|
+
%then %do;%str(video/mp2t)%end;
|
|
57
|
+
%else %if &ext in (pfa pfb pfm afm)
|
|
58
|
+
%then %do;%str(application/x-font-type1)%end;
|
|
59
|
+
%else %if &ext in (oga ogg spx opus)
|
|
60
|
+
%then %do;%str(audio/ogg)%end;
|
|
61
|
+
%else %if &ext in (mid midi kar rmi)
|
|
62
|
+
%then %do;%str(audio/midi)%end;
|
|
63
|
+
%else %if &ext in (onetoc onetoc2 onetmp onepkg)
|
|
64
|
+
%then %do;%str(application/onenote)%end;
|
|
65
|
+
%else %if &ext in (mxml xhvml xvml xvm)
|
|
66
|
+
%then %do;%str(application/xv+xml)%end;
|
|
67
|
+
%else %if &ext in (f for f77 f90)
|
|
68
|
+
%then %do;%str(text/x-fortran)%end;
|
|
69
|
+
%else %if &ext in (wmf wmz emf emz)
|
|
70
|
+
%then %do;%str(application/x-msmetafile)%end;
|
|
71
|
+
%else %if &ext in (exe dll com bat msi)
|
|
72
|
+
%then %do;%str(application/x-msdownload)%end;
|
|
73
|
+
%else %if &ext in (bin dms lrf mar so dist distz pkg bpk dump elc deploy)
|
|
74
|
+
%then %do;%str(application/octet-stream)%end;
|
|
75
|
+
%else %if &ext in (atom atomcat atomsvc ccxml davmount emma gml gpx inkml mads
|
|
76
|
+
mathml metalink mets mods omdoc pls rdf rsd rss sbml shf smil sru ssdl ssml
|
|
77
|
+
tei wsdl wspolicy xaml xenc xhtml xop xslt xspf yin)
|
|
78
|
+
%then %do;%str(application/&ext+xml)%end;
|
|
79
|
+
%else %if &ext in (dir dcr dxr cst cct cxt w3d fgd swa)
|
|
80
|
+
%then %do;%str(application/x-director)%end;
|
|
81
|
+
%else %if &ext in (z1 z2 z3 z4 z5 z6 z7 z8)
|
|
82
|
+
%then %do;%str(application/x-zmachine)%end;
|
|
83
|
+
%else %if &ext in (c cc cxx cpp h hh dic)
|
|
84
|
+
%then %do;%str(text/x-c)%end;
|
|
85
|
+
%else %if &ext in (mpga mp2 mp2a mp3 m2a m3a)
|
|
86
|
+
%then %do;%str(audio/mpeg)%end;
|
|
87
|
+
%else %if &ext in (t tr roff man me ms)
|
|
88
|
+
%then %do;%str(text/troff)%end;
|
|
89
|
+
%else %if &ext in (cbr cba cbt cbz cb7)
|
|
90
|
+
%then %do;%str(application/x-cbr)%end;
|
|
91
|
+
%else %if &ext in (fh fhc fh4 fh5 fh7)
|
|
92
|
+
%then %do;%str(image/x-freehand)%end;
|
|
93
|
+
%else %if &ext in (aab x32 u32 vox)
|
|
94
|
+
%then %do;%str(application/x-authorware-bin)%end;
|
|
95
|
+
%else %if &ext in (uvi uvvi uvg uvvg)
|
|
96
|
+
%then %do;%str(image/vnd.dece.graphic)%end;
|
|
97
|
+
%else %if &ext in (cdx cif cmdf cml csml xyz)
|
|
98
|
+
%then %do;%str(chemical/x-&ext)%end;
|
|
99
|
+
%else %if &ext in (aif aiff aifc) %then %do;%str(audio/x-aiff)%end;
|
|
100
|
+
%else %if &ext in (ma nb mb) %then %do;%str(application/mathematica)%end;
|
|
101
|
+
%else %if &ext in (mvb m13 m14) %then %do;%str(application/x-msmediaview)%end;
|
|
102
|
+
%else %if &ext in (msh mesh silo) %then %do;%str(model/mesh)%end;
|
|
103
|
+
%else %if &ext in (uri uris urls) %then %do;%str(text/uri-list)%end;
|
|
104
|
+
%else %if &ext in (mkv mk3d mks) %then %do;%str(video/x-matroska)%end;
|
|
105
|
+
%else %if &ext=ez %then %do;%str(application/andrew-inset)%end;
|
|
106
|
+
%else %if &ext=aw %then %do;%str(application/applixware)%end;
|
|
107
|
+
%else %if &ext=cdmia %then %do;%str(application/cdmi-capability)%end;
|
|
108
|
+
%else %if &ext=cdmic %then %do;%str(application/cdmi-container)%end;
|
|
109
|
+
%else %if &ext=cdmid %then %do;%str(application/cdmi-domain)%end;
|
|
110
|
+
%else %if &ext=cdmio %then %do;%str(application/cdmi-object)%end;
|
|
111
|
+
%else %if &ext=cdmiq %then %do;%str(application/cdmi-queue)%end;
|
|
112
|
+
%else %if &ext=cu %then %do;%str(application/cu-seeme)%end;
|
|
113
|
+
%else %if &ext=dssc %then %do;%str(application/dssc+der)%end;
|
|
114
|
+
%else %if &ext=xdssc %then %do;%str(application/dssc+xml)%end;
|
|
115
|
+
%else %if &ext=ecma %then %do;%str(application/ecmascript)%end;
|
|
116
|
+
%else %if &ext=epub %then %do;%str(application/epub+zip)%end;
|
|
117
|
+
%else %if &ext=pfr %then %do;%str(application/font-tdpfr)%end;
|
|
118
|
+
%else %if &ext=stk %then %do;%str(application/hyperstudio)%end;
|
|
119
|
+
%else %if &ext=ink %then %do;%str(application/inkml+xml)%end;
|
|
120
|
+
%else %if &ext=jar %then %do;%str(application/java-archive)%end;
|
|
121
|
+
%else %if &ext=ser %then %do;%str(application/java-serialized-object)%end;
|
|
122
|
+
%else %if &ext=class %then %do;%str(application/java-vm)%end;
|
|
123
|
+
%else %if &ext=jsonml %then %do;%str(application/jsonml+json)%end;
|
|
124
|
+
%else %if &ext=lostxml %then %do;%str(application/lost+xml)%end;
|
|
125
|
+
%else %if &ext=hqx %then %do;%str(application/mac-binhex40)%end;
|
|
126
|
+
%else %if &ext=cpt %then %do;%str(application/mac-compactpro)%end;
|
|
127
|
+
%else %if &ext=mrc %then %do;%str(application/marc)%end;
|
|
128
|
+
%else %if &ext=mrcx %then %do;%str(application/marcxml+xml)%end;
|
|
129
|
+
%else %if &ext=mscml %then %do;%str(application/mediaservercontrol+xml)%end;
|
|
130
|
+
%else %if &ext=meta4 %then %do;%str(application/metalink4+xml)%end;
|
|
131
|
+
%else %if &ext=m21 %then %do;%str(application/mp21)%end;
|
|
132
|
+
%else %if &ext=mp4s %then %do;%str(application/mp4)%end;
|
|
133
|
+
%else %if &ext=doc %then %do;%str(application/msword)%end;
|
|
134
|
+
%else %if &ext=dot %then %do;%str(application/msword)%end;
|
|
135
|
+
%else %if &ext=opf %then %do;%str(application/oebps-package+xml)%end;
|
|
136
|
+
%else %if &ext=ogx %then %do;%str(application/ogg)%end;
|
|
137
|
+
%else %if &ext=xer %then %do;%str(application/patch-ops-error+xml)%end;
|
|
138
|
+
%else %if &ext=pgp %then %do;%str(application/pgp-encrypted)%end;
|
|
139
|
+
%else %if &ext=asc %then %do;%str(application/pgp-signature)%end;
|
|
140
|
+
%else %if &ext=sig %then %do;%str(application/pgp-signature)%end;
|
|
141
|
+
%else %if &ext=prf %then %do;%str(application/pics-rules)%end;
|
|
142
|
+
%else %if &ext=p10 %then %do;%str(application/pkcs10)%end;
|
|
143
|
+
%else %if &ext=p7m %then %do;%str(application/pkcs7-mime)%end;
|
|
144
|
+
%else %if &ext=p7c %then %do;%str(application/pkcs7-mime)%end;
|
|
145
|
+
%else %if &ext=p7s %then %do;%str(application/pkcs7-signature)%end;
|
|
146
|
+
%else %if &ext=p8 %then %do;%str(application/pkcs8)%end;
|
|
147
|
+
%else %if &ext=ac %then %do;%str(application/pkix-attr-cert)%end;
|
|
148
|
+
%else %if &ext=cer %then %do;%str(application/pkix-cert)%end;
|
|
149
|
+
%else %if &ext=crl %then %do;%str(application/pkix-crl)%end;
|
|
150
|
+
%else %if &ext=pkipath %then %do;%str(application/pkix-pkipath)%end;
|
|
151
|
+
%else %if &ext=pki %then %do;%str(application/pkixcmp)%end;
|
|
152
|
+
%else %if &ext=cww %then %do;%str(application/prs.cww)%end;
|
|
153
|
+
%else %if &ext=pskcxml %then %do;%str(application/pskc+xml)%end;
|
|
154
|
+
%else %if &ext=rif %then %do;%str(application/reginfo+xml)%end;
|
|
155
|
+
%else %if &ext=rnc %then %do;%str(application/relax-ng-compact-syntax)%end;
|
|
156
|
+
%else %if &ext=rld %then %do;%str(application/resource-lists-diff+xml)%end;
|
|
157
|
+
%else %if &ext=rl %then %do;%str(application/resource-lists+xml)%end;
|
|
158
|
+
%else %if &ext=gbr %then %do;%str(application/rpki-ghostbusters)%end;
|
|
159
|
+
%else %if &ext=mft %then %do;%str(application/rpki-manifest)%end;
|
|
160
|
+
%else %if &ext=roa %then %do;%str(application/rpki-roa)%end;
|
|
161
|
+
%else %if &ext=scq %then %do;%str(application/scvp-cv-request)%end;
|
|
162
|
+
%else %if &ext=scs %then %do;%str(application/scvp-cv-response)%end;
|
|
163
|
+
%else %if &ext=spq %then %do;%str(application/scvp-vp-request)%end;
|
|
164
|
+
%else %if &ext=spp %then %do;%str(application/scvp-vp-response)%end;
|
|
165
|
+
%else %if &ext=setpay %then %do;%str(application/set-payment-initiation)%end;
|
|
166
|
+
%else %if &ext=setreg %then %do;%str(application/set-registration-initiation)%end;
|
|
167
|
+
%else %if &ext=smi %then %do;%str(application/smil+xml)%end;
|
|
168
|
+
%else %if &ext=rq %then %do;%str(application/sparql-query)%end;
|
|
169
|
+
%else %if &ext=srx %then %do;%str(application/sparql-results+xml)%end;
|
|
170
|
+
%else %if &ext=gram %then %do;%str(application/srgs)%end;
|
|
171
|
+
%else %if &ext=grxml %then %do;%str(application/srgs+xml)%end;
|
|
172
|
+
%else %if &ext=teicorpus %then %do;%str(application/tei+xml)%end;
|
|
173
|
+
%else %if &ext=tfi %then %do;%str(application/thraud+xml)%end;
|
|
174
|
+
%else %if &ext=tsd %then %do;%str(application/timestamped-data)%end;
|
|
175
|
+
%else %if &ext=vxml %then %do;%str(application/voicexml+xml)%end;
|
|
176
|
+
%else %if &ext=wgt %then %do;%str(application/widget)%end;
|
|
177
|
+
%else %if &ext=hlp %then %do;%str(application/winhlp)%end;
|
|
178
|
+
%else %if &ext=7z %then %do;%str(application/x-7z-compressed)%end;
|
|
179
|
+
%else %if &ext=abw %then %do;%str(application/x-abiword)%end;
|
|
180
|
+
%else %if &ext=ace %then %do;%str(application/x-ace-compressed)%end;
|
|
181
|
+
%else %if &ext=dmg %then %do;%str(application/x-apple-diskimage)%end;
|
|
182
|
+
%else %if &ext=aam %then %do;%str(application/x-authorware-map)%end;
|
|
183
|
+
%else %if &ext=aas %then %do;%str(application/x-authorware-seg)%end;
|
|
184
|
+
%else %if &ext=bcpio %then %do;%str(application/x-bcpio)%end;
|
|
185
|
+
%else %if &ext=torrent %then %do;%str(application/x-bittorrent)%end;
|
|
186
|
+
%else %if &ext=blb %then %do;%str(application/x-blorb)%end;
|
|
187
|
+
%else %if &ext=blorb %then %do;%str(application/x-blorb)%end;
|
|
188
|
+
%else %if &ext=bz %then %do;%str(application/x-bzip)%end;
|
|
189
|
+
%else %if &ext=bz2 %then %do;%str(application/x-bzip2)%end;
|
|
190
|
+
%else %if &ext=boz %then %do;%str(application/x-bzip2)%end;
|
|
191
|
+
%else %if &ext=vcd %then %do;%str(application/x-cdlink)%end;
|
|
192
|
+
%else %if &ext=cfs %then %do;%str(application/x-cfs-compressed)%end;
|
|
193
|
+
%else %if &ext=chat %then %do;%str(application/x-chat)%end;
|
|
194
|
+
%else %if &ext=pgn %then %do;%str(application/x-chess-pgn)%end;
|
|
195
|
+
%else %if &ext=nsc %then %do;%str(application/x-conference)%end;
|
|
196
|
+
%else %if &ext=cpio %then %do;%str(application/x-cpio)%end;
|
|
197
|
+
%else %if &ext=csh %then %do;%str(application/x-csh)%end;
|
|
198
|
+
%else %if &ext=deb %then %do;%str(application/x-debian-package)%end;
|
|
199
|
+
%else %if &ext=udeb %then %do;%str(application/x-debian-package)%end;
|
|
200
|
+
%else %if &ext=dgc %then %do;%str(application/x-dgc-compressed)%end;
|
|
201
|
+
%else %if &ext=wad %then %do;%str(application/x-doom)%end;
|
|
202
|
+
%else %if &ext=ncx %then %do;%str(application/x-dtbncx+xml)%end;
|
|
203
|
+
%else %if &ext=dtb %then %do;%str(application/x-dtbook+xml)%end;
|
|
204
|
+
%else %if &ext=res %then %do;%str(application/x-dtbresource+xml)%end;
|
|
205
|
+
%else %if &ext=dvi %then %do;%str(application/x-dvi)%end;
|
|
206
|
+
%else %if &ext=evy %then %do;%str(application/x-envoy)%end;
|
|
207
|
+
%else %if &ext=eva %then %do;%str(application/x-eva)%end;
|
|
208
|
+
%else %if &ext=bdf %then %do;%str(application/x-font-bdf)%end;
|
|
209
|
+
%else %if &ext=gsf %then %do;%str(application/x-font-ghostscript)%end;
|
|
210
|
+
%else %if &ext=psf %then %do;%str(application/x-font-linux-psf)%end;
|
|
211
|
+
%else %if &ext=pcf %then %do;%str(application/x-font-pcf)%end;
|
|
212
|
+
%else %if &ext=snf %then %do;%str(application/x-font-snf)%end;
|
|
213
|
+
%else %if &ext=arc %then %do;%str(application/x-freearc)%end;
|
|
214
|
+
%else %if &ext=spl %then %do;%str(application/x-futuresplash)%end;
|
|
215
|
+
%else %if &ext=gca %then %do;%str(application/x-gca-compressed)%end;
|
|
216
|
+
%else %if &ext=ulx %then %do;%str(application/x-glulx)%end;
|
|
217
|
+
%else %if &ext=gnumeric %then %do;%str(application/x-gnumeric)%end;
|
|
218
|
+
%else %if &ext=gramps %then %do;%str(application/x-gramps-xml)%end;
|
|
219
|
+
%else %if &ext=gtar %then %do;%str(application/x-gtar)%end;
|
|
220
|
+
%else %if &ext=hdf %then %do;%str(application/x-hdf)%end;
|
|
221
|
+
%else %if &ext=install %then %do;%str(application/x-install-instructions)%end;
|
|
222
|
+
%else %if &ext=iso %then %do;%str(application/x-iso9660-image)%end;
|
|
223
|
+
%else %if &ext=jnlp %then %do;%str(application/x-java-jnlp-file)%end;
|
|
224
|
+
%else %if &ext=latex %then %do;%str(application/x-latex)%end;
|
|
225
|
+
%else %if &ext=lzh %then %do;%str(application/x-lzh-compressed)%end;
|
|
226
|
+
%else %if &ext=lha %then %do;%str(application/x-lzh-compressed)%end;
|
|
227
|
+
%else %if &ext=mie %then %do;%str(application/x-mie)%end;
|
|
228
|
+
%else %if &ext=prc %then %do;%str(application/x-mobipocket-ebook)%end;
|
|
229
|
+
%else %if &ext=mobi %then %do;%str(application/x-mobipocket-ebook)%end;
|
|
230
|
+
%else %if &ext=application %then %do;%str(application/x-ms-application)%end;
|
|
231
|
+
%else %if &ext=lnk %then %do;%str(application/x-ms-shortcut)%end;
|
|
232
|
+
%else %if &ext=wmd %then %do;%str(application/x-ms-wmd)%end;
|
|
233
|
+
%else %if &ext=wmz %then %do;%str(application/x-ms-wmz)%end;
|
|
234
|
+
%else %if &ext=xbap %then %do;%str(application/x-ms-xbap)%end;
|
|
235
|
+
%else %if &ext=mdb %then %do;%str(application/x-msaccess)%end;
|
|
236
|
+
%else %if &ext=obd %then %do;%str(application/x-msbinder)%end;
|
|
237
|
+
%else %if &ext=crd %then %do;%str(application/x-mscardfile)%end;
|
|
238
|
+
%else %if &ext=clp %then %do;%str(application/x-msclip)%end;
|
|
239
|
+
%else %if &ext=mny %then %do;%str(application/x-msmoney)%end;
|
|
240
|
+
%else %if &ext=pub %then %do;%str(application/x-mspublisher)%end;
|
|
241
|
+
%else %if &ext=scd %then %do;%str(application/x-msschedule)%end;
|
|
242
|
+
%else %if &ext=trm %then %do;%str(application/x-msterminal)%end;
|
|
243
|
+
%else %if &ext=wri %then %do;%str(application/x-mswrite)%end;
|
|
244
|
+
%else %if &ext=nc %then %do;%str(application/x-netcdf)%end;
|
|
245
|
+
%else %if &ext=cdf %then %do;%str(application/x-netcdf)%end;
|
|
246
|
+
%else %if &ext=nzb %then %do;%str(application/x-nzb)%end;
|
|
247
|
+
%else %if &ext=p12 %then %do;%str(application/x-pkcs12)%end;
|
|
248
|
+
%else %if &ext=pfx %then %do;%str(application/x-pkcs12)%end;
|
|
249
|
+
%else %if &ext=p7b %then %do;%str(application/x-pkcs7-certificates)%end;
|
|
250
|
+
%else %if &ext=spc %then %do;%str(application/x-pkcs7-certificates)%end;
|
|
251
|
+
%else %if &ext=p7r %then %do;%str(application/x-pkcs7-certreqresp)%end;
|
|
252
|
+
%else %if &ext=rar %then %do;%str(application/x-rar-compressed)%end;
|
|
253
|
+
%else %if &ext=ris %then %do;%str(application/x-research-info-systems)%end;
|
|
254
|
+
%else %if &ext=sh %then %do;%str(application/x-sh)%end;
|
|
255
|
+
%else %if &ext=shar %then %do;%str(application/x-shar)%end;
|
|
256
|
+
%else %if &ext=swf %then %do;%str(application/x-shockwave-flash)%end;
|
|
257
|
+
%else %if &ext=xap %then %do;%str(application/x-silverlight-app)%end;
|
|
258
|
+
%else %if &ext=sql %then %do;%str(application/x-sql)%end;
|
|
259
|
+
%else %if &ext=sit %then %do;%str(application/x-stuffit)%end;
|
|
260
|
+
%else %if &ext=sitx %then %do;%str(application/x-stuffitx)%end;
|
|
261
|
+
%else %if &ext=srt %then %do;%str(application/x-subrip)%end;
|
|
262
|
+
%else %if &ext=sv4cpio %then %do;%str(application/x-sv4cpio)%end;
|
|
263
|
+
%else %if &ext=sv4crc %then %do;%str(application/x-sv4crc)%end;
|
|
264
|
+
%else %if &ext=t3 %then %do;%str(application/x-t3vm-image)%end;
|
|
265
|
+
%else %if &ext=gam %then %do;%str(application/x-tads)%end;
|
|
266
|
+
%else %if &ext=tar %then %do;%str(application/x-tar)%end;
|
|
267
|
+
%else %if &ext=tcl %then %do;%str(application/x-tcl)%end;
|
|
268
|
+
%else %if &ext=tex %then %do;%str(application/x-tex)%end;
|
|
269
|
+
%else %if &ext=tfm %then %do;%str(application/x-tex-tfm)%end;
|
|
270
|
+
%else %if &ext=texinfo %then %do;%str(application/x-texinfo)%end;
|
|
271
|
+
%else %if &ext=texi %then %do;%str(application/x-texinfo)%end;
|
|
272
|
+
%else %if &ext=obj %then %do;%str(application/x-tgif)%end;
|
|
273
|
+
%else %if &ext=ustar %then %do;%str(application/x-ustar)%end;
|
|
274
|
+
%else %if &ext=src %then %do;%str(application/x-wais-source)%end;
|
|
275
|
+
%else %if &ext=der %then %do;%str(application/x-x509-ca-cert)%end;
|
|
276
|
+
%else %if &ext=crt %then %do;%str(application/x-x509-ca-cert)%end;
|
|
277
|
+
%else %if &ext=fig %then %do;%str(application/x-xfig)%end;
|
|
278
|
+
%else %if &ext=xlf %then %do;%str(application/x-xliff+xml)%end;
|
|
279
|
+
%else %if &ext=xpi %then %do;%str(application/x-xpinstall)%end;
|
|
280
|
+
%else %if &ext=xz %then %do;%str(application/x-xz)%end;
|
|
281
|
+
%else %if &ext=xdf %then %do;%str(application/xcap-diff+xml)%end;
|
|
282
|
+
%else %if &ext=xht %then %do;%str(application/xhtml+xml)%end;
|
|
283
|
+
%else %if &ext=xsl %then %do;%str(application/xml)%end;
|
|
284
|
+
%else %if &ext=dtd %then %do;%str(application/xml-dtd)%end;
|
|
285
|
+
%else %if &ext=xpl %then %do;%str(application/xproc+xml)%end;
|
|
286
|
+
%else %if &ext=adp %then %do;%str(audio/adpcm)%end;
|
|
287
|
+
%else %if &ext=au %then %do;%str(audio/basic)%end;
|
|
288
|
+
%else %if &ext=snd %then %do;%str(audio/basic)%end;
|
|
289
|
+
%else %if &ext=m4a %then %do;%str(audio/mp4)%end;
|
|
290
|
+
%else %if &ext=mp4a %then %do;%str(audio/mp4)%end;
|
|
291
|
+
%else %if &ext=s3m %then %do;%str(audio/s3m)%end;
|
|
292
|
+
%else %if &ext=sil %then %do;%str(audio/silk)%end;
|
|
293
|
+
%else %if &ext=uva %then %do;%str(audio/vnd.dece.audio)%end;
|
|
294
|
+
%else %if &ext=uvva %then %do;%str(audio/vnd.dece.audio)%end;
|
|
295
|
+
%else %if &ext=eol %then %do;%str(audio/vnd.digital-winds)%end;
|
|
296
|
+
%else %if &ext=dra %then %do;%str(audio/vnd.dra)%end;
|
|
297
|
+
%else %if &ext=dts %then %do;%str(audio/vnd.dts)%end;
|
|
298
|
+
%else %if &ext=dtshd %then %do;%str(audio/vnd.dts.hd)%end;
|
|
299
|
+
%else %if &ext=lvp %then %do;%str(audio/vnd.lucent.voice)%end;
|
|
300
|
+
%else %if &ext=pya %then %do;%str(audio/vnd.ms-playready.media.pya)%end;
|
|
301
|
+
%else %if &ext=ecelp4800 %then %do;%str(audio/vnd.nuera.ecelp4800)%end;
|
|
302
|
+
%else %if &ext=ecelp7470 %then %do;%str(audio/vnd.nuera.ecelp7470)%end;
|
|
303
|
+
%else %if &ext=ecelp9600 %then %do;%str(audio/vnd.nuera.ecelp9600)%end;
|
|
304
|
+
%else %if &ext=rip %then %do;%str(audio/vnd.rip)%end;
|
|
305
|
+
%else %if &ext=weba %then %do;%str(audio/webm)%end;
|
|
306
|
+
%else %if &ext=mka %then %do;%str(audio/x-matroska)%end;
|
|
307
|
+
%else %if &ext=m3u %then %do;%str(audio/x-mpegurl)%end;
|
|
308
|
+
%else %if &ext=wax %then %do;%str(audio/x-ms-wax)%end;
|
|
309
|
+
%else %if &ext=wma %then %do;%str(audio/x-ms-wma)%end;
|
|
310
|
+
%else %if &ext=ra %then %do;%str(audio/x-pn-realaudio)%end;
|
|
311
|
+
%else %if &ext=ram %then %do;%str(audio/x-pn-realaudio)%end;
|
|
312
|
+
%else %if &ext=rmp %then %do;%str(audio/x-pn-realaudio-plugin)%end;
|
|
313
|
+
%else %if &ext=xm %then %do;%str(audio/xm)%end;
|
|
314
|
+
%else %if &ext=ttc %then %do;%str(font/collection)%end;
|
|
315
|
+
%else %if &ext=g3 %then %do;%str(image/g3fax)%end;
|
|
316
|
+
%else %if &ext=btif %then %do;%str(image/prs.btif)%end;
|
|
317
|
+
%else %if &ext=svg %then %do;%str(image/svg+xml)%end;
|
|
318
|
+
%else %if &ext=svgz %then %do;%str(image/svg+xml)%end;
|
|
319
|
+
%else %if &ext=tif %then %do;%str(image/tiff)%end;
|
|
320
|
+
%else %if &ext=psd %then %do;%str(image/vnd.adobe.photoshop)%end;
|
|
321
|
+
%else %if &ext=djv %then %do;%str(image/vnd.djvu)%end;
|
|
322
|
+
%else %if &ext=djvu %then %do;%str(image/vnd.djvu)%end;
|
|
323
|
+
%else %if &ext=sub %then %do;%str(image/vnd.dvb.subtitle)%end;
|
|
324
|
+
%else %if &ext=dwg %then %do;%str(image/vnd.dwg)%end;
|
|
325
|
+
%else %if &ext=dxf %then %do;%str(image/vnd.dxf)%end;
|
|
326
|
+
%else %if &ext=fbs %then %do;%str(image/vnd.fastbidsheet)%end;
|
|
327
|
+
%else %if &ext=fpx %then %do;%str(image/vnd.fpx)%end;
|
|
328
|
+
%else %if &ext=fst %then %do;%str(image/vnd.fst)%end;
|
|
329
|
+
%else %if &ext=mmr %then %do;%str(image/vnd.fujixerox.edmics-mmr)%end;
|
|
330
|
+
%else %if &ext=rlc %then %do;%str(image/vnd.fujixerox.edmics-rlc)%end;
|
|
331
|
+
%else %if &ext=mdi %then %do;%str(image/vnd.ms-modi)%end;
|
|
332
|
+
%else %if &ext=wdp %then %do;%str(image/vnd.ms-photo)%end;
|
|
333
|
+
%else %if &ext=npx %then %do;%str(image/vnd.net-fpx)%end;
|
|
334
|
+
%else %if &ext=wbmp %then %do;%str(image/vnd.wap.wbmp)%end;
|
|
335
|
+
%else %if &ext=xif %then %do;%str(image/vnd.xiff)%end;
|
|
336
|
+
%else %if &ext=ras %then %do;%str(image/x-cmu-raster)%end;
|
|
337
|
+
%else %if &ext=ico %then %do;%str(image/x-icon)%end;
|
|
338
|
+
%else %if &ext=sid %then %do;%str(image/x-mrsid-image)%end;
|
|
339
|
+
%else %if &ext=pct %then %do;%str(image/x-pict)%end;
|
|
340
|
+
%else %if &ext=pic %then %do;%str(image/x-pict)%end;
|
|
341
|
+
%else %if &ext=pnm %then %do;%str(image/x-portable-anymap)%end;
|
|
342
|
+
%else %if &ext=pbm %then %do;%str(image/x-portable-bitmap)%end;
|
|
343
|
+
%else %if &ext=pgm %then %do;%str(image/x-portable-graymap)%end;
|
|
344
|
+
%else %if &ext=ppm %then %do;%str(image/x-portable-pixmap)%end;
|
|
345
|
+
%else %if &ext=xbm %then %do;%str(image/x-xbitmap)%end;
|
|
346
|
+
%else %if &ext=xpm %then %do;%str(image/x-xpixmap)%end;
|
|
347
|
+
%else %if &ext=xwd %then %do;%str(image/x-xwindowdump)%end;
|
|
348
|
+
%else %if &ext=eml %then %do;%str(message/rfc822)%end;
|
|
349
|
+
%else %if &ext=mime %then %do;%str(message/rfc822)%end;
|
|
350
|
+
%else %if &ext=iges %then %do;%str(model/iges)%end;
|
|
351
|
+
%else %if &ext=igs %then %do;%str(model/iges)%end;
|
|
352
|
+
%else %if &ext=dae %then %do;%str(model/vnd.collada+xml)%end;
|
|
353
|
+
%else %if &ext=dwf %then %do;%str(model/vnd.dwf)%end;
|
|
354
|
+
%else %if &ext=gdl %then %do;%str(model/vnd.gdl)%end;
|
|
355
|
+
%else %if &ext=gtw %then %do;%str(model/vnd.gtw)%end;
|
|
356
|
+
%else %if &ext=vtu %then %do;%str(model/vnd.vtu)%end;
|
|
357
|
+
%else %if &ext=vrml %then %do;%str(model/vrml)%end;
|
|
358
|
+
%else %if &ext=wrl %then %do;%str(model/vrml)%end;
|
|
359
|
+
%else %if &ext=x3db %then %do;%str(model/x3d+binary)%end;
|
|
360
|
+
%else %if &ext=x3dbz %then %do;%str(model/x3d+binary)%end;
|
|
361
|
+
%else %if &ext=x3dv %then %do;%str(model/x3d+vrml)%end;
|
|
362
|
+
%else %if &ext=x3dvz %then %do;%str(model/x3d+vrml)%end;
|
|
363
|
+
%else %if &ext=x3d %then %do;%str(model/x3d+xml)%end;
|
|
364
|
+
%else %if &ext=x3dz %then %do;%str(model/x3d+xml)%end;
|
|
365
|
+
%else %if &ext=appcache %then %do;%str(text/cache-manifest)%end;
|
|
366
|
+
%else %if &ext=ics %then %do;%str(text/calendar)%end;
|
|
367
|
+
%else %if &ext=ifb %then %do;%str(text/calendar)%end;
|
|
368
|
+
%else %if &ext=htm %then %do;%str(text/html)%end;
|
|
369
|
+
%else %if &ext=js %then %do;%str(text/javascript)%end;
|
|
370
|
+
%else %if &ext=mjs %then %do;%str(text/javascript)%end;
|
|
371
|
+
%else %if &ext=dsc %then %do;%str(text/prs.lines.tag)%end;
|
|
372
|
+
%else %if &ext=rtx %then %do;%str(text/richtext)%end;
|
|
373
|
+
%else %if &ext=sgm %then %do;%str(text/sgml)%end;
|
|
374
|
+
%else %if &ext=tsv %then %do;%str(text/tab-separated-values)%end;
|
|
375
|
+
%else %if &ext=ttl %then %do;%str(text/turtle)%end;
|
|
376
|
+
%else %if &ext=curl %then %do;%str(text/vnd.curl)%end;
|
|
377
|
+
%else %if &ext=dcurl %then %do;%str(text/vnd.curl.dcurl)%end;
|
|
378
|
+
%else %if &ext=mcurl %then %do;%str(text/vnd.curl.mcurl)%end;
|
|
379
|
+
%else %if &ext=scurl %then %do;%str(text/vnd.curl.scurl)%end;
|
|
380
|
+
%else %if &ext=sub %then %do;%str(text/vnd.dvb.subtitle)%end;
|
|
381
|
+
%else %if &ext=fly %then %do;%str(text/vnd.fly)%end;
|
|
382
|
+
%else %if &ext=flx %then %do;%str(text/vnd.fmi.flexstor)%end;
|
|
383
|
+
%else %if &ext=gv %then %do;%str(text/vnd.graphviz)%end;
|
|
384
|
+
%else %if &ext=3dml %then %do;%str(text/vnd.in3d.3dml)%end;
|
|
385
|
+
%else %if &ext=spot %then %do;%str(text/vnd.in3d.spot)%end;
|
|
386
|
+
%else %if &ext=jad %then %do;%str(text/vnd.sun.j2me.app-descriptor)%end;
|
|
387
|
+
%else %if &ext=wml %then %do;%str(text/vnd.wap.wml)%end;
|
|
388
|
+
%else %if &ext=wmls %then %do;%str(text/vnd.wap.wmlscript)%end;
|
|
389
|
+
%else %if &ext=s %then %do;%str(text/x-asm)%end;
|
|
390
|
+
%else %if &ext=java %then %do;%str(text/x-java-source)%end;
|
|
391
|
+
%else %if &ext=p %then %do;%str(text/x-pascal)%end;
|
|
392
|
+
%else %if &ext=pas %then %do;%str(text/x-pascal)%end;
|
|
393
|
+
%else %if &ext=etx %then %do;%str(text/x-setext)%end;
|
|
394
|
+
%else %if &ext=uu %then %do;%str(text/x-uuencode)%end;
|
|
395
|
+
%else %if &ext=vcs %then %do;%str(text/x-vcalendar)%end;
|
|
396
|
+
%else %if &ext=vcf %then %do;%str(text/x-vcard)%end;
|
|
397
|
+
%else %if &ext=3gp %then %do;%str(video/3gpp)%end;
|
|
398
|
+
%else %if &ext=3g2 %then %do;%str(video/3gpp2)%end;
|
|
399
|
+
%else %if &ext=jpgv %then %do;%str(video/jpeg)%end;
|
|
400
|
+
%else %if &ext=jpgm %then %do;%str(video/jpm)%end;
|
|
401
|
+
%else %if &ext=mjp2 %then %do;%str(video/mj2)%end;
|
|
402
|
+
%else %if &ext=ogv %then %do;%str(video/ogg)%end;
|
|
403
|
+
%else %if &ext=mov %then %do;%str(video/quicktime)%end;
|
|
404
|
+
%else %if &ext=qt %then %do;%str(video/quicktime)%end;
|
|
405
|
+
%else %if &ext=uvh %then %do;%str(video/vnd.dece.hd)%end;
|
|
406
|
+
%else %if &ext=uvvh %then %do;%str(video/vnd.dece.hd)%end;
|
|
407
|
+
%else %if &ext=uvm %then %do;%str(video/vnd.dece.mobile)%end;
|
|
408
|
+
%else %if &ext=uvvm %then %do;%str(video/vnd.dece.mobile)%end;
|
|
409
|
+
%else %if &ext=uvp %then %do;%str(video/vnd.dece.pd)%end;
|
|
410
|
+
%else %if &ext=uvvp %then %do;%str(video/vnd.dece.pd)%end;
|
|
411
|
+
%else %if &ext=uvs %then %do;%str(video/vnd.dece.sd)%end;
|
|
412
|
+
%else %if &ext=uvvs %then %do;%str(video/vnd.dece.sd)%end;
|
|
413
|
+
%else %if &ext=uvv %then %do;%str(video/vnd.dece.video)%end;
|
|
414
|
+
%else %if &ext=uvvv %then %do;%str(video/vnd.dece.video)%end;
|
|
415
|
+
%else %if &ext=dvb %then %do;%str(video/vnd.dvb.file)%end;
|
|
416
|
+
%else %if &ext=fvt %then %do;%str(video/vnd.fvt)%end;
|
|
417
|
+
%else %if &ext=m4u %then %do;%str(video/vnd.mpegurl)%end;
|
|
418
|
+
%else %if &ext=mxu %then %do;%str(video/vnd.mpegurl)%end;
|
|
419
|
+
%else %if &ext=pyv %then %do;%str(video/vnd.ms-playready.media.pyv)%end;
|
|
420
|
+
%else %if &ext=uvu %then %do;%str(video/vnd.uvvu.mp4)%end;
|
|
421
|
+
%else %if &ext=uvvu %then %do;%str(video/vnd.uvvu.mp4)%end;
|
|
422
|
+
%else %if &ext=viv %then %do;%str(video/vnd.vivo)%end;
|
|
423
|
+
%else %if &ext=asf %then %do;%str(video/x-ms-asf)%end;
|
|
424
|
+
%else %if &ext=asx %then %do;%str(video/x-ms-asf)%end;
|
|
425
|
+
%else %if &ext=vob %then %do;%str(video/x-ms-vob)%end;
|
|
426
|
+
%else %if &ext=wm %then %do;%str(video/x-ms-wm)%end;
|
|
427
|
+
%else %if &ext=wmv %then %do;%str(video/x-ms-wmv)%end;
|
|
428
|
+
%else %if &ext=wmx %then %do;%str(video/x-ms-wmx)%end;
|
|
429
|
+
%else %if &ext=wvx %then %do;%str(video/x-ms-wvx)%end;
|
|
430
|
+
%else %if &ext=avi %then %do;%str(video/x-msvideo)%end;
|
|
431
|
+
%else %if &ext=movie %then %do;%str(video/x-sgi-movie)%end;
|
|
432
|
+
%else %if &ext=ice %then %do;%str(x-conference/x-cooltalk)%end;
|
|
433
|
+
%else %if "&ext"="in" %then %do;%str(text/plain)%end;
|
|
434
|
+
%else %do;%str(application/octet-stream)%end;
|
|
435
|
+
|
|
436
|
+
%mend mf_mimetype;
|
package/macros/mf_mkdir.sas
CHANGED
package/macros/mf_mval.sas
CHANGED
package/macros/mf_nobs.sas
CHANGED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
@file
|
|
3
|
+
@brief Reads the first line of a file using pure macro
|
|
4
|
+
@details Reads the first line of a file and returns it. Future versions may
|
|
5
|
+
read each line into a macro variable array.
|
|
6
|
+
|
|
7
|
+
Generally, reading data into macro variables is not great as certain
|
|
8
|
+
nonprintable characters (such as CR, LF) may be dropped in the conversion.
|
|
9
|
+
|
|
10
|
+
Usage:
|
|
11
|
+
|
|
12
|
+
%mf_writefile(&sasjswork/myfile.txt,l1=some content,l2=more content)
|
|
13
|
+
|
|
14
|
+
%put %mf_readfile(&sasjswork/myfile.txt);
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@param [in] fpath Full path to file to be read
|
|
18
|
+
|
|
19
|
+
<h4> Related Macros </h4>
|
|
20
|
+
@li mf_deletefile.sas
|
|
21
|
+
@li mf_writefile.sas
|
|
22
|
+
@li mf_readfile.test.sas
|
|
23
|
+
|
|
24
|
+
@version 9.2
|
|
25
|
+
@author Allan Bowe
|
|
26
|
+
**/
|
|
27
|
+
/** @cond */
|
|
28
|
+
|
|
29
|
+
%macro mf_readfile(fpath
|
|
30
|
+
)/*/STORE SOURCE*/;
|
|
31
|
+
%local fref rc fid fcontent;
|
|
32
|
+
|
|
33
|
+
/* check file exists */
|
|
34
|
+
%if %sysfunc(filename(fref,&fpath)) ne 0 %then %do;
|
|
35
|
+
%put &=fref &=fpath;
|
|
36
|
+
%put %str(ERR)OR: %sysfunc(sysmsg());
|
|
37
|
+
%return;
|
|
38
|
+
%end;
|
|
39
|
+
|
|
40
|
+
%let fid=%sysfunc(fopen(&fref,I));
|
|
41
|
+
|
|
42
|
+
%if &fid=0 %then %do;
|
|
43
|
+
%put %str(ERR)OR: %sysfunc(sysmsg());
|
|
44
|
+
%return;
|
|
45
|
+
%end;
|
|
46
|
+
|
|
47
|
+
%if %sysfunc(fread(&fid)) = 0 %then %do;
|
|
48
|
+
%let rc=%sysfunc(fget(&fid,fcontent,65534));
|
|
49
|
+
&fcontent
|
|
50
|
+
%end;
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
%do %while(%sysfunc(fread(&fid)) = 0);
|
|
54
|
+
%let rc=%sysfunc(fget(&fid,fcontent,65534));
|
|
55
|
+
&fcontent
|
|
56
|
+
%end;
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
%let rc=%sysfunc(fclose(&fid));
|
|
60
|
+
%let rc=%sysfunc(filename(&fref));
|
|
61
|
+
|
|
62
|
+
%mend mf_readfile;
|
|
63
|
+
/** @endcond */
|
package/macros/mf_trimstr.sas
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
<h4> SAS Macros </h4>
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
@param basestr The string to be modified
|
|
15
|
-
@param trimstr The string to be removed from the end of `basestr`, if it
|
|
14
|
+
@param [in] basestr The string to be modified
|
|
15
|
+
@param [in] trimstr The string to be removed from the end of `basestr`, if it
|
|
16
16
|
exists
|
|
17
17
|
|
|
18
18
|
@return output returns result with the value of `trimstr` removed from the end
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
returns:
|
|
14
14
|
> blah blaaah brah
|
|
15
15
|
|
|
16
|
-
@param str1= string containing words to extract
|
|
17
|
-
@param str2= used to compare with the extract string
|
|
16
|
+
@param [in] str1= () string containing words to extract
|
|
17
|
+
@param [in] str2= () used to compare with the extract string
|
|
18
18
|
|
|
19
19
|
@warning CASE SENSITIVE!
|
|
20
20
|
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
returns:
|
|
17
17
|
> sss bram boo
|
|
18
18
|
|
|
19
|
-
@param [in] str1=
|
|
20
|
-
@param [in] str2=
|
|
19
|
+
@param [in] str1= () String containing words to extract
|
|
20
|
+
@param [in] str2= () Used to compare with the extract string
|
|
21
21
|
|
|
22
22
|
@version 9.2
|
|
23
23
|
@author Allan Bowe
|
package/macros/mf_writefile.sas
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
@param [in] mode= (O) Available options are A or O as follows:
|
|
22
22
|
@li A APPEND mode, writes new records after the current end of the file.
|
|
23
23
|
@li O OUTPUT mode, writes new records from the beginning of the file.
|
|
24
|
-
@param [in] l1= First line
|
|
25
|
-
@param [in] l2= Second line (etc through to l10)
|
|
24
|
+
@param [in] l1= () First line
|
|
25
|
+
@param [in] l2= () Second line (etc through to l10)
|
|
26
26
|
|
|
27
27
|
<h4> Related Macros </h4>
|
|
28
28
|
@li mf_writefile.test.sas
|