How to check if a variable is a filevar

2004-04-25 Thread Neil Charrington

Hi,

Is there a way of checking to see if a variable is an opened file variable?
I can check if it is alpha, numeric, assigned and unassigned but I cannot
find anywhere where I can determine a filevar type.

My  problem is that a routine is sent an Array to be saved to a file but the
contents of that array are not known therefore I have to first convert any
AM's in each array element (for the MATWRITE/MATREAD to work) but I have now
come across a filevar in one of the elements - actually in 8 of them.

Before anyone starts making comments like:  "just don't allow it..." or
"what "idiot" programs that way anyway..." etc.. I had better explain what I
am doing and why I have the problem.

I am converting System Builder and SB+ apps to mv4GL and one of the
functions is to save the user's available common area to disk and restore
them.  Unfortunately the common variables can be used for any purpose and
although there are specific variables designed for opening files, this
particular app has opened them to a general PARAMS variable.  In this latest
conversion, so far every part of SB+ (except security) is converted 100% and
the run-time executes 99.99% of the converted app - the only problem I have
come across during my testing is this one.

Sorry, this is sounding as though it is becoming an AD.  Not my intention.

Thanks for your help.

Regards,

Neil.
--
Neil Charrington
C.A. Software Systems
www.casoftware.co.uk
www.mv4gl.com




--
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.659 / Virus Database: 423 - Release Date: 15/04/2004


-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: How to check if a variable is a filevar

2004-04-25 Thread Gyle Iverson
>On Behalf Of Neil Charrington
>Is there a way of checking to see if a variable is an opened 
>file variable?

The the FileInfo() function will answer your question. Use the
FINFO$IS.FILEVAR key.

HTH,
Gyle


-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: How to check if a variable is a filevar

2004-04-25 Thread Alan Campbell
Neil, Anyone who posts a question so ealry on a sunday (even with the time zone 
difference) deserves an answer.
I don't have access to a system right now, but what about FILEINFO? It should return 
meaningful data for a file variable, and probably nothing for a non-file pointer. You 
could check that.
 
HTH,
Alan

-Original Message- 
From: Neil Charrington [mailto:[EMAIL PROTECTED] 
Sent: Sun 25/04/2004 5:07 AM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: How to check if a variable is a filevar




Hi,

Is there a way of checking to see if a variable is an opened file variable?
I can check if it is alpha, numeric, assigned and unassigned but I cannot
find anywhere where I can determine a filevar type.

My  problem is that a routine is sent an Array to be saved to a file but the
contents of that array are not known therefore I have to first convert any
AM's in each array element (for the MATWRITE/MATREAD to work) but I have now
come across a filevar in one of the elements - actually in 8 of them.

Before anyone starts making comments like:  "just don't allow it..." or
"what "idiot" programs that way anyway..." etc.. I had better explain what I
am doing and why I have the problem.

I am converting System Builder and SB+ apps to mv4GL and one of the
functions is to save the user's available common area to disk and restore
them.  Unfortunately the common variables can be used for any purpose and
although there are specific variables designed for opening files, this
particular app has opened them to a general PARAMS variable.  In this latest
conversion, so far every part of SB+ (except security) is converted 100% and
the run-time executes 99.99% of the converted app - the only problem I have
come across during my testing is this one.

Sorry, this is sounding as though it is becoming an AD.  Not my intention.

Thanks for your help.

Regards,

Neil.
--
Neil Charrington
C.A. Software Systems
www.casoftware.co.uk
www.mv4gl.com




--
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.659 / Virus Database: 423 - Release Date: 15/04/2004


--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: How to check if a variable is a filevar

2004-04-25 Thread Neil Charrington

Thanks Alan and Gyle.  My original post was at around 10am this morning (Sunday), 
according to my log, so not too early ;o)

I will try using the FILEINFO() function.

Neil.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Alan Campbell
Sent: 25 April 2004 17:08
To: U2 Users Discussion List
Subject: RE: How to check if a variable is a filevar


Neil, Anyone who posts a question so ealry on a sunday (even with the time zone 
difference) deserves an answer.
I don't have access to a system right now, but what about FILEINFO? It should return 
meaningful data for a file variable, and probably nothing for a non-file pointer. You 
could check that.
 
HTH,
Alan

-Original Message- 
From: Neil Charrington [mailto:[EMAIL PROTECTED] 
Sent: Sun 25/04/2004 5:07 AM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: How to check if a variable is a filevar




Hi,

Is there a way of checking to see if a variable is an opened file variable?
I can check if it is alpha, numeric, assigned and unassigned but I cannot
find anywhere where I can determine a filevar type.

My  problem is that a routine is sent an Array to be saved to a file but the
contents of that array are not known therefore I have to first convert any
AM's in each array element (for the MATWRITE/MATREAD to work) but I have now
come across a filevar in one of the elements - actually in 8 of them.

Before anyone starts making comments like:  "just don't allow it..." or
"what "idiot" programs that way anyway..." etc.. I had better explain what I
am doing and why I have the problem.

I am converting System Builder and SB+ apps to mv4GL and one of the
functions is to save the user's available common area to disk and restore
them.  Unfortunately the common variables can be used for any purpose and
although there are specific variables designed for opening files, this
particular app has opened them to a general PARAMS variable.  In this latest
conversion, so far every part of SB+ (except security) is converted 100% and
the run-time executes 99.99% of the converted app - the only problem I have
come across during my testing is this one.

Sorry, this is sounding as though it is becoming an AD.  Not my intention.

Thanks for your help.

Regards,

Neil.
--
Neil Charrington
C.A. Software Systems
www.casoftware.co.uk
www.mv4gl.com




--
FIGHT BACK AGAINST SPAM!
Download Spam Inspector, the Award Winning Anti-Spam Filter
http://mail.giantcompany.com


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.659 / Virus Database: 423 - Release Date: 15/04/2004


--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.667 / Virus Database: 429 - Release Date: 23/04/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.667 / Virus Database: 429 - Release Date: 23/04/2004
 


--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: Universe on XP (Personal Edition)

2004-04-25 Thread Stuart Boydell
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>
> That's the problem. Telnet isn't being kicked out.  I am doing this
> (start/stop) from the command line already.  No big deal though.  I just
> thought it was kind of odd.  We run the 'real' system on unix and linux
> where I don't have such troubles.
> Anthony


It probably works out quite nicely NOT to suddenly chuck out users and kill
your running apps when you shutdown UV. It might have the insignificant
side-effect of PREVENTING data data corruption.
Seriously though; it is kinda obvious that you want all running processes to
finish gracefully before stopping UV isn't it?
Stuart













**
This email message and any files transmitted with it are confidential
and intended solely for the use of addressed recipient(s). If you have 
received this email in error please notify the Spotless IS Support Centre (61 3 9269 
7555) immediately who will advise further action.

This footnote also confirms that this email message has been scanned
for the presence of computer viruses.
**

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: How to check if a variable is a filevar

2004-04-25 Thread Stuart Boydell
> Is there a way of checking to see if a variable is an opened file 
> variable?
> I can check if it is alpha, numeric, assigned and unassigned but I cannot
> find anywhere where I can determine a filevar type.


isFilevar = (descrinfo(1,PARMS(n)) = 4)















**
This email message and any files transmitted with it are confidential
and intended solely for the use of addressed recipient(s). If you have 
received this email in error please notify the Spotless IS Support Centre (61 3 9269 
7555) immediately who will advise further action.

This footnote also confirms that this email message has been scanned
for the presence of computer viruses.
**

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: UV Crash on W2K3

2004-04-25 Thread Sara Burns
I raised a case with IBM when I tracked down our crash to a file not
converting properly when we moved from AIX to W2K3.  This file had a
trigger, which we had removed, but even so it did not convert completely.
The result was an unpredictable crash of the session which took a long time
to track down.
 
I am advised by IBM support that currently there is not a way to move
UniVerse files, with Triggers, to another Machine Class as fnuxi does not
support SQL tables.  They do not regard this as being a bug.
 
The application of a Trigger to a standard UniVerse file turns this into a
pseudo SQL Table with a SICA block within the file's header, to store the
trigger information.  The CREATE/DROP TRIGGER commands are updating the
uv/SQL/CATALOG/UV_TABLES and UV_USERS files.
 
They have provided me with a workaround to clear the sica pointer from the
file header, which will allow me to make the changes when moving between
machine classes.
 
I am going to request an enhancement to make this available to other users
without them needing to write additional hacks to get around this situation.
 
This is the second time we have had to move between machine classes within 3
years.  It happens - we need to be able to handle it simply without the
aggravation it has caused us.
 
At the very minimum IBM need to cover this in their documentation.  If they
have I didn't find it.
 
UniVerse 10.1 on Windows 2003
 
Sara Burns
 
Sara Burns (SEB) 
Development Team Leader

Public Trust 
Phone: +64 (04) 474-3841 (DDI) 

Mobile: 027 457 5974
<  mailto:[EMAIL PROTECTED]>

Information contained in this communication is confidential. If you are not
the intended recipient the information should not be used, disclosed, copied
or commercialised. The information is not necessarily the views nor the
official communication of Public Trust. No guarantee or representation is
made that the communication is free of errors, virus or interference.

 
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users