Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASCII Error - Entry Not Found!??

Status
Not open for further replies.

edc000

Programmer
Mar 4, 2011
28
AR
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
 
Hi!

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
 
Hi Shankar and thanks
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

 
WO sorry that is:
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!
 
Hi!

For ASCII files, you do not use RECORDS, you use BYTES() i.e.

Code:
OPEN(ASCIIFile, 42h)
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top