Alaska Software Inc. - DELDBE. The first line is not visualized if is --------------------------------- but yes if is A---------------------------------
Username: Password:
AuthorTopic: DELDBE. The first line is not visualized if is --------------------------------- but yes if is A---------------------------------
César Calvo DELDBE. The first line is not visualized if is --------------------------------- but yes if is A---------------------------------
on Sat, 25 Mar 2017 05:10:36 +0100
PROCEDURE PROCESO()
Local cFil1, cLin

DbeSetDefault("DELDBE")

cFil1 := "D:\GLOBALSAP\SALDOS_IBAL\201703TMP.TXT"

USE (cFil1) ALIAS OldFile New

cLin := OldFile->Field1

MsgBox(cLin)

Close OldFile

RETURN

Why this code dosn´t display the first line of 201703TMP.XTXT file but if I 
do DbSkip() display the second line correctly?

PROCEDURE PROCESO()
Local cFil1, cLin

DbeSetDefault("DELDBE")

cFil1 := "D:\GLOBALSAP\SALDOS_IBAL\201703TMP.TXT"

USE (cFil1) ALIAS OldFile New

DbSkip()

cLin := OldFile->Field1

MsgBox(cLin)

Close OldFile

RETURN

But I change in the 201703TMP.TXT file the first 
Line --------------------------------- to A---------------------------------  
then the first line is displayed.

Regards.
César.


201703TMP.zip
Anand GuptaRe: DELDBE. The first line is not visualized if is --------------------------------- but yes if is A---------------------------------
on Tue, 28 Mar 2017 14:17:42 +0200
Hi César,

The DELDBE expects a proper delimited file like aa,bb,cc or aa|bb|cc etc.

The text file you attached does not confirm to it. If you continue skip then
you will find that the output is not as expected.

To read such files use memoread + string to array and then use the elements of
the array to process.

HTH

Regards,

Anand


César Calvo <ccalvoc@telefonica.net> wrote in message
news:70837fa6$5cc31571$130ff@news.alaska-software.com...
>PROCEDURE PROCESO()
>Local cFil1, cLin
>
>DbeSetDefault("DELDBE")
>
>cFil1 := "D:\GLOBALSAP\SALDOS_IBAL\201703TMP.TXT"
>
>USE (cFil1) ALIAS OldFile New
>
>cLin := OldFile->Field1
>
>MsgBox(cLin)
>
>Close OldFile
>
>RETURN
>
>Why this code dosn´t display the first line of 201703TMP.XTXT file but if I 
>do DbSkip() display the second line correctly?
>
>PROCEDURE PROCESO()
>Local cFil1, cLin
>
>DbeSetDefault("DELDBE")
>
>cFil1 := "D:\GLOBALSAP\SALDOS_IBAL\201703TMP.TXT"
>
>USE (cFil1) ALIAS OldFile New
>
>DbSkip()
>
>cLin := OldFile->Field1
>
>MsgBox(cLin)
>
>Close OldFile
>
>RETURN
>
>But I change in the 201703TMP.TXT file the first 
>Line --------------------------------- to A---------------------------------  
>then the first line is displayed.
>
>Regards.
>César.