RE: [U2] Help with File Pointers

2007-03-18 Thread Bernard Lubin
How about using the FILEINFO function?  This will return the path name of
the 2 different files.

OPEN CUSTOMER TO F1 ELSE STOP
OPEN CUSTOMER2 TO F2 ELSE STOP
PATH1 = FILEINFO(F1,2)
PATH2 = FILEINFO(F2,2)

Rgds


Bernard Lubin
Development Department
Reynolds and Reynolds
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bob Woodward
Sent: Friday, 16 March 2007 3:40 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Help with File Pointers

But doesn't the locking let the same session set the same lock many
times?

BobW
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Rajkowski
Sent: Thursday, March 15, 2007 7:52 AM
To: u2-users@listserver.u2ug.org
Cc: [EMAIL PROTECTED]; u2-users@listserver.u2ug.org
Subject: RE: [U2] Help with File Pointers

If you are trying to determine that two files are pointing to the same
thing, you could set a lock on one and try to set it on the other.  If
it
will not let you do it, then you have the same file.

( note that my first thought was to write an item, but that could cause
problems if anyone else was using the file. )

give the lock a unique name like testingFilePointerTestProgram so you
don't
have issues with existing data.
---
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] Help with File Pointers

2007-03-16 Thread Don Verhagen
So Simple, yet effective.

Regards,


-- 

Donald Verhagen 
Application Development Manager
[EMAIL PROTECTED]
Tandem Staffing Solutions, Inc.
5901 Broken Sound Parkway NW, Suite 450
Boca Raton, FL 33487 USA
Voice Phone: 561.226.8261 Fax Phone: 561.226.8115


 On 3/15/2007 at 10:52 am, in message
[EMAIL PROTECTED], Michael
Rajkowski [EMAIL PROTECTED] wrote:
 If you are trying to determine that two files are pointing to the same
 thing, you could set a lock on one and try to set it on the other.  If it
 will not let you do it, then you have the same file.
 
 ( note that my first thought was to write an item, but that could cause
 problems if anyone else was using the file. )
 
 give the lock a unique name like testingFilePointerTestProgram so you don't
 have issues with existing data.
 ---
 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] Help with File Pointers

2007-03-15 Thread Michael Rajkowski
If you are trying to determine that two files are pointing to the same
thing, you could set a lock on one and try to set it on the other.  If it
will not let you do it, then you have the same file.

( note that my first thought was to write an item, but that could cause
problems if anyone else was using the file. )

give the lock a unique name like testingFilePointerTestProgram so you don't
have issues with existing data.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Help with File Pointers

2007-03-15 Thread Bob Woodward
But doesn't the locking let the same session set the same lock many
times?

BobW
 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Rajkowski
Sent: Thursday, March 15, 2007 7:52 AM
To: u2-users@listserver.u2ug.org
Cc: [EMAIL PROTECTED]; u2-users@listserver.u2ug.org
Subject: RE: [U2] Help with File Pointers

If you are trying to determine that two files are pointing to the same
thing, you could set a lock on one and try to set it on the other.  If
it
will not let you do it, then you have the same file.

( note that my first thought was to write an item, but that could cause
problems if anyone else was using the file. )

give the lock a unique name like testingFilePointerTestProgram so you
don't
have issues with existing data.
---
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] Help with File Pointers

2007-03-15 Thread Michael Rajkowski
Good point, so release it on the other file pointer, and then look at the
locktable to see if it is gone.





 Bob Woodward
 [EMAIL PROTECTED]
 sale.com  To
 Sent by:  u2-users@listserver.u2ug.org
 [EMAIL PROTECTED]  cc
 stserver.u2ug.org
   Subject
   RE: [U2] Help with File Pointers
 03/15/2007 10:40
 AM


 Please respond to
 [EMAIL PROTECTED]
er.u2ug.org






But doesn't the locking let the same session set the same lock many
times?

BobW


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Rajkowski
Sent: Thursday, March 15, 2007 7:52 AM
To: u2-users@listserver.u2ug.org
Cc: [EMAIL PROTECTED]; u2-users@listserver.u2ug.org
Subject: RE: [U2] Help with File Pointers

If you are trying to determine that two files are pointing to the same
thing, you could set a lock on one and try to set it on the other.  If
it
will not let you do it, then you have the same file.

( note that my first thought was to write an item, but that could cause
problems if anyone else was using the file. )

give the lock a unique name like testingFilePointerTestProgram so you
don't
have issues with existing data.
---
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/

[demime 1.01d removed an attachment of type image/gif which had a name of 
graycol.gif]

[demime 1.01d removed an attachment of type image/gif which had a name of 
pic22882.gif]

[demime 1.01d removed an attachment of type image/gif which had a name of 
ecblank.gif]
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Help with File Pointers

2007-03-15 Thread Michael Rajkowski
Another thing you can try is something like this:

001: *
002: OPEN CUSTOMER TO FILEONE ELSE STOP 
003: OPEN MYCUSTOMER TO FILETWO ELSE STOP 
004: *
005: READU REC FROM FILEONE, MIKETEST ELSE REC = 
006: STATUS = RECORDLOCKED(FILETWO, MIKETEST )
007: PRINT STATUS

Note that the RECORDLOCKED function will 0 if not locked, so if 0 no lock,
and different files.





 Bob Woodward
 [EMAIL PROTECTED]
 sale.com  To
 Sent by:  u2-users@listserver.u2ug.org
 [EMAIL PROTECTED]  cc
 stserver.u2ug.org
   Subject
   RE: [U2] Help with File Pointers
 03/15/2007 10:40
 AM


 Please respond to
 [EMAIL PROTECTED]
er.u2ug.org






But doesn't the locking let the same session set the same lock many
times?

BobW


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Rajkowski
Sent: Thursday, March 15, 2007 7:52 AM
To: u2-users@listserver.u2ug.org
Cc: [EMAIL PROTECTED]; u2-users@listserver.u2ug.org
Subject: RE: [U2] Help with File Pointers

If you are trying to determine that two files are pointing to the same
thing, you could set a lock on one and try to set it on the other.  If
it
will not let you do it, then you have the same file.

( note that my first thought was to write an item, but that could cause
problems if anyone else was using the file. )

give the lock a unique name like testingFilePointerTestProgram so you
don't
have issues with existing data.
---
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/

[demime 1.01d removed an attachment of type image/gif which had a name of 
graycol.gif]

[demime 1.01d removed an attachment of type image/gif which had a name of 
pic04151.gif]

[demime 1.01d removed an attachment of type image/gif which had a name of 
ecblank.gif]
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Help with File Pointers

2007-03-13 Thread brian
Oh and one more thing came to mind.

Windows still supports the old DOS SUBST command.

Brian

Susan Joslyn wrote:
 On help with file pointers thanks to everyone who has
pitched in. 
 So far I'm no joy.
 FILEINFO doesn't return just a hard path.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Help with File Pointers

2007-03-13 Thread [EMAIL PROTECTED]
Susan Joslyn wrote:
 On help with file pointers thanks to everyone who has
pitched in. 
 So far I'm no joy.
 FILEINFO doesn't return just a hard path.
 STATUS doesn't seem to return anything.
 Ls -I might do the trick on UNIX but I need a Windows
solution, too
 (and first).
 
 I think I can do the peel back/parsing thing.  Was hoping
not to have
 to do that.

As far as parsing is concerned, you just need to realise
that every 'abc\..\' can just be removed.  I'd run the
FILEINFO, then convert '/\' to @FM:@FM in the result and
then walk the resulting dynamic array.  Everytime you hit a
'..' you can back up one, delete two attributes and resume
your walk from where you are.

As to the ls -i idea on UNIX to sort out sym links, a better
bet would be to start with FILEINFO as before, hack off the
last bit of the path - the file - and then execute '(cd
THE_PATH_BIT; /usr/bin/pwd)' and capture the output which
will be the real path.  Make sure to use a standalone pwd
program though, not the shell built-in.

Of course, the real nasty is that on Windows there is a sym
link concept called a junction that does the same thing, and
I can't think of a way to resolve that.  Luckily very few
people use them (there's a tool at sysinternals.com for
creating, querying and deleting them).

Cheers,

Ken
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Help with File Pointers

2007-03-13 Thread Rod Hills
Susan,

The FILEINFO path probabily isn't a good recommendation in that it
relies on the entry being their and it will take a lot more overhead.

Here is a small basic program that will parse a relative path.
0001 x=../../this.path/that.path/BANANA
0002 h=/u1/uv/spool
0003 if x[1,1] ne / then x=h:/:x
0004 dim a(30)
0005 matparse a from x using / setting n
0006 i=0
0007 j=0
0008 loop while i  n
0009  i+=1
0010  j+=1
0011  if a(i) eq .. then j=j-1
0012  else a(j)=a(i)
0013 repeat
0014 matbuild x from a,1,j using /
0015 print x

Hope this is what you can use...

Rod Hills

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, March 12, 2007 1:19 PM
To: [EMAIL PROTECTED]
Cc: u2-users@listserver.u2ug.org
Subject: RE: [U2] Help with File Pointers

quote who=Susan Joslyn
 Hi Karl,
 Thanks! The thing is, I can figure out where I am, but I need to
figure
 out where two Fpointers are pointing.

 Say I have two Fpointers (VOC entries):

 001 F
 002 ../../this.path/that.path/BANANA
 003 ../../this.path/that.path/D_BANANA

 And another
 001 F
 002 /u1/ud/this.path/that.path/BANANA
 003 /u1/ud/this.path/that.path/BANANA

 How do I determine for certain that they are (or are not) pointing to
the
 same exact file?

If you SH out to a command prompt, then you can do

cd line 2 on each F-Ptr minus the file itself. If you do this in 2
different command prompts, then type PWD in each, you'll see the exact
path, and if it matches, then you are looking at the same file.

This is one reason not to use relative file points to 'remote' files.
It's
better to use Q-pointers.

I hope this is more clear that my previous feeble attempt.

Karl



 Susan





-- 
Karl Pearson
Director of I.T.
ATS Industrial Supply, Inc.
[EMAIL PROTECTED]
http://www.atsindustrial.com
800-789-9300 x29
Local: 801-978-4429
Fax: 801-972-3888

To mess up your Linux PC, you have to really work at it;
 to mess up a microsoft PC you just have to work on it.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
___

This e-mail and any attachments are for the sole use of the 
intended recipient(s) and may contain privileged and 
confidential information. Any unauthorized review, use, 
disclosure or distribution is strictly prohibited. If you are not 
the intended recipient(s), please contact the sender by reply 
e-mail and destroy all copies of the original message.
Thank you.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


[U2] Help with File Pointers

2007-03-12 Thread Susan Joslyn
Hi group.

 

I'm trying to compare two file pointers to see if they are the same. Like
this example:

 

../../this.path/that.path/BANANA

 

And 

 

/u1/ud/this.path/that.path/BANANA

 

I think what I'd want to do is start by resolving a path that had the
relative path indicators ../ in it.  Anyone know an easy way to do that?

 

Likewise, paths can begin with @UDTHOME (and something similar on Universe?)

 

Anyone know of a comprehensive list of the options on both platforms (all I
know about is the ../.. stuff for like this path and @UDTHOME for the udt
home path variable (PATH = GETENV(UDTHOME)) and the easiest way to resolve
them?

 

Susan

P.s. digest subscriber, so copy me directly or be patient for my response!
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Help with File Pointers

2007-03-12 Thread karlp
quote who=Susan Joslyn
 Hi group.

 I'm trying to compare two file pointers to see if they are the same. Like
 this example:
 ../../this.path/that.path/BANANA
 And
 /u1/ud/this.path/that.path/BANANA

 I think what I'd want to do is start by resolving a path that had the
 relative path indicators ../ in it.  Anyone know an easy way to do that?

pwd = print working directory. The account you are in is the results of
pwd. This command is run at the OS level. You can also just type SH at
TCL/ECL and the type  cd ../.. and see where you find yourself.




 Likewise, paths can begin with @UDTHOME (and something similar on
 Universe?)

You can type echo $UDTHOME to find out what the path is.



 Anyone know of a comprehensive list of the options on both platforms (all
 I
 know about is the ../.. stuff for like this path and @UDTHOME for the
 udt
 home path variable (PATH = GETENV(UDTHOME)) and the easiest way to resolve
 them?

env|grep $PWD will give you the working directory of a session. I don't
know if that helps, but I use it...

Karl



 Susan

 P.s. digest subscriber, so copy me directly or be patient for my response!
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/



-- 
Karl Pearson
Director of I.T.
ATS Industrial Supply, Inc.
[EMAIL PROTECTED]
http://www.atsindustrial.com
800-789-9300 x29
Local: 801-978-4429
Fax: 801-972-3888

To mess up your Linux PC, you have to really work at it;
 to mess up a microsoft PC you just have to work on it.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Help with File Pointers

2007-03-12 Thread Brian Leach
Susan

UniVerse thankfully doesn't have the @ variable insertion.
Remember that on Windows, forward and backward slashes can be generally used
indiscrimiately, e.g.

C:\data\myaccount/myfile

Then of course there are symbolic links under UNIX, case insensitivity in
Windows..

Brian 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn
 Sent: 12 March 2007 19:35
 To: u2-users@listserver.u2ug.org
 Subject: [U2] Help with File Pointers
 
 Hi group.
 
  
 
 I'm trying to compare two file pointers to see if they are 
 the same. Like this example:
 
  
 
 ../../this.path/that.path/BANANA
 
  
 
 And 
 
  
 
 /u1/ud/this.path/that.path/BANANA
 
  
 
 I think what I'd want to do is start by resolving a path that 
 had the relative path indicators ../ in it.  Anyone know an 
 easy way to do that?
 
  
 
 Likewise, paths can begin with @UDTHOME (and something 
 similar on Universe?)
 
  
 
 Anyone know of a comprehensive list of the options on both 
 platforms (all I know about is the ../.. stuff for like this 
 path and @UDTHOME for the udt home path variable (PATH = 
 GETENV(UDTHOME)) and the easiest way to resolve them?
 
  
 
 Susan
 
 P.s. digest subscriber, so copy me directly or be patient for 
 my response!
 ---
 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] Help with File Pointers

2007-03-12 Thread Susan Joslyn
Hi Karl,
Thanks! The thing is, I can figure out where I am, but I need to figure
out where two Fpointers are pointing.

Say I have two Fpointers (VOC entries):

001 F
002 ../../this.path/that.path/BANANA
003 ../../this.path/that.path/D_BANANA

And another
001 F
002 /u1/ud/this.path/that.path/BANANA
003 /u1/ud/this.path/that.path/BANANA

How do I determine for certain that they are (or are not) pointing to the
same exact file?

Susan
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Help with File Pointers

2007-03-12 Thread Susan Joslyn
Karl,
Thanks again. It is clear -- I think.  But unless I'm still
misunderstanding, you are giving me tools that I could use with my fingers
on a keyboard and I'm wanting to build a program smart enough to look at
static file pointers (fpointers) and resolve them to determine if they are
pointing to the same place. 

Susan

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 12, 2007 4:19 PM
To: [EMAIL PROTECTED]
Cc: u2-users@listserver.u2ug.org
Subject: RE: [U2] Help with File Pointers


quote who=Susan Joslyn
 Hi Karl,
 Thanks! The thing is, I can figure out where I am, but I need to figure
 out where two Fpointers are pointing.

 Say I have two Fpointers (VOC entries):

 001 F
 002 ../../this.path/that.path/BANANA
 003 ../../this.path/that.path/D_BANANA

 And another
 001 F
 002 /u1/ud/this.path/that.path/BANANA
 003 /u1/ud/this.path/that.path/BANANA

 How do I determine for certain that they are (or are not) pointing to the
 same exact file?

If you SH out to a command prompt, then you can do

cd line 2 on each F-Ptr minus the file itself. If you do this in 2
different command prompts, then type PWD in each, you'll see the exact
path, and if it matches, then you are looking at the same file.

This is one reason not to use relative file points to 'remote' files. It's
better to use Q-pointers.

I hope this is more clear that my previous feeble attempt.

Karl



 Susan





-- 
Karl Pearson
Director of I.T.
ATS Industrial Supply, Inc.
[EMAIL PROTECTED]
http://www.atsindustrial.com
800-789-9300 x29
Local: 801-978-4429
Fax: 801-972-3888

To mess up your Linux PC, you have to really work at it;
 to mess up a microsoft PC you just have to work on it.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Help with File Pointers

2007-03-12 Thread Mark Eastwood
Try opening the two files, then comparing using FILEINFO(filename,2);
this gives the path to file.



-Original Message-

Thanks again. It is clear -- I think.  But unless I'm still
misunderstanding, you are giving me tools that I could use with my
fingers
on a keyboard and I'm wanting to build a program smart enough to look at
static file pointers (fpointers) and resolve them to determine if they
are
pointing to the same place. 

p://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [Spam-Low] RE: [U2] Help with File Pointers

2007-03-12 Thread Lee H. Burstein
Susan,

You can execute an ls -i for each path (ls -i ../../blahblah). This returns
the inode for the file. If the inode is the same, the files are the same
(one inode for each file).


Lee H. Burstein
President
Dynamic Systems, Inc.
302-477-0180 
Fax: 270-574-0180
www.dynamicsys.com

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn
Sent: Monday, March 12, 2007 4:09 PM
To: [EMAIL PROTECTED]; u2-users@listserver.u2ug.org
Subject: [Spam-Low] RE: [U2] Help with File Pointers

Hi Karl,
Thanks! The thing is, I can figure out where I am, but I need to figure
out where two Fpointers are pointing.

Say I have two Fpointers (VOC entries):

001 F
002 ../../this.path/that.path/BANANA
003 ../../this.path/that.path/D_BANANA

And another
001 F
002 /u1/ud/this.path/that.path/BANANA
003 /u1/ud/this.path/that.path/BANANA

How do I determine for certain that they are (or are not) pointing to the
same exact file?

Susan
---
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: Spam:RE: [U2] Help with File Pointers

2007-03-12 Thread Jerry
In UniVerse use the UniBasic STATUS statement and use either the 10th or 
20th field.


- Original Message - 
From: Susan Joslyn [EMAIL PROTECTED]

To: [EMAIL PROTECTED]; u2-users@listserver.u2ug.org
Sent: Monday, March 12, 2007 2:09 PM
Subject: Spam:RE: [U2] Help with File Pointers



Hi Karl,
Thanks! The thing is, I can figure out where I am, but I need to figure
out where two Fpointers are pointing.

Say I have two Fpointers (VOC entries):

001 F
002 ../../this.path/that.path/BANANA
003 ../../this.path/that.path/D_BANANA

And another
001 F
002 /u1/ud/this.path/that.path/BANANA
003 /u1/ud/this.path/that.path/BANANA

How do I determine for certain that they are (or are not) pointing to the
same exact file?

Susan
---
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] Help with File Pointers

2007-03-12 Thread David Wolverton
I like this answer even better!!  I forget about FILEINFO! 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Mark Eastwood
 Sent: Monday, March 12, 2007 3:31 PM
 To: u2-users@listserver.u2ug.org; [EMAIL PROTECTED]
 Subject: RE: [U2] Help with File Pointers
 
 Try opening the two files, then comparing using 
 FILEINFO(filename,2); this gives the path to file.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Help with File Pointers

2007-03-12 Thread David Wolverton
If you have the current 'path' then .. is always the path before...

So if you are sitting in c:\IBM\ACCOUNTS\TESTIT

And the path in the VOC is to ..\..\bin

You can 'peel back' on each .. to the layer before:

So ..\..\bin would turn

C:\IBM\ACCOUNTS\TESTIT   into
C:\IBM\bin

You would count the number of ..s and chop that number of segments off the
end of the current path... Two ..s peel off 2 segments.

Then stick whatever is after the ..s on the end...

As for the @UDTHOME and the like - you'd want to do a 'swap' to get those to
work.  And I'd likely 'fix' the path \ or / to be whichever you'd rather
work with since they behave the same in UniData...

DW

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn
 Sent: Monday, March 12, 2007 3:23 PM
 To: [EMAIL PROTECTED]
 Cc: u2-users@listserver.u2ug.org
 Subject: RE: [U2] Help with File Pointers
 
 Karl,
 Thanks again. It is clear -- I think.  But unless I'm still 
 misunderstanding, you are giving me tools that I could use 
 with my fingers on a keyboard and I'm wanting to build a 
 program smart enough to look at static file pointers 
 (fpointers) and resolve them to determine if they are 
 pointing to the same place. 
 
 Susan
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Help with File Pointers

2007-03-12 Thread Jeff Schasny
This: ../.. means the directory above the directory above the one I'm in 
right now, so by knowing where you are right now (pwd) you can fill in 
the complete path.and compare apples to apples


Susan Joslyn wrote:

Hi Karl,
Thanks! The thing is, I can figure out where I am, but I need to figure
out where two Fpointers are pointing.

Say I have two Fpointers (VOC entries):

001 F
002 ../../this.path/that.path/BANANA
003 ../../this.path/that.path/D_BANANA

And another
001 F
002 /u1/ud/this.path/that.path/BANANA
003 /u1/ud/this.path/that.path/BANANA

How do I determine for certain that they are (or are not) pointing to the
same exact file?

Susan
---
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: [Spam-Low] RE: [U2] Help with File Pointers

2007-03-12 Thread Bob Wyatt
Re: Susan,

You can execute an ls -i for each path (ls -i ../../blahblah). This returns
the inode for the file. If the inode is the same, the files are the same
(one inode for each file).


Lee H. Burstein

Lee, this is on face value okay, but technically wrong; there is a chance
that filea in file system x has the same inode as fileb in file system y
share the same inode number. I wouldn't want to calculate those odds or
chances, but ...
Inode numbers are assigned per file system, I believe...

Bob Wyatt
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Help with File Pointers

2007-03-12 Thread Baakkonen, Rodney A (Rod) 46K
Just to add one more possible complication to your scenario. Depending on the 
software or the UNIX admin people, you may need to worry about symbolic links 
at a UNIX level.

For example, lets say you are in Unidata in the directory /usr/ud/ROD. In the 
VOC for this directory is a file called RODS.FILE, where the VOC entry looked 
like:

1. D
2. RODS.FILE
3. D_RODS.FILE

It would appear that this file lived in the current directory where the VOC is. 
But at a UNIX level, there could be a symbolic links that says:

lrwxrwxrwx   1 root udtgrp 34 Mar  6 20:18 ROD.FILE - 
/usr/ud/SUSAN/RODS.FILE

So RODS.FILE is really lives in another directory called SUSAN.

The person doing this should have changed the VOC pointer. But a lot of times 
UNIX (Unidata phobic) types will move the file to keep a file system from 
filling up and create a symbolic link to where it lives now.

Just thought I would throw that scenario out there just in case you had not 
thought about it. -Rod

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Susan Joslyn
Sent: Monday, March 12, 2007 1:35 PM
To: u2-users@listserver.u2ug.org
Subject: [U2] Help with File Pointers


Hi group.

 

I'm trying to compare two file pointers to see if they are the same. Like
this example:

 

../../this.path/that.path/BANANA

 

And 

 

/u1/ud/this.path/that.path/BANANA

 

I think what I'd want to do is start by resolving a path that had the
relative path indicators ../ in it.  Anyone know an easy way to do that?

 

Likewise, paths can begin with @UDTHOME (and something similar on Universe?)

 

Anyone know of a comprehensive list of the options on both platforms (all I
know about is the ../.. stuff for like this path and @UDTHOME for the udt
home path variable (PATH = GETENV(UDTHOME)) and the easiest way to resolve
them?

 

Susan

P.s. digest subscriber, so copy me directly or be patient for my response!
---
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] Help with File Pointers

2007-03-12 Thread Susan Joslyn
The FILEINFO idea is a good one -- but it will not serve.
[SJ] 

Here's one file pointer 
 

PRCPROCESS:

F

PRCPROCESS

D_PRCPROCESS


Here's the other:

DEMO.DOTS:

F

..\PRC\PRCPROCESS

..\PRC\D_PRCPROCESS


They actually do point to the same file.  But the output of FILEINFO IS
THIS:

FILE NAME = DEMO.DOTS,  FILEINFO.PATH = C:\SJ\REALMS\PRC\..\PRC\PRCPROCESS

FILE NAME = PRCPROCESS, FILEINFO.PATH = C:\SJ\REALMS\PRC\PRCPROCESS


So you wouldn't be able to tell by comparing those that they were the same.
You still have to resolve the dot business somehow.

Susan
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Help with File Pointers

2007-03-12 Thread karlp
That's a pain. Have you dont the STATUS test to see if it points out the
correct file path? I will guess it will produce the same results as
FILEINFO, however am curious. We use nothing but Q-pointers for just this
reason.

This, however, brings me to what I think is an undocumented feature of
uniVerse. In a past life, I setup and managed a test server for training
clients. I found that uniVerse could operate very nicely without entering
accounts into the UV.ACCOUNT file. In fact, if accounts were NOT entered
into that system-wide file, uniVerse could be secured pretty nicely and
the same product could be installed many times as long as one rule was
followed: Each product installation had to be in the same directory. I.e.

DBACCT where the database files are kept
USRACCT where the users login to work
ADMINACCT where the client admin controls whatever
BPACCT where the source code the users run is kept

If they were in /u1/TRAIN1 you could put another identical set in
/u1/TRAIN2, etc. You would then create a login mechanism that allows users
to login to a specific account depending on the classroom used, or some
other criteria. Doing a LOGTO ADMINACCT from TRAIN1, for example, would
work and never be confused with TRAIN2, etc. The admin (me in this case)
could do CHDIR /u1/TRAIN2/ADMINACCT if wanted to change environments,
however. Since the users can't get to TCL, and the menuing software used
LOGTO, it wasn't a security risk in our case.

Now then, not applicable to this issue, but maybe someone can use it some
time, some where.

Karl


quote who=Susan Joslyn
 The FILEINFO idea is a good one -- but it will not serve.
 [SJ]

 Here's one file pointer


 PRCPROCESS:

 F

 PRCPROCESS

 D_PRCPROCESS


 Here's the other:

 DEMO.DOTS:

 F

 ..\PRC\PRCPROCESS

 ..\PRC\D_PRCPROCESS


 They actually do point to the same file.  But the output of FILEINFO IS
 THIS:

 FILE NAME = DEMO.DOTS,  FILEINFO.PATH = C:\SJ\REALMS\PRC\..\PRC\PRCPROCESS

 FILE NAME = PRCPROCESS, FILEINFO.PATH = C:\SJ\REALMS\PRC\PRCPROCESS


 So you wouldn't be able to tell by comparing those that they were the
 same.
 You still have to resolve the dot business somehow.

 Susan
 ---
 u2-users mailing list
 u2-users@listserver.u2ug.org
 To unsubscribe please visit http://listserver.u2ug.org/



-- 
Karl Pearson
Director of I.T.
ATS Industrial Supply, Inc.
[EMAIL PROTECTED]
http://www.atsindustrial.com
800-789-9300 x29
Local: 801-978-4429
Fax: 801-972-3888

To mess up your Linux PC, you have to really work at it;
 to mess up a microsoft PC you just have to work on it.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Help with File Pointers

2007-03-12 Thread David Wolverton
You're back to this logic then... Count the number of .. and chop that
number of elements off the end.

Then stuff everything AFTER the last ..s onto the end.

There are dozens of ways to do this that would blow up your logic -- I
suspect you'll get to find them one by one.  ;-)

David W.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 David Wolverton
 Sent: Monday, March 12, 2007 3:49 PM
 To: u2-users@listserver.u2ug.org
 Subject: RE: [U2] Help with File Pointers
 
 If you have the current 'path' then .. is always the path before...
 
 So if you are sitting in c:\IBM\ACCOUNTS\TESTIT
 
 And the path in the VOC is to ..\..\bin
 
 You can 'peel back' on each .. to the layer before:
 
 So ..\..\bin would turn
 
 C:\IBM\ACCOUNTS\TESTIT   into
 C:\IBM\bin
 
 You would count the number of ..s and chop that number of 
 segments off the end of the current path... Two ..s peel 
 off 2 segments.
 
 Then stick whatever is after the ..s on the end...
 
 As for the @UDTHOME and the like - you'd want to do a 'swap' 
 to get those to work.  And I'd likely 'fix' the path \ or / 
 to be whichever you'd rather work with since they behave the 
 same in UniData...
 
 DW
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


Re: [U2] Help with File Pointers

2007-03-12 Thread Don Verhagen
Susan,

I noticed that err..that other software...had problems with relative paths.

With SB Installed (and maybe without) you can get the base path of the ACCOUNT 
that the VOC from DMACCOUNTS1. You can then work with what the VOC entry from 
the path ACCOUNT in the account.

I think you're asking how to determine the full path even when you're not 
LOGGED to the ACCOUNT, correct?

Thanks,



-- 

Donald Verhagen 
Application Development Manager
[EMAIL PROTECTED]
Tandem Staffing Solutions, Inc.
5901 Broken Sound Parkway NW, Suite 450
Boca Raton, FL 33487 USA
Voice Phone: 561.226.8261 Fax Phone: 561.226.8115


 On 3/12/2007 at 5:18 pm, in message [EMAIL PROTECTED], Jeff
Schasny [EMAIL PROTECTED] wrote:
 This: ../.. means the directory above the directory above the one I'm in 
 right now, so by knowing where you are right now (pwd) you can fill in 
 the complete path.and compare apples to apples
 
 Susan Joslyn wrote:
 Hi Karl,
 Thanks! The thing is, I can figure out where I am, but I need to figure
 out where two Fpointers are pointing.

 Say I have two Fpointers (VOC entries):

 001 F
 002 ../../this.path/that.path/BANANA
 003 ../../this.path/that.path/D_BANANA

 And another
 001 F
 002 /u1/ud/this.path/that.path/BANANA
 003 /u1/ud/this.path/that.path/BANANA

 How do I determine for certain that they are (or are not) pointing to the
 same exact file?

 Susan
 ---
 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] Help with File Pointers

2007-03-12 Thread Bob Woodward
It looks like !VOC.PATHNAME will work to return the fully qualified path
of two VOC F file pointer entries.  Here's what I did:

ED BOBW.BP TEST.VOC.PATH
8 lines long.

: P
0001: CALL !VOC.PATHNAME(,TESTFILE,VOC.PATH,STATUS)
0002: IF STATUS = 0 THEN
0003:   PRINT TESTFILE PATH=:VOC.PATH
0004: END
0005: CALL !VOC.PATHNAME(,TESTFILE2,VOC.PATH2,STATUS)
0006: IF STATUS = 0 THEN
0007:   PRINT TESTFILE2 PATH = :VOC.PATH2
0008: END
Bottom at line 8.
: Q

ED VOC TESTFILE TESTFILE2

SELECTed record name = TESTFILE.
3 lines long.

: P
0001: F
0002: TESTFILE
0003: D_TESTFILE
Bottom at line 3.
: N

SELECTed record name = TESTFILE2.
3 lines long.

: P
0001: F
0002: ..\DEVACCT\TESTFILE
0003: ..\DEVACCT\D_TESTFILE
Bottom at line 3.
: Q

03 RUN BOBW.BP TEST.VOC.PATH
PM PATH=D:/data/adv/data/DEVACCT/TESTFILE
PM2 PATH = D:/data/adv/data/DEVACCT/TESTFILE


In both cases, I got the full path returned.  This is on a Windows 2003
system using Universe 10.1.18.

BobW
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Help with File Pointers

2007-03-12 Thread Womack, Adrian
FILEINFO always returns the correct fully resolved path (without any
double dots) under Universe on Unix. Maybe this problem only affects
Windows.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Susan Joslyn
Sent: Tuesday, 13 March 2007 6:40 AM
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Help with File Pointers

The FILEINFO idea is a good one -- but it will not serve.
[SJ] 

Here's one file pointer 
 

PRCPROCESS:

F

PRCPROCESS

D_PRCPROCESS


Here's the other:

DEMO.DOTS:

F

..\PRC\PRCPROCESS

..\PRC\D_PRCPROCESS


They actually do point to the same file.  But the output of FILEINFO IS
THIS:

FILE NAME = DEMO.DOTS,  FILEINFO.PATH =
C:\SJ\REALMS\PRC\..\PRC\PRCPROCESS

FILE NAME = PRCPROCESS, FILEINFO.PATH = C:\SJ\REALMS\PRC\PRCPROCESS


So you wouldn't be able to tell by comparing those that they were the
same.
You still have to resolve the dot business somehow.

Susan
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


DISCLAIMER:
Disclaimer.  This e-mail is private and confidential. If you are not the 
intended recipient, please advise us by return e-mail immediately, and delete 
the e-mail and any attachments without using or disclosing the contents in any 
way. The views expressed in this e-mail are those of the author, and do not 
represent those of this company unless this is clearly indicated. You should 
scan this e-mail and any attachments for viruses. This company accepts no 
liability for any direct or indirect damage or loss resulting from the use of 
any attachments to this e-mail.
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/