ASCII Error - Entry Not Found!??
ASCII Error - Entry Not Found!??
(OP)
Hi all!
I did the usual: I have an ASCII table "texts" with a field LINE of 255 string, opens with a global name: NombreArchivoTexto. Do not know why .. to open:
RELATE:TEXTS.CLOSE
GLO:NOMBREARCHIVOTEXTO = 'aaa.txt'
RELATE:TEXTS.OPEN
IF errorcode () --------->> gives me the error "ENTRY NOT FOUND "
This I have done many times and it works perfect, the ASCII file is in this format:
123, N; MUÑOZ EXEQUIEL,,,, 04/27/11, 00:00:00, OK, 7, AUR, 4.763, mg / dL, COL, 127.7; mg / dL, GLU, 79.9; mg / dL, LDH Lb;
but I can not ever open it .. can someone helpme please?? Thanks a lot!
Eduardo
Mendoza
I did the usual: I have an ASCII table "texts" with a field LINE of 255 string, opens with a global name: NombreArchivoTexto. Do not know why .. to open:
RELATE:TEXTS.CLOSE
GLO:NOMBREARCHIVOTEXTO = 'aaa.txt'
RELATE:TEXTS.OPEN
IF errorcode () --------->> gives me the error "ENTRY NOT FOUND "
This I have done many times and it works perfect, the ASCII file is in this format:
123, N; MUÑOZ EXEQUIEL,,,, 04/27/11, 00:00:00, OK, 7, AUR, 4.763, mg / dL, COL, 127.7; mg / dL, GLU, 79.9; mg / dL, LDH Lb;
but I can not ever open it .. can someone helpme please?? Thanks a lot!
Eduardo
Mendoza
RE: ASCII Error - Entry Not Found!??
Where is the LOOP ... NEXT() ... END?
Why are using RELATE:..? Is the Table related to other tables in the dictionary?
The CLOSE method does NOT close ALL the instances of the file being closed. You need to ::
LOOP UNTIL Access:TEXTS.GetOpened() = 0
RELATE:Texts.Close()
END
Regards
RE: ASCII Error - Entry Not Found!??
Textos (ascii) is not related, but don't work with access or relate.
access:Textos.Close
GLO:NombreArchivo_Textos=CLIP(ARCHIVO)
ACCESS:textos.OPEN
if errorcode()--> same error "Entry not Found"
I probe open the file before embeds open files:
GLO:NombreArchivo_Textos='archivo.txt'
and the error it's the same
RE: ASCII Error - Entry Not Found!??
after this code, I use the RECORD command for know total records in the ASCII file, but RECORDS not work in ASCII!! Your result is 0 (cero).
LOOP T#=1 TO RECORDS(TEXTOS) >----MY ERROR!!!!
...
END
Solution:
SET(textos)
LOOP
NEXT(textos)
IF LX:LINEA='' THEN BREAK. <--- Work perfect!
...
END
Sorry again Shankar! and thanks very much!
RE: ASCII Error - Entry Not Found!??
For ASCII files, you do not use RECORDS, you use BYTES() i.e.
CODE
IF ERRORCODE() ...
TotalBytes# = BYTES(ASCIIFile) ; ReadBytes# = 0
SET(ASCIIFile)
LOOP
NEXT(ASCIIFile)
IF ERRORCODE() THEN BREAK.
ReadBytes# += BYTES(ASCIIFile)
! % completed = (ReadBytes# / TotalBytes#) * 100
...
END
Regards