Reputation: 1
I am working on ECL IDE and getting this error while submitting this program to ECL Watch. Here is the code:
IMPORT STD;
EXPORT File_Image := MODULE
EXPORT imageRecord := RECORD
STRING filename;
DATA image;
//First 4 bytes contain the length of the image data
UNSIGNED8 RecPos{virtual(fileposition)};
END;
EXPORT imageData := DATASET('~online::nt::skina', imageRecord, FLAT);
//Add RecID and Dependent Data
EXPORT imageRecordPlus := RECORD
UNSIGNED1 RecID;
UNSIGNED1 YType;
imageRecord;
END;
EXPORT imageDataPlus := PROJECT(imageData,
TRANSFORM(imageRecordPlus,
SELF.RecID := COUNTER,
SELF.YType := IF(STD.STR.Find(LEFT.filename,'dog')<> 0,1,0),;
SELF.Image := LEFT.IMAGE[51..],
SELF := LEFT));
END;
Upvotes: 0
Views: 33
Reputation: 254
The code you are submitting does not seem to have any actions, for example, an OUTPUT action. Create a new file in your folder and try this code:
IMPORT $;
$.File_Image.imageData;
Just to make sure your file definition is correct. You also do not need the
UNSIGNED8 RecPos{virtual(fileposition)};
Comment that out.
The error itself usually means that your file is the wrong type, but FLAT should be the type after a BLOB spray.
Regards,
Bob
Upvotes: 0