For better or worse, there's no physical distinction in any of the Linux and Windows file systems between what we call "random" and "sequential" files. So it's literally impossible to definitely distinguish between them; it's really just a matter of how you access it.
That said, unless you set
OPTIONS=EXTFIO, "random" files
must be a multiple of 512 bytes, and that is what LOOKUP uses to decide the file type.
You can make that determination yourself by using something like
XCALL SIZE or
MX_FILESTATS that returns the file size in bytes rather than blocks, perhaps wrapped in a user function
Fn'Is'File'Random(fspec). But just be aware that there's a 1 in 512 chance that a "sequential" file will be a multiple of 512 bytes. If that's too big of a risk, then you could add additional logic to your wrapper function, inspired perhaps by the Linux
file command, examining the file data for clues. (Note that you'd probably open it up for INPUT, i.e. as a sequential file, and then use some kind of raw input method such as
INPUT RAW or
XCALL GET to look for indicators such as chr(10), maybe embedded nulls, etc. to help make confirm your determination.
p.s. FWIW, if you do decide to just temporarily disable ABSLOOKUP, you could do it programmatically with
MX_SETOPTIONS