Thanks Allen, this is what I needed. I have a subroutine I wrote that is used in an I descriptor in the dictionary of a BP file. The subroutine takes in the program name and BP file name, and returns last modified date and time, last compiled date and time, size of the program in bytes. Using the UnIData DIR command gave me this information. For UniVerse, this code you gave me should do the trick. I did not know about the STATUS command. I have worked in Reality, Pick, Mentor, Ultimate, Prime, UniData for 28 years, but never in UniVerse.
Thanks again! Doug -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Allen Bell Sent: Thursday, November 09, 2006 8:30 AM To: u2-users@listserver.u2ug.org Subject: Re: [U2] Universe Equivalent of the UnIData DIR command Doug, You didn't state whether this is a hashed file or a file produced from some other OS level application which would make some difference, but there are a number of ways to do this in UniVerse. If the file you are interested in is a UniVerse hashed file you can try and open it with the OPENPATH statement (or any of the other possibilities like referencing it through a Q-pointer with the OPEN statement). If the file doesn't exist, the ELSE clause of the OPENPATH or OPEN statement will be taken. If the file is not a UniVerse hashed file you can always try and open it with the OPENSEQ statement by using the directory path to the file. Once again, if the file doesn't exist, the ELSE clause will be taken. Either way, once the file is open you can use the Basic STATUS statement on the file variable to return a wealth of information about the file, all the fields you are interested in plus many more fields. Example: OPENSEQ '/etc/passwd' TO PASSWD.FILE ELSE CRT 'Cannot open the unix file of all valid users' STOP END STATUS FILE.PROPERTIES FROM PASSWD.FILE THEN CRT 'The size of /etc/passwd is ':FILE.PROPERTIES<6,1,1> CRT 'The permissions of /etc/passwd are ':FILE.PROPERTIES<5,1,1> END ELSE CRT 'Could not retrieve status on /etc/passed' END From TCL: HELP BASIC STATUS HELP BASIC OPENSEQ HELP BASIC OPENPATH From the Basic manual (CD) you can check each of these commands for a more detailed explanation including how to use $INCLUDE UNIVERSE.INCLUDE FILEINFO.H which will let you retrieve about 90 different properties of of the file by name rather than <attribute,value,subvalue> [EMAIL PROTECTED] wrote: > Universe has a STATUS statement (not the function) and a FILEINFO() > function. I think the STATUS statement will return most of what you > are looking for. > > >> -----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of Doug Farmer >> Sent: Tuesday, November 07, 2006 4:12 PM >> To: u2-users@listserver.u2ug.org >> Subject: [U2] Universe Equivalent of the UnIData DIR command >> >> >> Similar to my last post, Is there is a command that works the same as >> the UniData DIR command under UniVerse. I have not been able to find >> any items in the UniVerse documentation that comes close. I am using >> the DIR command to determine if a file exists at the OA level. >> >> The UnIData DIR command returns the file size in bytes, last modified >> date, last modified time, and file permissions of a file. >> >> Again, I need this to work under Windows and Unix >> >> Thanks in Advance >> >> Doug Farmer >> >> >> This e-mail is for the use of the intended recipient(s) only. >> If you have received this e-mail in error, please notify the sender >> immediately and then delete it. If you are not the intended >> recipient, you must not use, disclose or distribute this e-mail >> without the author's prior permission. We have taken precautions to >> minimize the risk of transmitting software viruses, but we advise you >> to carry out your own virus checks on any attachment to this message. >> We cannot accept liability for any loss or damage caused by software >> viruses. >> ------- >> u2-users mailing list >> u2-users@listserver.u2ug.org >> To unsubscribe please visit http://listserver.u2ug.org/ >> > ------- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's prior permission. We have taken precautions to minimize the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this message. We cannot accept liability for any loss or damage caused by software viruses. ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/