[EpiData-list] A bug of epidata

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Tue Sep 11 02:46:07 CDT 2007


To any concern,
I think that I have found a bug of epidata when I want to export the data
from epidata to sas.

The content of .qes file:
This is a example!
The {first} text field: __________
The {second} text field:
________________________________________________________________________________
The {third} text field: ____________

The content of .sas file which is generated by epidata.
* EpiData created two files by exporting
* D:\statistics\temp\epidata bug\bug.rec
*
* 1. D:\statistics\temp\epidata bug\bug.sas
*    is the SAS command file
* 2. D:\statistics\temp\epidata bug\bug.txt
*    is an ASCII text file containing the raw data.
*
* You may modify the command file before submitting them.   ;

DATA bug(LABEL="a bug of epidata");
  INFILE "D:\statistics\temp\epidata bug\bug.txt";
  INPUT
    FIRST $ 1-10
  / SECOND $ 1-80 THIRD $ 1-12;

LABEL
  first="The first text field:"
  second="The second text field:"
  third="The third text field:";


run;

The conten of .txt file which is also generated by epidata:
a


b
c


d
e


f

When I run the .sas file in sas, the log window showed that:
NOTE: The infile "D:\statistics\temp\epidata bug\bug.txt" is:
      File Name=D:\statistics\temp\epidata bug\bug.txt,
      RECFM=V,LRECL=256

NOTE: LOST CARD.
FIRST=f SECOND=  THIRD=  _ERROR_=1 _N_=4
NOTE: 9 records were read from the infile "D:\statistics\temp\epidata
bug\bug.txt".
      The minimum record length was 10.
      The maximum record length was 80.
NOTE: SAS went to a new line when INPUT statement reached past the end of a
line.
NOTE: The data set WORK.BUG has 3 observations and 3 variables.
NOTE: DATA statement used (Total process time):
      real time           0.18 seconds
      cpu time            0.07 seconds

I can get the dataset 'bug' in work library. But it is not what I want.

Now I can resolve the problem. I need modify the .sas file. The file which
is modifed is listed below:
* EpiData created two files by exporting
* D:\statistics\temp\epidata bug\bug.rec
*
* 1. D:\statistics\temp\epidata bug\bug.sas
*    is the SAS command file
* 2. D:\statistics\temp\epidata bug\bug.txt
*    is an ASCII text file containing the raw data.
*
* You may modify the command file before submitting them.   ;

DATA bug(LABEL="a bug of epidata");
  INFILE "D:\statistics\temp\epidata bug\bug.txt";
  INPUT
    FIRST $ 1-10
  / SECOND $ 1-80
  / THIRD $ 1-12;

LABEL
  first="The first text field:"
  second="The second text field:"
  third="The third text field:";


run;

The 'second' field caused the trouble. The 'second' field's width is 80.

I hope someone can fix it.

All the files is attached. You can have a try.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: epidata bug.zip
Type: application/zip
Size: 1150 bytes
Desc: not available
Url : http://lists.umanitoba.ca/pipermail/epidata-list/attachments/20070911/c545842e/epidatabug.zip


More information about the EpiData-list mailing list