Back to well once again. boy...just about every time I want to use an API.
I have a workdef file with a DED prefix. I want to make sure the interface is found prior to a 800-READCSV, else I get a run-time-exception. According to the API doc, I use INFO-FOUND. So, I added the following to my code:
INITIALIZE DEDINFO-FOUND.
STRING WS-DEDUCTION-FILE DELIMITED BY SIZE INTO WS-FILE-SYSTEM. DISPLAY DEDINFO-FOUND. For the moment, I am leaving the remainder of the code out...but my program compiles, and I can open and read the file. What I discovered is DEDINFO returns a 0 if the file is there or not. I must not be using it correctly. Any guru out there familiar with the data structure.
Much apprecate John Bear with me here...Lawson 9.0 4GL API, page 194. Field Description INFO-FOUND Indicates whether the file exists That is why I used it leading to yet another bug hunt. 900-FILEEXISTS is not referenced in the doc. Thank you John.
** don't append the null character to the file name.