[Stackoverflow] [Progress OpenEdge ABL] Determine Unix or Windows EOL character

Status
Not open for further replies.
D

Dileep

Guest
I am reading a file and interested in knowing the operating system that generated the file. It can be either Windows or Unix. I am trying to determine the operating system by reading end of line character. I am facing difficulty in getting the character at end of line. I tried the following code but it always returns -2 irrespective of the operating system (which is correct as per the documentation). Thanks for your help.

def var cLog as char init "myfile.log".

input from value (cLog).
seek input to end.

readkey.
message lastkey.

Continue reading...
 
Status
Not open for further replies.
Top