[Stackoverflow] [Progress OpenEdge ABL] Reading in a fixed width file in Progress Openedge

Status
Not open for further replies.
N

Nick Saul

Guest
We have a job that reads in a fixed width file and parses it out into columns in Oracle. The last time this job ran it failed and I have come to the conclusion it is because one of the fixed width columns is too long. This file is HUGE and has over 100 columns, so reading through it manually is out of the question. Unfortunately, I don't have access to the Oracle code. I work in progress and want to run through each of the rows one by one until I hit the error-ed row, then display or return it. So far, I'm importing the file and then:

Code:
DO WHILE TRUE ON ERROR UNDO, RETURN:
SUBSTRING(STRING, 1, 3, "CHARACTER") +
            SUBSTRING(STRING, 4, 1, "CHARACTER") +
            SUBSTRING(STRING, 5, 4, "CHARACTER") +
            SUBSTRING(STRING, 9, 9, "CHARACTER") + ...
            
        ... SUBSTRING(STRING,1350 ,50, "CHARACTER") +
            SUBSTRING(STRING,1400 ,25, "CHARACTER") +
            SUBSTRING(STRING,1425 ,320, "CHARACTER").

    END.
INPUT CLOSE.

However, this isn't getting me what I want. I'm new to the language, how can I add or modify this to get the data I'm looking for?

Continue reading...
 
Status
Not open for further replies.
Top