carlos.valentini
New Member
Good morning everyone.
I need an urgent help, because I'm with the project stopped due to this error.
I have the following situation:
- I'm importing an EDI file.
The problem that the file comes across (data) in a single line separated by TAG's.
And importing the final part of the file (last columns) is not being imported.
I tested it with 2 files: 1 with 14,090 columns (characters) and another with 4,930 columns (characters) and the problem is the same.
I tried, using a stream, with the command import unformatted and nothing solved.
QTY + 1: 2000'DTM + 2: 20180607: 102'QTY + 1: 2000'DTM + 2: 20180621: 102'QTY + 1: 2000'DTM + 2: 20180705: 102'QTY + 1: 4000'DTM + 2: 20180719: 102'UNT + 89 + 1'UNZ + 1 + 1'IT * 000210038 * 0000 * 00001
When executing and with the message it imports up to: QTY + 1: 2000'DTM + 2: 20180607: 102'QTY + 1
The final part comes with the blank message.
I tried with the copy-lob command for a variable of type longchar, the same problem.
Here is my code below.
I need an urgent help, because I'm with the project stopped due to this error.
I have the following situation:
- I'm importing an EDI file.
The problem that the file comes across (data) in a single line separated by TAG's.
And importing the final part of the file (last columns) is not being imported.
I tested it with 2 files: 1 with 14,090 columns (characters) and another with 4,930 columns (characters) and the problem is the same.
I tried, using a stream, with the command import unformatted and nothing solved.
QTY + 1: 2000'DTM + 2: 20180607: 102'QTY + 1: 2000'DTM + 2: 20180621: 102'QTY + 1: 2000'DTM + 2: 20180705: 102'QTY + 1: 4000'DTM + 2: 20180719: 102'UNT + 89 + 1'UNZ + 1 + 1'IT * 000210038 * 0000 * 00001
When executing and with the message it imports up to: QTY + 1: 2000'DTM + 2: 20180607: 102'QTY + 1
The final part comes with the blank message.
I tried with the copy-lob command for a variable of type longchar, the same problem.
Here is my code below.
Code:
DEFINE VARIABLE v-line AS CHARACTER NO-UNDO.
DEFINE TEMP-TABLE ttLine
FIELD c-line AS CHARACTER.
DEFINE VARIABLE c-dir AS CHARACTER NO-UNDO.
DEFINE VARIABLE c-file AS CHARACTER NO-UNDO.
assign c-dir = 'c: \ temp \ Input'
c-file = c-dir + "~ \ my_file.TXT".
IF SEARCH (c-file) <>? THEN DO:
INPUT FROM VALUE (c-file).
REPEAT ON ERROR UNDO, NEXT:
v-line = ''.
CREATE ttLinha.
IMPORT v-line.
MESSAGE v-line
VIEW-AS ALERT-BOX INFO BUTTONS OK.
ASSIGN ttLine.c-line = v-line.
END.
INPUT CLOSE.
END.
FOR EACH ttLinha:
MESSAGE ttLinha.c-linha
VIEW-AS ALERT-BOX INFO BUTTONS OK.
END.
Last edited by a moderator: