dbTalk Databases Forums  

d3 - How to check if variable is a filevariable ?

comp.databases.pick comp.databases.pick


Discuss d3 - How to check if variable is a filevariable ? in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Mike Preece
 
Posts: n/a

Default Re: d3 - How to check if variable is a filevariable ? - 01-23-2007 , 08:54 AM







Mike Preece wrote:

Quote:
Tony Gravagno wrote:

"Mike Preece" wrote:
What was that film?

Huh?

It was on again today.

I'm sure we've done this before - even though I can't find the previous
thread in the archives with a google search. It went on with your
question/challenge and culminated with you suggesting an alternative
work-around - a better one, actually - although WhatHaveIGot did work.

Mike.
I believe WhatHaveIGot will work on *nix and on some Windows vme files
but I can't check this right now as my D3 box is on a ship somewhere
between Aus and the UK.

Mike.

PS. Apologies for the extremely cryptic reference to Groundhog Day.



Reply With Quote
  #12  
Old   
Symeon
 
Posts: n/a

Default Re: d3 - How to check if variable is a filevariable ? - 01-23-2007 , 10:01 AM







Mike Preece wrote:

Quote:
as my D3 box is on a ship somewhere between Aus and the UK.

Mike.

Not on the MSC Napoli i hope



Reply With Quote
  #13  
Old   
GVP
 
Posts: n/a

Default Re: d3 - How to check if variable is a filevariable ? - 01-23-2007 , 04:33 PM




GVP wrote:
Quote:
Hi

Any empty file "MyDummyFile" should be present.


In PickBasic
* mvar is variable for test

tmpmvar=mvar

open "MyDummyFile" to tmpFileVar
close tmpFileVar

dummyFOFId=oconv("","u90")
close tmpmvar

mvarIsFileVar=0
IF dummyFOFId # oconv("","u90") THEN mvarIsFileVar=1


Reply With Quote
  #14  
Old   
GVP
 
Posts: n/a

Default Re: d3 - How to check if variable is a filevariable ? - 01-24-2007 , 07:52 PM



Additional description. This method based on CLOSE feature (tested on
D3 linux). "Close" can work with string and andefined variables without
error.
In this case it is enough make a copy of variable and then use Close
and oconv("","u90")

* TestVarIsFileVar(mvar , remvarIsFileVar)
tmpmvar=mvar

open "MyDummyFile" to tmpFileVar
close tmpFileVar

dummyFOFId=oconv("","u90")
close tmpmvar

mvarIsFileVar=0
IF dummyFOFId # oconv("","u90") THEN mvarIsFileVar=1
*return


Regards,
Grigory


Reply With Quote
  #15  
Old   
Mike Preece
 
Posts: n/a

Default Re: d3 - How to check if variable is a filevariable ? - 01-25-2007 , 05:37 AM





On Jan 25, 1:52 am, "GVP" <g... (AT) infotools (DOT) ru> wrote:
Quote:
Additional description. This method based on CLOSE feature (tested on
D3 linux). "Close" can work with string and andefined variables without
error.
In this case it is enough make a copy of variable and then use Close
and oconv("","u90")

* TestVarIsFileVar(mvar , remvarIsFileVar)
tmpmvar=mvar

open "MyDummyFile" to tmpFileVar
close tmpFileVar

dummyFOFId=oconv("","u90")
close tmpmvar

mvarIsFileVar=0
IF dummyFOFId # oconv("","u90") THEN mvarIsFileVar=1
*return

Regards,
Grigory
I can't check this but maybe someone else can and report back... I
believe u90 will work with all files opened using the MD file name in
the OPEN statement on D3/*nix and vme files on D3/NT. I don't believe
it will work when dealing with fsi files on D3/NT or with files opened
using a literal string of OSFI driver and/or path instead of the Id of
a file-pointer item in the MD.

Mike.
..



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.