[Tut] fpos and __fileposition__ are different
Hi,
I worked through the Tutorial 'till "Index the Data", now i recognized, that fpos != __fileposition__ ? Are they not the same?
Dataset_PrepareIndex_Zip
Process_AllPeopleToUpper
I worked through the Tutorial 'till "Index the Data", now i recognized, that fpos != __fileposition__ ? Are they not the same?
Dataset_PrepareIndex_Zip
- Code: Select all
Import Tutorial;
EXPORT Dataset_PrepareIndex_Zip :=
DATASET ('~tutorial::myname::upperperson',
{Tutorial.Layout_People, UNSIGNED8 fpos {virtual(fileposition)}},
THOR);
Process_AllPeopleToUpper
- Code: Select all
IMPORT Tutorial, STD; //Std = Standard Library
Tutorial.Layout_People AllPeopleToUpper(Tutorial.Layout_People rawInput) :=
TRANSFORM
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;
END;
OrigDataset := Tutorial.Dataset_OriginalPerson;
NewDataset := PROJECT(OrigDataset,AllPeopleToUpper(RIGHT));
OUTPUT(NewDataset,,'~tutorial::myname::UpperPerson',OVERWRITE);
- NSD
- Posts: 20
- Joined: Sat Nov 15, 2014 10:18 am
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?
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?
- NSD
- Posts: 20
- Joined: Sat Nov 15, 2014 10:18 am
NSD,
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).
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.
HTH,
Richard
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).
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.how do i know the exact Record Length of a File?
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.
HTH,
Richard
- rtaylor
- Community Advisory Board Member
- Posts: 1619
- Joined: Wed Oct 26, 2011 7:40 pm
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:
http://www.unix.com/unix-for-dummies-qu ... -file.html

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:
http://www.unix.com/unix-for-dummies-qu ... -file.html
- NSD
- Posts: 20
- Joined: Sat Nov 15, 2014 10:18 am
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests