language-icon Old Web
English
Sign In

RTF_READ: Decoding RTF Files

2010 
RTF has quickly become the standard medium for the production of tables and listings. RTF, while very useful to medical writers and other downstream processes, has hindered SAS® programmers in that automating QC of tables and listings seemed to become unattainable. Previously, when outputs were produced in ASCII format (.lst) the outputs could simply be read in to create a SAS dataset which could then be compared to the output dataset of the QC program. This paper presents a detailed process of decoding RTF files using SAS and generating SAS dataset(s), thus enabling us to automate QC. In this paper we explain how to identify important tokens in RTF files to extract data, convert special symbols to SAS tokens, handle complex column header spanning and distinguish between the Title and Footnote data from the normal document data. This paper employs only functions that are available in BASE/SAS though due to the nature of parsing text files this paper is aimed at an audience very familiar with complex data step processing.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    0
    References
    0
    Citations
    NaN
    KQI
    []