dbTalk Databases Forums  

Universe LISTFILES program

comp.databases.pick comp.databases.pick


Discuss Universe LISTFILES program in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ed Sheehan
 
Posts: n/a

Default Universe LISTFILES program - 01-22-2007 , 11:32 AM






Does anyone have the source for Universe's LISTFILES program? I need to
determine which files are local and which are remote. The LISTFL verb points
to *LISTFILES which I can't find the source to.

Alternatively, If someone can explain how LISTFILES determines local/remote
status, that would be just as good.

Thanks,

Ed



Reply With Quote
  #2  
Old   
Pickie
 
Posts: n/a

Default Re: Universe LISTFILES program - 01-22-2007 , 02:33 PM







Ed Sheehan wrote:
Quote:
Does anyone have the source for Universe's LISTFILES program? I need to
determine which files are local and which are remote. The LISTFL verb points
to *LISTFILES which I can't find the source to.

Alternatively, If someone can explain how LISTFILES determines local/remote
status, that would be just as good.

Thanks,

Ed
In both cases TYPE = "F".

Local has selection criteria F2 NOT.MATCHING ".../..." AND F2
NOT.MATCHING "...\..."

Remote has selection criteria F2 MATCHING ".../..." OR F2 MATCHING
"...\..."

Regards, Keith



Reply With Quote
  #3  
Old   
Ed Sheehan
 
Posts: n/a

Default Re: Universe LISTFILES program - 01-22-2007 , 02:43 PM



Thanks Keith,

I suspected it had something to do with slashes. I've noticed that many
local files can/do have slashes as well (pointing to their own account), so
I'll need to do some further processing, but this will start the ball
rolling.

Thanks again,

Ed

"Pickie" <keith.johnson (AT) datacom (DOT) co.nz> wrote

Quote:
Ed Sheehan wrote:
Does anyone have the source for Universe's LISTFILES program? I need to
determine which files are local and which are remote. The LISTFL verb
points
to *LISTFILES which I can't find the source to.

Alternatively, If someone can explain how LISTFILES determines
local/remote
status, that would be just as good.

Thanks,

Ed

In both cases TYPE = "F".

Local has selection criteria F2 NOT.MATCHING ".../..." AND F2
NOT.MATCHING "...\..."

Remote has selection criteria F2 MATCHING ".../..." OR F2 MATCHING
"...\..."

Regards, Keith




Reply With Quote
  #4  
Old   
Clifton Oliver
 
Posts: n/a

Default Re: Universe LISTFILES program - 01-22-2007 , 03:16 PM



On 2007-01-22 12:43:39 -0800, "Ed Sheehan" <NOedsSPAM (AT) xmission (DOT) com> said:

Quote:
Thanks Keith,

I suspected it had something to do with slashes. I've noticed that many
local files can/do have slashes as well (pointing to their own
account), so I'll need to do some further processing, but this will
start the ball rolling.

Thanks again,

Ed

"Pickie" <keith.johnson (AT) datacom (DOT) co.nz> wrote in message
news:1169498001.635688.177310 (AT) m58g2000cwm (DOT) googlegroups.com...

Ed Sheehan wrote:
Does anyone have the source for Universe's LISTFILES program? I need to
determine which files are local and which are remote. The LISTFL verb points
to *LISTFILES which I can't find the source to.

Alternatively, If someone can explain how LISTFILES determines local/remote
status, that would be just as good.

Thanks,

Ed

In both cases TYPE = "F".

Local has selection criteria F2 NOT.MATCHING ".../..." AND F2
NOT.MATCHING "...\..."

Remote has selection criteria F2 MATCHING ".../..." OR F2 MATCHING
"...\..."

Regards, Keith
You can also open the file to a filevar, use the STATUS statement to
get a dynamic array of information about the file. Field 27 is the full
pathname to the file. Compare that (or portions of it) to the pathname
to the directory you are in.


--

Regards,

Clif

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
W. Clifton Oliver, CCP
CLIFTON OLIVER & ASSOCIATES
Tel: +1 619 460 5678 Web: www.oliver.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




Reply With Quote
  #5  
Old   
Chuck
 
Posts: n/a

Default Re: Universe LISTFILES program - 01-23-2007 , 12:48 PM



Clifton Oliver wrote:

Quote:
You can also open the file to a filevar, use the STATUS statement
!!! Note: status STATEMENT, not function. !!!

Quote:
to get a dynamic array of information about the file. Field 27 is the full
pathname to the file. Compare that (or portions of it) to the pathname
to the directory you are in.
As a matter of fact, I keep a set of I-descriptors in DICT VOC (I share
one D_VOC across all accounts.) that extracts most of the STATUS info
and makes it generally available to SELECT & LIST. Each I-desc
displays a separate field from the array generated by STATUS.

FILEINFO function, too.

cds



Reply With Quote
  #6  
Old   
Ed Sheehan
 
Posts: n/a

Default Re: Universe LISTFILES program - 01-23-2007 , 03:15 PM



FWIW, I'm reading the F-item from each account's VOC. If there are no
slashes in attribute 2, I set a variable to the root dir (everything starts
out in /prod), then the account name, then the file name, so the end result
for a native file of ACCOUNT.PERIODS in the PR.BACKUP account would be
/prod/PR.BACKUP/ACCOUNT.PERIODS. I do the same for attribute 3, since both
dict and data may or may not have pathing embedded independently of each
other.

If there are already slashes, I leave the pathing intact. I write each new
F-pointer to my own VOC's REMOTE.QFILE item, then open the qfile and
READNEXT once to see if it's populated. Then on to the next F-pointer, then
the next account until all accounts are parsed.

This is a very old legacy system, and over the years, many programmers (some
were former engine mechanics, no joke) would stick their own F-pointers in
various VOCs in the system. This all needs to be data-warehoused, hence the
need to find them all from one location. There are many duplicate file
paths, so the last step is to delete all but one path (in my own workspace
of course). I should end up with one path per location to grab.

Am I correct in observing that, if the F-pointer has embedded pathing, the
STATUS Field 27 is always the same as the contents of the F-pointer?

Thanks for the info!

Ed

"Chuck" <charles.stevenson (AT) getronics (DOT) com> wrote

Quote:
Clifton Oliver wrote:

You can also open the file to a filevar, use the STATUS statement

!!! Note: status STATEMENT, not function. !!!

to get a dynamic array of information about the file. Field 27 is the
full
pathname to the file. Compare that (or portions of it) to the pathname
to the directory you are in.

As a matter of fact, I keep a set of I-descriptors in DICT VOC (I share
one D_VOC across all accounts.) that extracts most of the STATUS info
and makes it generally available to SELECT & LIST. Each I-desc
displays a separate field from the array generated by STATUS.

FILEINFO function, too.

cds




Reply With Quote
  #7  
Old   
Clifton Oliver
 
Posts: n/a

Default Re: Universe LISTFILES program - 01-24-2007 , 12:16 PM



On 2007-01-23 13:15:28 -0800, "Ed Sheehan" <NOedsSPAM (AT) xmission (DOT) com> said:

Quote:
Am I correct in observing that, if the F-pointer has embedded pathing,
the STATUS Field 27 is always the same as the contents of the F-pointer?
Should be. But I've never tested it to see how it reacts to symbolic links.

- Clif



Reply With Quote
  #8  
Old   
news.skynet.be
 
Posts: n/a

Default Re: Universe LISTFILES program - 01-25-2007 , 07:21 AM



re,

the source code is stored into uvhome/BP
regards.

Manu
"Ed Sheehan" <NOedsSPAM (AT) xmission (DOT) com> a écrit dans le message de news:
ep2sg3$qu0$1 (AT) news (DOT) xmission.com...
Quote:
Does anyone have the source for Universe's LISTFILES program? I need to
determine which files are local and which are remote. The LISTFL verb
points to *LISTFILES which I can't find the source to.

Alternatively, If someone can explain how LISTFILES determines
local/remote status, that would be just as good.

Thanks,

Ed




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.