Fri Aug 19, 2022 4:50 pm
Login Register Lost Password? Contact Us

Please Note: The HPCC Systems forums are moving to Stack Overflow. We invite you to post your questions on Stack Overflow utilizing the tag hpcc-ecl ( This legacy forum will be active and monitored during our transition to Stack Overflow but will become read only beginning September 1, 2022.

[Tut] fpos and __fileposition__ are different

Topics specific to the use of the ECL IDE

Wed Jan 07, 2015 7:05 pm Change Time Zone


I worked through the Tutorial 'till "Index the Data", now i recognized, that fpos != __fileposition__ ? Are they not the same?

Code: Select all
Import Tutorial;

EXPORT Dataset_PrepareIndex_Zip :=
      DATASET   ('~tutorial::myname::upperperson',
                  {Tutorial.Layout_People, UNSIGNED8 fpos {virtual(fileposition)}},

Code: Select all
IMPORT Tutorial, STD;      //Std = Standard Library

   Tutorial.Layout_People AllPeopleToUpper(Tutorial.Layout_People rawInput) :=
         SELF.FirstName := STD.Str.ToUpperCase(rawInput.FirstName);
         SELF.LastName := STD.Str.ToUpperCase(rawInput.LastName);
         SELF.MiddleName := STD.Str.ToUpperCase(rawInput.MiddleName);
         SELF.Zip := rawInput.Zip;
         SELF.Street := rawInput.Street;
         SELF.City := rawInput.City;
         SELF.State := rawInput.State;
OrigDataset := Tutorial.Dataset_OriginalPerson;
NewDataset := PROJECT(OrigDataset,AllPeopleToUpper(RIGHT));
Posts: 20
Joined: Sat Nov 15, 2014 10:18 am

Thu Jan 08, 2015 12:02 pm Change Time Zone

Ive fixed this:

In a previous tutorial, there was a Record Length of 155 of the OriginalPerson File, now it is 124. My question is now: how do i know the exact Record Length of a File?
Posts: 20
Joined: Sat Nov 15, 2014 10:18 am

Thu Jan 08, 2015 2:42 pm Change Time Zone


You're confusing the "Persons" file from our Introduction to ECL online eLearning course (155-byte records) with the "OriginalPerson" file from the Data Tutorial downloadable PDF (which has 124-byte records).
how do i know the exact Record Length of a File?
The answer to this is the same as in any other language/development platform -- you either are given that information from the data provider, or you need to empirically determine it for yourself.

In the case of our ECL teaching materials, we will always give you enough information up front to be able to work with the file.


Community Advisory Board Member
Community Advisory Board Member
Posts: 1619
Joined: Wed Oct 26, 2011 7:40 pm

Thu Jan 08, 2015 3:51 pm Change Time Zone

thank you. ill work through more tutorials :)

in my case i will only work with CSV's. as i remeber right, i hadn't set up a record length.

for anybody, who's interested how it works: ... -file.html
Posts: 20
Joined: Sat Nov 15, 2014 10:18 am

Return to ECL IDE

Who is online

Users browsing this forum: No registered users and 2 guests