hi ... Tom's suggestion is a very good one if you want to leave it as an RTF file, you could try the following (you did not give much guidance as to what you meant about the contents of the eventual data set, so I made some guesses using the attached RTF file) ... since I know next to nothing about the PRX functions, there are likely less cumbersome ways to extract the data ... * use DDE to place the RTF file in the clipboard; filename word DDE 'winword|system' notab; data _null_; file word; put '[FileOpen .Name = "' "z:\test.rtf" '"]'; put "[EditSelectAll]"; put "[EditCopy]"; put '[FileClose]'; run; filename x clipbrd; * read clipboard contents with a data step; data x; length info $50; rc = prxparse("/ \d+/"); infile x end=done; do until(done); input; if find(_infile_,'(' ) then do; trt1a = input(left(scan(_infile_,-6,'() ')),12.); trt1b = input(left(scan(_infile_,-5,'() ')),12.); trt2a = input(left(scan(_infile_,-4,'() ')),12.); trt2b = input(left(scan(_infile_,-3,'() ')),12.); tota = input(left(scan(_infile_,-2,'() ')),12.); totb = input(left(scan(_infile_,-1,'() ')),12.); call prxsubstr(rc,_infile_,start); info = left(substrn(_infile_,1,start)); output; end; end; drop start rc; run; filename x clear; info trt1a trt1b trt2a trt2b tota totb Subjects with >=1 Concomitant Med 100 99.6 900 98.8 1000 99.2 3-OXOANDROSTEN (4) DERIVATIVES 8 0.8 1 0.2 9 0.5 TESTOSTERONE 4 0.8 7 0.2 5 0.5 ACE INHIBITORS AND CALCIUM CHANNEL BLOCKERS 7 1.2 2 0.4 9 0.8 AMLODIPINE BESYLATE W/BENAZEPRIL HYDROCHLOR. 9 1.2 2 0.4 8 0.8 ACE INHIBITORS AND DIURETICS 63 1.2 0 0.0 63 0.6 BI PREDONIUM 27 0.4 0 0.0 2 0.2 CIBADREX 10 0.2 0 0.0 1 0.1 SALUTEC 14 0.2 0 0.0 1 0.1 ZESTORETIC 2 0.4 0 0.0 2 0.2 ACE INHIBITORS, PLAIN 104 20.6 115 22.7 219 21.6 BENAZEPRIL 8 1.6 6 1.2 14 1.4 CAPTOPRIL 5 1.0 2 0.4 7 0.7 CILAZAPRIL 1 0.2 0 0.0 1 0.1 ENALAPRIL 20 4.0 32 6.3 52 5.1
... View more