Resolved Errno 463 on INPUT FROM OS-DIR

Overflow

New Member
Hi everybody!

I have a program that reads the input from a directory and deletes some files if certain criteria is met.
This program is executed every hour and most of the times it finishes successfully.
When it doesn't, an error message is displayed:

"<file-name>" is a directory (463)

PROGRESS expected the name of a file, but you specified the name of a directory instead. This could happen if a program tries to "include" a directory (e.g. /usr/dlc) from within a PROGRESS procedure.

Here is my code:
Code:
RUN logger("INPUT FROM OS-DIR(" + MY_PATH + ")").

INPUT FROM OS-DIR(MY_PATH).
REPEAT:

    RUN logger("Importing files").

    IMPORT t-filename
           t-fullpath
           t-type.

    IF t-type EQ "F" AND t-filename BEGINS "old" THEN DO:

        OS-DELETE VALUE(t-fullpath).
    END.
END.
INPUT CLOSE.

logger is a simple procedure that writes in a proper log file.

I'm sure that this error occurs when executing this statement:
INPUT FROM OS-DIR(MY_PATH).
because the last line of my log file is the result of this statement:
RUN logger("INPUT FROM OS-DIR(" + MY_PATH + ")").

MY_PATH is a variable that has assigned an absolute path.
The value of MY_PATH doesn't change after assigned, is always the same.
As specified before, 'INPUT FROM OS-DIR(MY_PATH).' usually works as spected, but sometimes just throw the error showed at the beginning of this thread, is completely random.

Important Notes:
The program works correctly on development environment (Microsoft Windows Server 2003 R2 Standard x64 Edition SP2 running on an Intel Xeon e5506 @ 2.13 GHz with 8 GB memory),
while on production environment doesn't (Microsoft Windows Server 2003 R2 Standard x64 Edition SP2 running on an Intel Xeon e5645 @ 2.40 GHz with 12 GB memory).
Both of them use NTFS. Progress Version: Progress 9.1D

I'd like to know if exists a solution to this problem or an alternative way to accomplish the same task.
I'm also interesting in knowing if there is a way to avoid displaying the message,
but the option 'NO-ERROR' does not work with 'INPUT FROM' statement, meaning that I can not use
IF ERROR-STATUS:ERROR THEN DO:

...
END.


Thanks in advance!
 
Last edited:

Overflow

New Member
I know 9.1D is not supported anymore, but there's not much I can do about it since I'm just a developer.

I edited my question adding O.S. and hardware specs, thank you for pointing that out.
 

TheMadDBA

Active Member
Understood... we all just like to point out old versions because sometimes people just inherit systems without knowing it.

Your best option is probably to just use OS-COMMAND DIR <your directory> to output the information to a file and then input from that.
 
Top