[EpiData-list] substring in data entry check file

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Sun Nov 21 12:40:26 CST 2010


Thanks. Sorry, I was not clear in my original post. I need to do this in the chk file during data entry, not during analysis. I see that substr() is available in analysis, but does not seem to be available for chk files during data entry. What I would like to do is something like:

* example.qes
firstname A______
lastname A______
id A__


* example.chk
lastname
AFTER ENTRY
    LET id=firstname[1,1] + lastname[1,1]
END

Then if I enter Fred Bloggs I get id="FB"

David
--


David Whiting, PhD | Senior Epidemiology  & Public Health Specialist
tel +32-2-6437945 | mob +32-496-266436 | David.Whiting at idf.org

International Diabetes Federation
166 Chaussée de la Hulpe, B-1170 Brussels, Belgium
tel +32-2-5385511 | fax +32-2-5385114
info at idf.org | www.idf.org | VAT BE 0433.674.528

IDF | Promoting diabetes care, prevention and a cure worldwide

________________________________________
From: epidata-list-bounces at lists.umanitoba.ca [epidata-list-bounces at lists.umanitoba.ca] On Behalf Of epidata-list at lists.umanitoba.ca [epidata-list at lists.umanitoba.ca]
Sent: 21 November 2010 19:29
To: epidata-list at lists.umanitoba.ca
Subject: Re: [EpiData-list] substring in data entry check file

In EpiData Analysis V2.2.1.172:

String variable VARX, value "ABCDEFGH"
substr(VARX,2,3) gvies BCD

Press F1 and click "Functions" to see more details.

Hans

On 20:59, epidata-list at lists.umanitoba.ca wrote:
> Hi,
>
> In epi info 6.04d for DOS it is possible to take a substring using square brackets to index the characters wanted, e.g. firstname[1,1] gives the first letter of the firstname field. Is there anyway to do this in epidata? Using [1,1] like this does not seem to work. It does not throw an error, it just does not do what I want it to do (fill in another field).
>
> Thanks.
>
> David


_______________________________________________
EpiData-list mailing list
EpiData-list at lists.umanitoba.ca
http://lists.umanitoba.ca/mailman/listinfo/epidata-list



More information about the EpiData-list mailing list