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.PROPERTIES6,1,1 CRT 'The permissions of /etc/passwd are ':FILE.PROPERTIES5,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/
RE: [U2] Universe Equivalent of the UnIData DIR command
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.PROPERTIES6,1,1 CRT 'The permissions of /etc/passwd are ':FILE.PROPERTIES5,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/
Re: [U2] Universe Equivalent of the UnIData DIR command
On windows do dos dir on *nix do sh ls -ailor similar. Rgds Symeon. On 07/11/06, Gordon J Glorfield [EMAIL PROTECTED] wrote: Doug, I'm afraid you're out of luck with this one. You'll have to write your own platform aware replacement. Yet another shortcoming of UniVerse as compared to UniData. Sorry, Gordon Gordon J. Glorfield Sr. Applications Developer UnitedHealthcare's Mid-Atlantic Health Plans 301-360-8839 [EMAIL PROTECTED] wrote on 11/07/2006 04:12:10 PM: 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 [snip] This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. --- 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/
RE: [U2] Universe Equivalent of the UnIData DIR command
Or . . . LIST UFD . . . Les Sherlock Hewkin Senior Developer Core Systems - 9951 01604 592289 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Symeon Breen Sent: 08 November 2006 09:45 To: u2-users@listserver.u2ug.org Subject: Re: [U2] Universe Equivalent of the UnIData DIR command On windows do dos dir on *nix do sh ls -ailor similar. Rgds Symeon. On 07/11/06, Gordon J Glorfield [EMAIL PROTECTED] wrote: Doug, I'm afraid you're out of luck with this one. You'll have to write your own platform aware replacement. Yet another shortcoming of UniVerse as compared to UniData. Sorry, Gordon Gordon J. Glorfield Sr. Applications Developer UnitedHealthcare's Mid-Atlantic Health Plans 301-360-8839 [EMAIL PROTECTED] wrote on 11/07/2006 04:12:10 PM: 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 [snip] This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. --- 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/ html head meta http-equiv=Content-type content=text/html; charset=UTF-8 /head body P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This e-mail and any attachments are confidential and intended solely for the use of the addressee only. If you have received this message in error, you must not copy, distribute or disclose the contents; please notify the sender immediately and delete the message. /SPAN/P P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'This message is attributed to the sender and may not necessarily reflect the view of Travis Perkins plc or its subsidiaries (Travis Perkins). Agreements binding Travis Perkins may not be concluded by means of e-mail communication. /SPAN/P P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'E-mail transmissions are not secure and Travis Perkins accepts no responsibility for changes made to this message after it was sent. Whilst steps have been taken to ensure that this message is virus free, Travis Perkins accepts no liability for infection and recommends that you scan this e-mail and any attachments. /SPAN/P P style=MARGIN-TOP: 0pt; MARGIN-BOTTOM: 0ptSPAN style=FONT-SIZE: 8.2pt; FONT-FAMILY: 'MS Sans Serif'Part of Travis Perkins plc. Registered Office: Lodge Way House, Lodge Way, Harlestone Road, Northampton, NN5 7UG. /SPAN/P /BODY /HTML --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] Universe Equivalent of the UnIData DIR command
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/
Re: [U2] Universe Equivalent of the UnIData DIR command
Doug, I'm afraid you're out of luck with this one. You'll have to write your own platform aware replacement. Yet another shortcoming of UniVerse as compared to UniData. Sorry, Gordon Gordon J. Glorfield Sr. Applications Developer UnitedHealthcare's Mid-Atlantic Health Plans 301-360-8839 [EMAIL PROTECTED] wrote on 11/07/2006 04:12:10 PM: 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 [snip] This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/