×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

ASCII Error - Entry Not Found!??

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

RE: ASCII Error - Entry Not Found!??

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
 

RE: ASCII Error - Entry Not Found!??

(OP)
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

 

RE: ASCII Error - Entry Not Found!??

(OP)
WOWWW!! 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!

RE: ASCII Error - Entry Not Found!??

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
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close