$ListRst: Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
(Automatically generated page update)
 
(52 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:$ListRst}}
{{DISPLAYTITLE:$ListRst}}
<span class="pageSubtitle"><section begin="desc" />Restore global $list<section end="desc" /></span>
<span class="pageSubtitle">Restore global $list</span>


<p class="warning">Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no direct OO equivalent for the $ListRst function, as OO structures can easily be declared "Global" and shared between User Language invocations.</p>
<p class="warn"><b>Note: </b>Many $functions have been deprecated in favor of Object Oriented methods. There is no direct OO equivalent for the $ListRst function, as OO structures can easily be declared "Global" and shared between User Language invocations.</p>


This function is used to restore a $list previously saved with either the [[$List_Global]], [[$ListSav]], or [[$ListSave]] function. $ListRst is used with these $functions to pass a $list between requests.  
This function is used to restore a $list previously saved with either [[$List_Global and $List_Session]] or the [[$ListSav and $ListSave]] functions. <var>$ListRst</var> is used with these $functions to pass a $list between requests.  


The $ListRst function accepts one optional argument and returns a numeric result.  
The <var>$ListRst</var> function accepts one optional argument and returns a numeric result.  


The first argument is a string which is the name which had been used to save the list. If this argument is omitted, the name is the null string.
The first argument is a string which is the name which had been used to save the list. If this argument is omitted, the name is the null string.


==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" /> %RESULT = $ListRst(name)
<p class="syntax"><span class="term">%result</span> = <span class="literal">$ListRst</span>([<span class="term">name</span>])
<section end="syntax" /></p>
<p class="caption">$ListRst Function
</p>
</p>
<p class="caption">%RESULT is set either to the identifier of the restored $list or to a negative number if an error has occurred.</p>


All invocations of a particular call to $ListRst will always return the same $list identifier. Each time that call is executed, if the function is successful then any previous $list created by that call is deleted, and a new list is created.  
<p>
<span class="term">%result</span> is set either to the identifier of the restored $list or to a negative number if an error has occurred.</p>


After a $list is restored, it is no longer considered "saved" and will be cleaned up at procedure termination or RELEASE ALL RECORDS processing unless it is saved again. If you wish to restore a $list and you know that you want it accessible after the current User Language request, use $List_Global instead of $ListRst.  
===Completion codes===
<p class="code">-13 - Specified $list accessed in current request with $List_Global
-14 - No $list is currently saved with specified name
</p>
 
==Usage notes==
<ul>
<li>All invocations of a particular call to <var>$ListRst</var> will always return the same $list identifier. Each time that call is executed, if the function is successful then any previous $list created by that call is deleted, and a new list is created.
 
<li>After a $list is restored, it is no longer considered "saved" and will be cleaned up at procedure termination or RELEASE ALL RECORDS processing unless it is saved again. If you want to restore a $list and you know that you want it accessible after the current <var class="product">User Language</var> request, use <var>$List_Global</var> instead of <var>$ListRst</var>.  


If a non-null global $list name has never been used, the $ListRst function does not require any CCATEMP access and hence is highly efficient. For example
<li>If a non-null global $list name has never been used, the <var>$ListRst</var> function does not require any CCATEMP access and hence is highly efficient. For example:


<p class="code"> B
<p class="code">B
  ...
  ...
%RESULT = $ListSav
%RESULT = $ListSav
END
END
   
   
CLOSE ALL
CLOSE ALL
   
   
B
B
%LIST = $ListRst
%LIST = $ListRst
  ...
  ...
END
END
</p>
</p>


demonstrates the use of $ListRst to restore a $list created and saved in a separate request. Because many Sirius Software products use $LISTSAV/$LISTRST with the null global $list name, care should be taken of the interaction between global $list names used by your applications and the null $list name.
This fragment demonstrates the use of <var>$ListRst</var> to restore a $list created and saved in a separate request. Because many Sirius Software products use <var>$ListSav/$ListRst</var> with the null global $list name, care should be taken of the interaction between global $list names used by your applications and the null $list name.
 
</ul>
<p class="code">
-13 - Specified $list accessed in current request
          with $List_Global
-14 - No $list is currently saved with specified name
</p>
<p class="caption">$ListRst Completion Codes
</p>
<p class="code">  


==Products authorizing {{PAGENAMEE}}==
<ul class="smallAndTightList">
<ul class="smallAndTightList">
<li>[[Sirius functions]]</li>
<li>[[Sirius Functions]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Fast/Unload User Language Interface]]</li>
<li>[[Janus Open Client]]</li>
<li>[[Media:JoclrNew.pdf|Janus Open Client]]</li>
<li>[[Janus Open Server]]</li>
<li>[[Media:JosrvrNew.pdf|Janus Open Server]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Sockets]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Janus Web Server]]</li>
<li>[[Japanese functions]]</li>
<li>Japanese functions</li>
<li>[[Sir2000 Field Migration Facility]]</li>
<li>[[Media:SirfieldNew.pdf|Sir2000 Field Migration Facility]]</li>
 
</ul>
</ul>
</p>
<p class="caption">Products authorizing $ListRst
</p>


[[Category:$Functions|$ListRst]]
[[Category:$Functions|$ListRst]]

Latest revision as of 22:51, 20 September 2018

Restore global $list

Note: Many $functions have been deprecated in favor of Object Oriented methods. There is no direct OO equivalent for the $ListRst function, as OO structures can easily be declared "Global" and shared between User Language invocations.

This function is used to restore a $list previously saved with either $List_Global and $List_Session or the $ListSav and $ListSave functions. $ListRst is used with these $functions to pass a $list between requests.

The $ListRst function accepts one optional argument and returns a numeric result.

The first argument is a string which is the name which had been used to save the list. If this argument is omitted, the name is the null string.

Syntax

%result = $ListRst([name])

%result is set either to the identifier of the restored $list or to a negative number if an error has occurred.

Completion codes

-13 - Specified $list accessed in current request with $List_Global -14 - No $list is currently saved with specified name

Usage notes

  • All invocations of a particular call to $ListRst will always return the same $list identifier. Each time that call is executed, if the function is successful then any previous $list created by that call is deleted, and a new list is created.
  • After a $list is restored, it is no longer considered "saved" and will be cleaned up at procedure termination or RELEASE ALL RECORDS processing unless it is saved again. If you want to restore a $list and you know that you want it accessible after the current User Language request, use $List_Global instead of $ListRst.
  • If a non-null global $list name has never been used, the $ListRst function does not require any CCATEMP access and hence is highly efficient. For example:

    B ... %RESULT = $ListSav END CLOSE ALL B %LIST = $ListRst ... END

    This fragment demonstrates the use of $ListRst to restore a $list created and saved in a separate request. Because many Sirius Software products use $ListSav/$ListRst with the null global $list name, care should be taken of the interaction between global $list names used by your applications and the null $list name.

Products authorizing $ListRst