Upland OL User community

EOF detection linedata FF terminated pages

How to stop at end of file on a text file with FF terminated pages? I have created a DataMapper which processes the data ok, but it reads beyond the end of file. DataMapper ends with error "The step is out of bound ={1} (DME000130).

One way to go about this would be to remove the final FF in the workflow before it hits the datamapper. This way, the last FF it sees is the one before the last record. As it stands, it’s attempting to create a record after that final FF but there’s nothing left in the page. This would cause any GoTos or Loops to fail as they’d be going ‘out of bounds’ looking for their stop conditions.

Alternatively in 1.8 a new feature was added to Stop Processing a record. You could use this in a condition at the top of your datamapper, for example, to determine if it should process or not.

More on that here: http://help.objectiflune.com/en/planetpress-connect-user-guide/1.8/#datamapper/Data Mapping Workflow/Extracting_Data.htm

A potential use case for this would be, suppose the first line of each record always begins with a customer number. Before doing anything in the datamapper, you set up a condition to check for it’s existance. If it is there? Process as normal. All of your datamapper logic goes into the True branch. If it’s not? Well, do nothing (Stop Processing). This halts the datamapping for this record and protects against out of bounds issues on records where there’s essentially nothing to map.

I think you refer to the “Next Occurrence is found” property. I tried it, but I do not get any positive result. I compare this property with a string value true, but still the same problem occurs. Removing the last FF should work , for now I found another solution/work-around: adding a unique string, at the end of the file and test this string in the 1th Condition. Scripting this in the preprocessor is just a little easier for me, than removing the last FF.

No, I meant Stop Processing Record. It’s new in 1.8.

In the example below, I have a condition that checks if line 1 is empty. If it’s not, it goes down the left branch and extracts data. If it is empty, it goes down the right branch and stops any further processing on the record. No record is created, so no output will be created. Furthermore, none of the tasks that you’re doing in the left branch that could possibly go out of bounds ever run, so there’s no error generated by the process.