$List Global List and $List Session List: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
Line 18: Line 18:


==Syntax==
==Syntax==
<p class="syntax"><section begin="syntax" />[%RC =] $List_Global_List(listid)
<p class="syntax"><section begin="syntax" />[%rc =] $List_Global_List(listid)
<section end="syntax" /></p>
<section end="syntax" /></p>
<p class="caption">$GLOBAL_LIST
<p class="code">[%rc =] $List_Session_List(listid)</p>
</p>
<p class="caption">%RC is set to the number of added items or to -3.</p>


<p class="code">
<p class="caption">%rc is set to the number of added items or to -3.</p>
[%RC =] $List_Session_List(listid)
</p>
<p class="caption">$Session_List
</p>
<p class="caption">%RC is set to the number of added items or to -3.</p>


The format of the data in the output $list is
The format of the data in the output $list is
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>Col 1-10</th>
<tr><th>Col 1-10</th>
<td>The EBCDIC number of items on the $list, right-justified.</td></tr>
<td>The EBCDIC number of items on the $list, right-justified.</td></tr>
<tr><th>Col 11-</th>
<tr><th>Col 11-</th>
<td>The name of the global or session $list.
<td>The name of the global or session $list.
</td></tr></table>
</td></tr></table>


==Usage notes==
<ul>
<li>A <var>$List_Session_List</var> call when there is no session open causes a request cancellation.
</ul>
==Example==
The following example displays information about all current global and session $lists:
The following example displays information about all current global and session $lists:


<p class="code"> %LIST = $ListNew
<p class="code">%LIST = $ListNew
%RC = $List_Global_List(%LIST)
%RC = $List_Global_List(%LIST)
PRINT 'Global $lists:'
PRINT 'Global $lists:'
%RC = $List_Print(%LIST)
%RC = $List_Print(%LIST)
%LIST = $ListNew
%LIST = $ListNew
%RC = $List_Session_List(%LIST)
%RC = $List_Session_List(%LIST)
PRINT 'Session $lists:'
PRINT 'Session $lists:'
%RC = $List_Print(%LIST)
%RC = $List_Print(%LIST)
</p>
</p>


A <var>$List_Session_List</var> call when there is no session open causes a request cancellation.
<var>$List_Global_List</var> is new in <var class="product">[[Sirius Mods]]</var> Version 6.2. <var>$List_Session_List</var> is new in <var class="product">[[Sirius Mods]]</var> Version 6.3.<p>


<h2>Products authorizing $List_Global_List and $List_Session_List</h2>
<h2>Products authorizing $List_Global_List and $List_Session_List</h2>
Line 67: Line 62:
<li>[[Japanese functions]]</li>
<li>[[Japanese functions]]</li>
<li>[[Sir2000 Field Migration Facility]]</li>
<li>[[Sir2000 Field Migration Facility]]</li>
</ul>
</ul>
   
   
</p>
<p>
</p>


[[Category:$Functions|$List_Global_List and $List_Session_List]]
[[Category:$Functions|$List_Global_List and $List_Session_List]]

Revision as of 21:04, 25 October 2012

$List_Global_List and $List_Session_List: List global/session $lists

Most Sirius $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $List_Global_List and $List_Session_List functions.

$List_Global_List and $List_Session_List return information about global and session $lists to a $list.

$List_Global_List and $List_Session_List accept one argument and return either of the following:

  • The number of items added to the output $list.
  • -3, if CCATEMP is full and the LISTFC parameter is not set. All other errors result in request cancellation.

The first argument is the $list identifier to receive the output from $List_Global_List or $List_Session_List. This is a required argument.

$List_Global_List and $List_Session_List are callable $functions.

Syntax

<section begin="syntax" />[%rc =] $List_Global_List(listid) <section end="syntax" />

[%rc =] $List_Session_List(listid)

%rc is set to the number of added items or to -3.

The format of the data in the output $list is

Col 1-10 The EBCDIC number of items on the $list, right-justified.
Col 11- The name of the global or session $list.

Usage notes

  • A $List_Session_List call when there is no session open causes a request cancellation.

Example

The following example displays information about all current global and session $lists:

%LIST = $ListNew %RC = $List_Global_List(%LIST) PRINT 'Global $lists:' %RC = $List_Print(%LIST) %LIST = $ListNew %RC = $List_Session_List(%LIST) PRINT 'Session $lists:' %RC = $List_Print(%LIST)


Products authorizing $List_Global_List and $List_Session_List