BookmarkSubscribeRSS Feed
Sudhakar_A
Calcite | Level 5
Hi,

I was trying to read the rtf table output and i want to convert them in to sas dataset for the validation purpose.

Can anyone help me to read the rtf files in to sas.

Thanks in advance
9 REPLIES 9
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
I searched the SAS support http://support.sas.com/ website using Google advanced search argument:

read rtf file site:sas.com


and the SAS conference technical paper below discusses this topic:

Save Those Eyes: A Quality-Control Utility for Checking RTF Output Immediately
And Accurately
http://www2.sas.com/proceedings/sugi31/066-31.pdf


Scott Barry
SBBWorks, Inc.
Sudhakar_A
Calcite | Level 5
Hi Scott,

Thanks for the document i tried this document its working fine. but only for RTF specification type 1.6 version. There are many types of RTF Spec from 1.6 to 1.8.

I want to read any type of RTF file(Any versions).

Thanks in advance
Sudhakar
Cynthia_sas
SAS Super FREQ
Hi:
Page 4 of the paper, which Scott referenced, outlines the macro program logic. For the places where the other RTF specifications differ from RTF 1.6, you would need to investigate those specifications and then alter your macro program accordingly.

I believe that ODS RTF creates RTF 1.6 output. I'm not sure whether TAGSETS.RTF also creates RTF 1.6 output; however you could check with Tech Support to be sure.

cynthia
Sudhakar_A
Calcite | Level 5
hi cynthia,

Thank you for the logic which you gave but i tried it before. It was some thing different from the earlier version. There are many difference between RTF version 1.6 and the other one.

FYI: SAS is generating RTF Version 1.6 files only.

If you can open the same RTF table output generated in SAS with windows 2003 and Windows XP. If you open that with NOTEPAD you can see a lot of difference between them. I need to learn entire RTF spec for 1.6, 1.8 and so on... for converting to SAS dataset. Its keep on changing.

Three factors which plays a role in creating the RTF files
1. SAS
2. Operating system ( even same opearting system with different service packs)
3. Microsoft Word installed in the System

I am looking for the consistent way of converting.

Anyway thanks for help.

Sudhakar
Duong
Obsidian | Level 7
Hi Sudharka

This paper describe a method I believe is more general. That is it should not matter
which versions or platforms.


http://www.lexjansen.com/phuse/2008/po/po03.pdf


Regards
Duong
www.tranz.co.uk
Florian_Dymatrix
Calcite | Level 5
Hi Duong,

very interesting tool! Same question as Doc, where could I download the SAS macro %RTFParser?

Thanks, Florian
Doc_Duke
Rhodochrosite | Level 12
Duong,

Where can we download %RTFParser . The paper makes it look like an interesting tool.

Doc Muhlbaier
Duke
HimaAalamuri
Fluorite | Level 6

Dear all,

Now i am trying to solve this problem. please any one help me how to over come with this problem converting RTF file to SAS dataset. please give me a peace of code for this example. i grow through with all related articles but i dn't solution.

Study:XXXX Date: todaydate

Listing 10-3

Demographics

___________________________________________________________________________________

Subject/Age/Sex                             Treatment start

                                                        Date

____________________________________________________________________________________                             

0001-001/45/M                             19Jan2013

0001-002/55/M                             29Jan2013

0001-003/43/M                             12Jan2013

0001-004/42/M                             15Jan2013

0001-005/55/M                             29Jan2013

0001-006/35/M                             16Jan2013

                       

Note: All patients are shown.

Thanks in advance!!

With Regards,

Hima

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 9370 views
  • 1 like
  • 8 in conversation