Note: type 1 files are cascading directories and this will not work correctly.
This was written for Universe on Linux, but should work on all UNIX computers.
SUBROUTINE FILE.MODIFIED(DATE.MODIFIED)
*
* BASIC SUBROUTINE FOR I-DESCRIPTOR DICTIONARY ITEM RETURNS DATE AN ITEM IN A TYPE 19
* FILE WAS MODIFIED
*
DATE.MODIFIED = ''
*
PROGRAM.NAME = @ID
*
SLASH.IN.PROGRAM = COUNT(PROGRAM.NAME,'/')
IF SLASH.IN.PROGRAM THEN PROGRAM.NAME = CHANGE(PROGRAM.NAME,'/','?\')
*
OPEN 'VOC' TO VOC.FILE THEN
READ VOC.REC FROM VOC.FILE, @FILENAME THEN
BEGIN CASE
CASE VOC.REC<1>[1,1] = 'Q'
FILE.PATH ="/uv/accounts/":VOC.REC<2>:'/':VOC.REC<3>:'/':PROGRAM.NAME
CASE VOC.REC<1>[1,1] = 'F'
FILE.PATH = VOC.REC<2>:'/':PROGRAM.NAME
CASE 1
FILE.PATH = @FILENAME:'/':PROGRAM.NAME
END CASE
*
CMD = "SH -c ":'"':"ls -la '":FILE.PATH:"'":' 2>/dev/null"'
*
EXECUTE CMD CAPTURING RESPONSE
*
IF RESPONSE<1,1> # '' THEN
DATE.MODIFIED = RESPONSE[44,12]
END
*
END
END
*
RETURN
*
END
Ken
At 01:14 PM 7/28/2004, you wrote:
Could you write a SUBR-type dictionary that does an "ls -l" of the hold file entry in Unix and then strips out the date/time from there? I'm sure there's a less drastic approach, but in a pinch it should work.
-Kevin [EMAIL PROTECTED] http://www.PrecisOnline.com
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Al DeWitt Sent: Wednesday, July 28, 2004 11:02 AM To: [EMAIL PROTECTED] Subject: [U2] File Creation Date
Using UniData 6.0.12 with SBClient. Print files that go to the _HOLD_ have an id that is the user id,port #, an underscore and a numerically ascending number. I want to write a program that changes the name to something more understandable.
However, my users want me to save the original files so I need the _HOLD_ entry's file creation date to be part of my select list so I don't keep selecting the same files over and over. How do I determine what that is? Or can I?
Thanks.
Al ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/
Ken R. Hall
Information Technology Manager
Western States Electric, Inc.
9151 SE McBrod Street
Portland, OR 97222
503-653-8619
fax: 503-653-2279
mailto:[EMAIL PROTECTED]
www.wselectric.com -------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
