%rtf2data : A utility macro to convert RTF Table to SAS ® dataset

2010 
Often in the pharmaceutical industry, we face the challenge of reverse engineering, where we have archived summary Tables or Listings in the form of RTF Table, however the programs that led to their generation are untraceable. In scenarios like these or when there is a need to perform extended statistical analyses on the RTF Table data or when it is critical to ensure a match between multiple versions of RTF Table, it would be nice if we would be able to convert the RTF Table into a SAS ® dataset. This paper focuses on presenting a utility macro(%rtf2data) that converts most commonly used RTF Table templates to SAS ® dataset. The macro executes in a 2-phase process. In the first phase, the macro reads in a user-defined meta-data that defines the structure of the RTF file and also defines the attributes of variables in the output SAS ® dataset. In the second phase, the macro reads in the RTF Table file, parsing through the underlying RTF scripts that build the RTF Table, identifying the free text data and generates the SAS ® dataset using the attributes defined by the meta-data read in the first phase. The macro can also be used to convert RTF Table that has logical boundaries as in the case of Baseline Characteristics Tables wherein each category defines start of a new logical section though having the same underlying structure; or physical boundaries where unequal structured RTF sections are stacked up to form a RTF Table into separate SAS ® datasets.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    0
    References
    0
    Citations
    NaN
    KQI
    []