INPUT THROUGH VALUE ( "ls -l " + cFileName ).
REPEAT:
/* Import the results of 'ls' one whole line at a time */
IMPORT UNFORMATTED cFileDetails.
/* Assuming file name is at position 55, try to determine if the current line */
/* is the right one by comparing the file name */
IF TRIM ( SUBSTRING ( cFileDetails, 55 ) ) = cFileName THEN DO:
/* Assuming date and time last modified is at position 42 for 12 characters */
ASSIGN cFileDate = TRIM ( SUBSTRING ( cFileDetails, 42, 12 ) ).
LEAVE.
END.
END.
INPUT CLOSE.