https://wiki.midrange.com/index.php?title=APIs,_user_spaces,_etc.&feed=atom&action=historyAPIs, user spaces, etc. - Revision history2024-03-28T13:53:21ZRevision history for this page on the wikiMediaWiki 1.30.0https://wiki.midrange.com/index.php?title=APIs,_user_spaces,_etc.&diff=13477&oldid=prevDaveLClarkI: /* Summary */2019-01-28T19:53:51Z<p><span dir="auto"><span class="autocomment">Summary</span></span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 19:53, 28 January 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>== Summary ==</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>== Summary ==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Here's a sample of using an API which outputs to a [[:Category:User Spaces|user space]] in COBOL.  This example lists and processes members in a file.  Error handling would need to be coded.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Here's a sample of using an <ins class="diffchange diffchange-inline">[[</ins>API<ins class="diffchange diffchange-inline">]] </ins>which outputs to a [[:Category:User Spaces|user space]] in COBOL.  This example lists and processes members in a file.  Error handling would need to be coded.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>You can either use your own definition for the APIs or the definition in the QSYSINC library.  I generally use my own because I can tailor defaults for our environment.  YMMV (Your Mileage May Vary).  In our shop, we keep our definitions of the API interfaces in copy members.  In the example below, I have included the actual code for the complete picture.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>You can either use your own definition for the APIs or the definition in the QSYSINC library.  I generally use my own because I can tailor defaults for our environment.  YMMV (Your Mileage May Vary).  In our shop, we keep our definitions of the API interfaces in copy members.  In the example below, I have included the actual code for the complete picture.</div></td></tr>
</table>DaveLClarkIhttps://wiki.midrange.com/index.php?title=APIs,_user_spaces,_etc.&diff=13328&oldid=prevDaveLClarkI: /* Summary */2018-12-18T16:52:48Z<p><span dir="auto"><span class="autocomment">Summary</span></span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 16:52, 18 December 2018</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>== Summary ==</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>== Summary ==</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Here's a sample of using an API which outputs to a [[Category:User Spaces|user space]] in COBOL.  This example lists and processes members in a file.  Error handling would need to be coded.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Here's a sample of using an API which outputs to a [[<ins class="diffchange diffchange-inline">:</ins>Category:User Spaces|user space]] in COBOL.  This example lists and processes members in a file.  Error handling would need to be coded.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>You can either use your own definition for the APIs or the definition in the QSYSINC library.  I generally use my own because I can tailor defaults for our environment.  YMMV (Your Mileage May Vary).  In our shop, we keep our definitions of the API interfaces in copy members.  In the example below, I have included the actual code for the complete picture.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>You can either use your own definition for the APIs or the definition in the QSYSINC library.  I generally use my own because I can tailor defaults for our environment.  YMMV (Your Mileage May Vary).  In our shop, we keep our definitions of the API interfaces in copy members.  In the example below, I have included the actual code for the complete picture.</div></td></tr>
</table>DaveLClarkIhttps://wiki.midrange.com/index.php?title=APIs,_user_spaces,_etc.&diff=13327&oldid=prevDaveLClarkI at 16:52, 18 December 20182018-12-18T16:52:35Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 16:52, 18 December 2018</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Here's a sample of using an API which outputs to a user space in COBOL.  This example lists and processes members in a file.  Error handling would need to be coded.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins class="diffchange diffchange-inline">== Summary ==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Here's a sample of using an API which outputs to a <ins class="diffchange diffchange-inline">[[Category:User Spaces|</ins>user space<ins class="diffchange diffchange-inline">]] </ins>in COBOL.  This example lists and processes members in a file.  Error handling would need to be coded.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>You can either use your own definition for the APIs or the definition in the QSYSINC library.  I generally use my own because I can tailor defaults for our environment.  YMMV (Your Mileage May Vary).  In our shop, we keep our definitions of the API interfaces in copy members.  In the example below, I have included the actual code for the complete picture.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>You can either use your own definition for the APIs or the definition in the QSYSINC library.  I generally use my own because I can tailor defaults for our environment.  YMMV (Your Mileage May Vary).  In our shop, we keep our definitions of the API interfaces in copy members.  In the example below, I have included the actual code for the complete picture.</div></td></tr>
</table>DaveLClarkIhttps://wiki.midrange.com/index.php?title=APIs,_user_spaces,_etc.&diff=13326&oldid=prevDaveLClarkI: /* Categories */2018-12-18T16:50:14Z<p><span dir="auto"><span class="autocomment">Categories</span></span></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 16:50, 18 December 2018</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l225" >Line 225:</td>
<td colspan="2" class="diff-lineno">Line 225:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Categories==</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>==Categories==</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category:COBOL]]</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>[[Category:COBOL]]</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:User Spaces]]</ins></div></td></tr>
</table>DaveLClarkIhttps://wiki.midrange.com/index.php?title=APIs,_user_spaces,_etc.&diff=11113&oldid=prevQuigs: moved User space APIs to APIs, user spaces, etc.: Easier to locate by navigating from the wiki mainpage2010-12-18T16:31:35Z<p>moved <a href="/index.php/User_space_APIs" class="mw-redirect" title="User space APIs">User space APIs</a> to <a href="/index.php/APIs,_user_spaces,_etc." title="APIs, user spaces, etc.">APIs, user spaces, etc.</a>: Easier to locate by navigating from the wiki mainpage</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr style="vertical-align: top;" lang="en">
<td colspan="1" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: white; color:black; text-align: center;">Revision as of 16:31, 18 December 2010</td>
</tr><tr><td colspan="2" style="text-align: center;" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>Quigshttps://wiki.midrange.com/index.php?title=APIs,_user_spaces,_etc.&diff=11112&oldid=prevQuigs: Added COBOL categories2010-12-18T16:30:18Z<p>Added COBOL categories</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr style="vertical-align: top;" lang="en">
<td colspan="2" style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: white; color:black; text-align: center;">Revision as of 16:30, 18 December 2010</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Here's a sample of using an API which outputs to a user space in COBOL.  This example lists and processes members in a file.  Error handling would need to be coded.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Here's a sample of using an API which outputs to a user space in COBOL.  This example lists and processes members in a file.  Error handling would need to be coded.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>You can either use your own definition for the APIs or the definition in the QSYSINC library.  I generally use my own because I can tailor defaults for our environment.  YMMV (Your Mileage May Vary).  In our shop, we keep our definitions of the API interfaces in copy members.  In the example below, I have included the actual code for</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>You can either use your own definition for the APIs or the definition in the QSYSINC library.  I generally use my own because I can tailor defaults for our environment.  YMMV (Your Mileage May Vary).  In our shop, we keep our definitions of the API interfaces in copy members.  In the example below, I have included the actual code for <ins class="diffchange diffchange-inline">the complete picture.</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>== Working-storage section. ==</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>== Working-storage section. ==</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l222" >Line 222:</td>
<td colspan="2" class="diff-lineno">Line 222:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>           end-perform</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>           end-perform</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>           .</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>           .</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">==Categories==</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:COBOL]]</ins></div></td></tr>
</table>Quigshttps://wiki.midrange.com/index.php?title=APIs,_user_spaces,_etc.&diff=11111&oldid=prevQuigs: Add example of using a user space and list API in COBOL2010-12-17T23:00:58Z<p>Add example of using a user space and list API in COBOL</p>
<p><b>New page</b></p><div>Here's a sample of using an API which outputs to a user space in COBOL. This example lists and processes members in a file. Error handling would need to be coded.<br />
<br />
You can either use your own definition for the APIs or the definition in the QSYSINC library. I generally use my own because I can tailor defaults for our environment. YMMV (Your Mileage May Vary). In our shop, we keep our definitions of the API interfaces in copy members. In the example below, I have included the actual code for<br />
<br />
== Working-storage section. ==<br />
*<br />
* API error code parameter<br />
*<br />
01 API-errors.<br />
05 API-error-length pic 9(8) binary<br />
value 16.<br />
88 Return-error-code-only value 16.<br />
88 Return-exception-data-132 value 148.<br />
05 Error-length pic 9(8) binary.<br />
88 API-processed-okay value 0.<br />
05 Error-ID pic x(7).<br />
05 filler pic x(1).<br />
05 Exception-data pic x(132).<br />
<br />
*<br />
* User space APIs<br />
01 User-space-api.<br />
05 User-space-name.<br />
10 Space-name pic x(10) value spaces.<br />
10 Space-library pic x(10) value 'QTEMP'.<br />
05 User-space-attribute pic x(10) value spaces.<br />
05 Initial-size pic 9(8) binary<br />
value 11100.<br />
05 Initial-value pic x value X'00'.<br />
05 Public-authority pic x(10) value '*ALL'.<br />
05 Space-text pic x(50) value spaces.<br />
05 Replace-space pic x(10) value '*YES'.<br />
<br />
77 User-space-pointer pointer.<br />
<br />
*<br />
* Member list<br />
01 Member-list-api.<br />
05 User-space-name.<br />
10 Space-name pic x(10) value spaces.<br />
10 Space-library pic x(10) value 'QTEMP'.<br />
05 Member-list-format pic x(8) value 'MBRL0200'.<br />
05 Member-list-file.<br />
10 Member-list-file-name<br />
pic x(10) value spaces.<br />
10 Member-list-library pic x(10) value '*LIBL'.<br />
05 Members-to-list pic x(10) value '*ALL'.<br />
05 Member-list-overrides pic x value '0'.<br />
88 Member-list-ignore-ovrdbf value '0'.<br />
88 Member-list-use-ovrdbf value '1'.<br />
<br />
05 Member-list-return-header.<br />
10 File-name-used pic x(10).<br />
10 File-library-used pic x(10).<br />
10 File-attribute pic x(10).<br />
10 Text-description pic x(10).<br />
10 Number-of-members pic s9(8) binary.<br />
10 File-type pic x.<br />
88 Data-file value '0'.<br />
88 Source-file value '1'.<br />
<br />
01 List-entry-address pointer.<br />
*<br />
* Member Description API<br />
*<br />
01 Member-desc-api.<br />
05 QUSRMBRD pic x(10) value 'QUSRMBRD'.<br />
05 Member-data.<br />
10 Returned-bytes pic 9(8) binary. Rtn B<br />
10 Available-bytes pic 9(8) binary. Avail B<br />
10 Return-file pic x(10). DBF Name<br />
10 Return-library pic x(10). DBF Lib<br />
10 Return-member pic x(10). Member<br />
10 File-attributes pic x(10). File Atr<br />
10 Source-type pic x(10). Src Type<br />
10 Date-added pic x(13). Crt DS<br />
10 Date-changed pic x(13). SrcChgDS<br />
10 Member-text pic x(50). Descript<br />
10 Source-file pic x. Src File<br />
10 Remote-file pic x. Rmt File<br />
10 File-type pic x. LF / PF<br />
10 ODP-sharing pic x. ODP Shr<br />
10 filler pic xx. *Rsrvd*<br />
10 Number-of-records pic 9(8) binary.<br />
10 Deleted-records pic 9(8) binary.<br />
10 Data-space-size pic 9(8) binary.<br />
10 Access-path-size pic 9(8) binary.<br />
10 Based-on-members pic 9(8) binary.<br />
10 Change-timestamp pic x(13).<br />
10 Save-timestamp pic x(13).<br />
10 Restore-timestamp pic x(13).<br />
10 Expiration-date pic x(7).<br />
10 filler pic x(6).<br />
10 Number-days-used pic 9(8) binary.<br />
10 Date-last-used pic x(7).<br />
10 Use-reset-date pic x(7).<br />
10 filler pic xx.<br />
10 DS-size-multiplier pic 9(8) binary.<br />
10 AP-size-multiplier pic 9(8) binary.<br />
10 Description-CCSID pic 9(8) binary.<br />
10 Offset-to-MBRD0200 pic 9(8) binary.<br />
10 Length-of-MBRD0200 pic 9(8) binary.<br />
10 Nbr-rcds-all-mbrs pic 9(8) binary.<br />
10 Nbr-deleted-recds pic 9(8) binary.<br />
10 filler pic x(6).<br />
05 Return-length pic 9(8) binary value 144.<br />
88 Number-of-records-length value 144.<br />
88 MBRD0100-length value 134.<br />
88 MBRD0200-length value 265.<br />
05 Format-name pic x(8) value 'MBRD0200'.<br />
88 MBRD0100-format value 'MBRD0100'.<br />
88 MBRD0200-format value 'MBRD0200'.<br />
05 Qual-file-name.<br />
10 Work-file pic x(10).<br />
10 Work-library pic x(10).<br />
05 Member-name pic x(10) value '*FIRST'.<br />
05 Override-processing pic x.<br />
88 Ignore-overrides value '0'.<br />
88 Process-overrides value '1'.<br />
<br />
== Linkage section. ==<br />
<br />
01 File-parm.<br />
05 File-name-parm pic x(10).<br />
05 Library-name-parm pic x(10).<br />
<br />
* Record lock handling<br />
copy UTBLSRLCK.<br />
<br />
* Generic list API header structure<br />
01 List-header-info.<br />
05 f pic x(124).<br />
05 Offset-to-list-data pic 9(8) binary.<br />
05 Size-of-list-data pic 9(8) binary.<br />
05 Number-of-entries pic 9(8) binary.<br />
05 Size-of-list-entry pic 9(8) binary.<br />
<br />
* Member list API entry format<br />
01 MBR0200-data-format.<br />
05 Member-name pic x(10).<br />
05 Source-type pic x(10).<br />
05 Member-date-and-time.<br />
10 Member-date pic 9(6) display.<br />
10 Member-time pic 9(7) display.<br />
05 Source-change-date-and-time.<br />
10 Change-date pic 9(6) display.<br />
10 Change-time pic 9(7) display.<br />
05 Member-text pic x(50).<br />
05 Member-text-ccsid pic 9(8) binary.<br />
<br />
<br />
== Procedure Division ==<br />
using File-parm<br />
.<br />
<br />
0000-Begin-here.<br />
perform 0010-Initialization<br />
if Number-of-entries > 0<br />
perform 1000-Build-member-list<br />
end-if<br />
perform 0500-Wrap-up<br />
<br />
goback<br />
.<br />
<br />
0010-Initialization.<br />
move 'MBRLIST' to Space-name of User-space-api<br />
move 'List of inventory sheet sequence members'<br />
to Space-text of User-space-api<br />
call 'QUSCRTUS'<br />
using User-space-name of User-space-api<br />
User-space-attribute of User-space-api<br />
Initial-size<br />
Initial-value<br />
Public-authority<br />
Space-text<br />
Replace-space<br />
API-errors<br />
end-call<br />
<br />
move File-parm to Member-list-file<br />
<br />
call 'QUSLMBR'<br />
using User-space-name of User-space-api<br />
Member-list-format<br />
Member-list-file<br />
Members-to-list<br />
Member-list-overrides<br />
Api-errors<br />
end-call<br />
<br />
call 'QUSPTRUS'<br />
using User-space-name of User-space-api<br />
User-space-pointer<br />
Api-errors<br />
end-call<br />
<br />
set address of List-header-info to User-space-pointer<br />
.<br />
<br />
0500-Wrap-up.<br />
* Do any clean-up processing needed here<br />
* In this example the user space is created in QTEMP so it will go away at the<br />
* end of the job. Perhaps files could be closed, etc.<br />
.<br />
<br />
1000-Build-member-list.<br />
set List-entry-address to User-space-pointer<br />
set List-entry-address up by Offset-to-list-data<br />
move zero to Subfile-rrn<br />
perform Number-of-entries times<br />
set address of MBR0200-data-format to List-entry-address<br />
move File-name to Qual-file-name of Member-desc-api<br />
move Member-name of MBR0200-data-format<br />
to Member-name of Member-desc-api<br />
<br />
*********************************************************<br />
* More processing would be done here<br />
*********************************************************<br />
<br />
set List-entry-address up by Size-of-list-entry<br />
end-perform<br />
.</div>Quigs