Page 1 of 1

Retrieving info about a seq file

Posted: Mon Sep 15, 2008 9:35 am
by gpbarsky
Hi.

I need to retrieve the creation date and the last modification date of a sequential file.

I didn't find if FILEINFO or STATUS functions can retrieve these values.

Is there any other function to get the creation date and the last modification date of a seq file ?

Thanks in advance.

Posted: Mon Sep 15, 2008 9:51 am
by chulett
:? I believe you'll need to fall back to the O/S for that. For Windows, perhaps a 'dir' with the '/tc' and then the '/tw' option, parsing the results.

Posted: Mon Sep 15, 2008 3:49 pm
by ray.wurlod
The STATUS statement will retrieve date and time created, modified and last accessed, and 25 other pieces of information about a sequential file.

Note that I refer specifically to the STATUS statement here, not the Status() function. Check the DataStage BASIC manual for full details. Dates and times returned are in DataStage internal format.

Posted: Mon Sep 15, 2008 4:14 pm
by chulett
Hmmm... I went through the BASIC manual before I replied for both FILEINFO and STATUS but didn't see that. Guess I need to look again.

Posted: Mon Sep 15, 2008 5:11 pm
by ray.wurlod
Page 6-560 in the manual for version 7.1, page 6-561 in the manual for version 7.5, page 6-561 in the manual for 8.0.

Posted: Mon Sep 15, 2008 5:26 pm
by chulett
OK, not sure why I missed them. Found the last access and modification date and time fields, 13 thru 16. There's also field 17 for 'Time and date of last status change' that states it is the creation date on Windows NT, out of curiousity where is the UNIX creation date retrieved?

Posted: Mon Sep 15, 2008 8:20 pm
by ray.wurlod
This seems to be the date/time created unless permissions have been changed.

Posted: Tue Sep 16, 2008 11:58 am
by gpbarsky
Finally, I could find the page where the STAUS fields are explained.

Thanks to everyone.

:D