[EpiData-list] Extending command over multiple lines

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Wed Jul 28 19:48:07 CDT 2010

Thanks Jamie. I haven't found a way to extend a command over multiple
lines and it looks as though it isn't possible. I don't think the issue
is the editor. I could type well over 200 characters into EpiData's
editor. The problem was that EpiData then ignored my check when I tested
entering data into the month fields. Thanks for the pos function tip.
It'll probably come in handy again.

Suzanna Vidmar
Senior Research Officer
Clinical Epidemiology and Biostatistics Unit

Murdoch Childrens Research Institute 
Royal Children's Hospital
Flemington Road Parkville Victoria 3052 Australia 

telephone: +61 3 9345 6372
facsimile: +61 3 9345 6000
email: suzanna.vidmar at mcri.edu.au

-----Original Message-----
From: epidata-list-bounces at lists.umanitoba.ca
[mailto:epidata-list-bounces at lists.umanitoba.ca] On Behalf Of
epidata-list at lists.umanitoba.ca
Sent: Thursday, 29 July 2010 3:17 AM
To: epidata-list at lists.umanitoba.ca
Subject: Re: [EpiData-list] Extending command over multiple lines

You can use long lines in check. The check editor for a field will let
you create a line somewhat over 200 characters; you may be able to go
longer if you use another editor.
In your example, why not let EpiData do the checking by specifying LEGAL
values for months? It seems odd to be entering month by name in any
case, but you can specify the 12 legal values quite easily and train
your data entry clerks that EpiData will beep for an illegal entry.

If you want your own error message to come up, an elegant way to check
without the long if statement or nesting is as follows:

pos("#"+admin1mon,"#JAN#FEB#MAR#APR#MAY#JUN#JUL#AUG#SEP#OCT#NOV#DEC) = 0
     HELP "Month is a 3 character field, e.g. JAN, FEB, etc" TYPE=ERROR
     CLEAR admit1mon
     GOTO admit1mon


On 2010-07-27, at 8:37 PM, epidata-list at lists.umanitoba.ca wrote:

> Is there a way of extending a command in the EpiData Entry CHK file
> beyond a single line? In my example below I've got around the problem
> using nested IF... THENs but there may be another way. For instance in
> Stata a command can be extended over multiple lines by ending each
> with ///.

EpiData-list mailing list
EpiData-list at lists.umanitoba.ca

More information about the EpiData-list mailing list