Hallo

ich brauche ein RPG-Programm das von gewissen Dateien aus dem IFS das Datum des letzten Zugriffs ermittelt.

Dazu habe ich das folgende Programm geschrieben:
PHP-Code:
H DFTACTGRP(*NOBNDDIR'QC2LE' )     
D* -----------------------------------------------------
D*  Prototype for API procedures                        
D
* -----------------------------------------------------
Dlstat            PR            10I 0 EXTPROC('lstat')  
D                                 *   VALUE             
D                                 
*   VALUE             
D StatDS          DS           128    
D  st_mode                      10U 0 
D  st_ino                       10U 0 
D  st_nlink                      5U 0 
D  reserved1                     2A   
D  st_uid                       10U 0 
D  st_gid                       10U 0 
D  st_size                      10U 0 
D  st_atime                     10U 0 
D  st_mtime                     10U 0 
D  st_ctime                     10U 0 
D  st_dev                       10U 0 
D  st_blksize                   10I 0 
D  st_allocsize                 10I 0 
D  st_objtype                   10A   
D  reserved2                     2A   
D  st_codepage                   5U 0
D  st_reserved1                 62A  
D  st_ino_gen_id                10U 0

D EntryName       S             50    inz
('mm.txt')
D DirName         S            100    inz('/tmp')  
D EntryPath       S            256                 
D ReturnInt       S             10I 0              

C                   
EVAL      EntryPath = %trim(DirName) + '/'   
C                             + %trimr(EntryName) + x'00'        
C                   EVAL      ReturnInt lstat(%addr(EntryPath
C                                         : %addr(StatDS)) 
und soweit klappt das ja, aber nun steht im Feld st_atime die Zeit in Sekunden seit irgendwann und diese in Datum und Zeit des letzten Zugriffs umwandeln gelingt mir nicht.

Danke für jede Hilfe