[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: importing LONG string variables

From   "Mindruta, Denisa Constanta" <>
Subject   st: importing LONG string variables
Date   Thu, 23 Aug 2007 16:50:30 -0500 (CDT)

I would appreciate any help on the following problem: I need to import a (.cvs) file containing several string variables that go well beyond stata limits. Is there a way to import the file, and at the same time, parse these string variables in constituent words (delimited by “|”) before saving it as a stata file ?

A simple example might help: 
Name1|Name2 comma Address1|Address2 comma PatClass1|PatClass2|PatClass3
Row 2
Name3|Name4|Name5 comma Address3|Address4|Address5 comma PatClass4

Want to get the following structure:
Name1 comma Name2 comma “missing info” comma Address1 comma Address2 comma “missing info” comma PatClass1 comma PatClass2 comma PatClass3
Row 2
Name3 comma Name4 comma Name5 comma Address3 comma Address4 comma Address5 comma PatClass4 comma “missing info” comma “missing info”

Any suggestion on how to approach this problem? (here is just a simpe example, the text in a cell could go up to 200 words of 30 characters each, and I have 15 of these variables, and 600 files...)Thanks !

University of Illinois Urbana-Champaign

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index