[[https://www.revelation.com/|Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community]]
==== Get_Status() & File_Error Syntax ? (OpenInsight Specific) ====
=== At 28 OCT 1998 10:59:50AM B. MacLelland wrote: ===
{{tag>"OpenInsight Specific"}}
I am confused as to how to return a error msg for processing.
If I use RLIST('SELECT table BY name'
and then - If Get_Status() then won't the if always be true?
And how do I make sense of the value returned to continue
processing if the RLIST went well or did not?
Also, is thier a brief explanation of Latent and Resolve?
Does resolve mean that items were found and the next
statement will process only on those id's? I have tried the Doc
and once saw a thread here but am still a little baffled.
----
=== At 28 OCT 1998 01:16PM Carl Pates Sprezzatura wrote: ===
[i]If I use RLIST('SELECT table BY name'
and then - If Get_Status() then won't the if always be true?
And how do I make sense of the value returned to continue
processing if the RLIST went well or did not?[/i]
Get_Status only returns TRUE$ if there has been an error (which is set by Set_Status()), otherwise it returns FALSE$. Hence the use of:
If Get_Status( ErrorCodes ) Then
* error processing
End Else
* all OK
End
If Get_Status returns TRUE$ then you need to check the what is in the ErrorCodes variable to determine what went wrong. This variable is @Fm delimited if there have been multiple errors. Each error can be @Vm delimited, the first MV being the code (in most cases) followed by any optional text and/or arguments etc.
Check the Set_Status() description in the online help to see how these are set.
[i]Also, is thier a brief explanation of Latent and Resolve?
Does resolve mean that items were found and the next
statement will process only on those id's? I have tried the Doc
and once saw a thread here but am still a little baffled.[/i]
A resolved select list means that the system has an actual list of keys waiting to be readnext'd. ie It has gone through the file and pulled out all the matching records and assembled their keys in a list.
A latent list means that the system has stored the selection criteria but hasn't actually gone to look for ant data so that it won't do any further processing until you start your ReadNext processing, in which case it will only pass you the keys that match the selection criteria.
There used to be a good description of this in the old ARev manuals but I don't recall seeing reprinted in any of the OI documentation.
cpates@sprezzatura.com
[url=http://www.sprezzatura.com" ]Sprezzatura Ltd[/url]
[i]World Leaders in all things RevSoft[/i]
[img]http://www.sprezzatura.com/zz.gif[/img]
----
=== At 28 OCT 1998 02:15PM B. MacLelland wrote: ===
Carl,
Thank you very much for your response!
]]Check the Set_Status() description in the online help to see how these are set.
Where does set_status come into play? Is that how I find out
what the error code is or what the text msg is?
]]A latent list means that the system has stored the selection criteria but hasn't actually gone to look for ant data so that it won't do any further processing until you start your ReadNext processing, in which case it will only pass you the keys that match the selection criteria.
So does the system save to "syslists" and do I have to "getlist"
before processing the items? Is it recommended to check for
a resolved list flag or latent?
Thanks!
----
=== At 29 OCT 1998 05:46AM Carl Pates Sprezzatura wrote: ===
[i]Where does set_status come into play? Is that how I find out
what the error code is or what the text msg is?[/i]
Set_Status is the function used to set the error condition. I mentioned this because the online help explains in more detail the structure of the error variables. To get the text associated with the error you need to look at a DOS file called REVERROR.DAT which is nothing more than a simple text file with a line for each error code followed by the text. You can write a program to parse this file looking for the error, extract the text, return it.
So if I try and Delete a table that doesn't exist ( Duh! :-)
eg:
Call Delete_Table( "NOTTHERE", TRUE$, Flag )
If Get_Status( ErrorCodes ) Then
End Else
etc...
ErrorCodes will contain "FS145":@Vm:"NOTTHERE". If I look in REVERROR.DAT for FS145 then I find this:
FS145: The "%1%" table does not exist.
The %1% should be replaced with the second MV from error codes to complete the message.
[i]So does the system save to "syslists" and do I have to "getlist"
before processing the items? Is it recommended to check for
a resolved list flag or latent?[/i]
No, there's nothing in SYSLISTS and you don't have to GetList. Check @List.Active to see if you've got a latent list active (1 or 2 I think ) and then start your ReadNext processing.
cpates@sprezzatura.com
[url=http://www.sprezzatura.com" ]Sprezzatura Ltd[/url]
[i]World Leaders in all things RevSoft[/i]
[img]http://www.sprezzatura.com/zz.gif[/img]
----
=== At 01 NOV 1998 04:43PM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura, Inc.[/url] wrote: ===
The system will very rarely set up a latent select all by itself. Through Basic+, if you make a simple select call, you will have a latent list. If you make a reduce/select call with no sorting, and the script does not contain index fields, you will obtain a latent select.
Any other type of select will default to a resolved select. Any type of select using RLIST("SELECT..."...) will result in a latent select unless you use the TARGET_LATENTLIST$ (6) param, and even then, it can only resolve the select if it meets the above criteria.
I generally use reduce/selects when ever possible, as it saves the double resolution needed for an active list.
akaplan@sprezzatura.com
[url=http://www.sprezzatura.com]Sprezzatura, Inc.[/url]
[img]http://www.sprezzatura.com/zz.jpg[/img]
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=348F0A6C2E4519B6852566AB005261DA|View this thread on the forum...]]