select uv.account.@id, uv.account.@record from uv.account, uv_schema where uv.account.@id=uv_schema.schema_name and uv.account.@id=<project_name>
NOTE: This command was executed in uppercase
Your reply is higly appreciated.
Thanks & Regards
Prasad
Last edited by prasad111 on Wed Feb 18, 2009 10:26 am, edited 2 times in total.
In a routine open VOC then use the STATUS statement to fetch it's file information. In the dynamic array returned by STATUS you will be able to find the date and time created. This perforce is the project date/time created.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
$INCLUDE DSINCLUDE JOBCONTROL.H
OPEN 'VOC' TO test.arr THEN PRINT "File Opened" ELSE ABORT
STATUS stat FROM test.arr THEN PRINT stat
field5 = stat<5,1,1>
field15 = stat<15,1,1>
field15= Oconv(field15, "MTHS")
field16 = stat<16,1,1>
field16=OCONV(field16,"D2/")
field17 = stat<17,1,1>
field18 = stat<18,1,1>
field18=OCONV(field18,"D2/")
Call DSExecute("UV", "LIST.ITEM UV.ACCOUNT WITH @ID='PROJECT_TEST' ", Output, SystemReturnCode)
Print "Total VOC entries selected: ":SystemReturnCode
Call DSLogInfo('System return code ':SystemReturnCode, "JobControl")
Answer:="FileMode":"~ ":field5:"~ ":"DATE_LAST_MODIFIED":"~ ":field15:"~ ":"TIME_LAST_MODIFIED":"~ ":field16:"~ ":"TIME_DATE_LAST_STATUS_CHANGE":"~ ":field17:"~ ":"DATE_LAST_STATUS_CHANGE":"~ ":field18
Call DSLogInfo('Stat complete output ':stat, "JobControl")
Call DSLogInfo('Stat output ':Answer, "JobControl")
CLOSE test.arr
Ans=0
Currently I am getting the output as [Where the time and date will print the time when this routine runs]
FileMode~ 33277~ DATE_LAST_MODIFIED~ 12:45:12pm~ TIME_LAST_MODIFIED~ 02/25/09~ TIME_DATE_LAST_STATUS_CHANGE~ 45912~ DATE_LAST_STATUS_CHANGE~ 02/25/09
I am missing something near the status or with call DSEXECUTE statement (how to get the details of the corresponding project)... any suggestion is appreciated.
Yes, I am confused..... I am not sure the open VOC is giving me the right value[or am I extracting the right value]
Is the ProjectName=@ACCOUNT should be added at the beginning(as present in the code) -- if yes still gives me the current date time in the output. To elaborate......the routine is giving me the output of when the file was modified /Projects/PROJECT_TEST/VOC,
but that doesn't tell me when the Project created.
On checking the manual, I found that field #18 is the date created when executed on Windows systems. Much of my recent work has been on Windows-based servers, hence my earlier advice.
So how about executing ls -cl VOC and parsing the date out of that? Does your UNIX support the -c option (date created) for ls ?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
$ ls -l VOC
-rwxrwxr-x 1 dsadm dstage 260096 Mar 18 14:45 VOC
$ ls -cl VOC
-rwxrwxr-x 1 dsadm dstage 260096 Mar 18 14:45 VOC
where,
-c with -lt: sort by, and show, ctime (time of last modification of
file status information) with -l: show ctime and sort by name
otherwise: sort by ctime
Is there any other way I find the information of the project created timestamp?