https://wiki.midrange.com/index.php?title=Object_Exists&feed=atom&action=history
Object Exists - Revision history
2024-03-28T13:40:05Z
Revision history for this page on the wiki
MediaWiki 1.30.0
https://wiki.midrange.com/index.php?title=Object_Exists&diff=13290&oldid=prev
DaveLClarkI at 17:31, 17 December 2018
2018-12-17T17:31:27Z
<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 17:31, 17 December 2018</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l82" >Line 82:</td>
<td colspan="2" class="diff-lineno">Line 82:</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-proc;</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-proc;</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></pre></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></pre></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;">== Example ==</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;">See the [[Get Job List]] service procedure.</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>== References ==</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>== References ==</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>* [[API Error Code Structure (ApiErrC)]]</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>* [[API Error Code Structure (ApiErrC)]]</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>* [[Retrieve Object Description (QUSROBJD)|IBMAPI_RtvObjDesc]] API</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>* [[Retrieve Object Description (QUSROBJD)|IBMAPI_RtvObjDesc]] API</div></td></tr>
</table>
DaveLClarkI
https://wiki.midrange.com/index.php?title=Object_Exists&diff=13207&oldid=prev
DaveLClarkI: /* Summary */
2018-12-17T16:09:27Z
<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:09, 17 December 2018</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l4" >Line 4:</td>
<td colspan="2" class="diff-lineno">Line 4:</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="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>The following are the RPG/LE fully free-form definitions and instructions needed for using the {{AN}} service procedure.  This service procedure simply allows the caller to check if an object exists on the system.</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>The following are the RPG/LE fully free-form definitions and instructions needed for using the {{AN}} service procedure.  This service procedure simply allows the caller to check if an object exists on the system.</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;">By [[User:DaveLClarkI|Dave Clark]]</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>== Service Prototype ==</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>== Service Prototype ==</div></td></tr>
</table>
DaveLClarkI
https://wiki.midrange.com/index.php?title=Object_Exists&diff=13172&oldid=prev
DaveLClarkI: Created page with "Category:Sample Code Category:Service Procedures __FORCETOC__ == Summary == The following are the RPG/LE fully free-form definitions and instructions needed for using..."
2018-12-14T21:17:17Z
<p>Created page with "<a href="/index.php/Category:Sample_Code" title="Category:Sample Code">Category:Sample Code</a> <a href="/index.php/Category:Service_Procedures" title="Category:Service Procedures">Category:Service Procedures</a> __FORCETOC__ == Summary == The following are the RPG/LE fully free-form definitions and instructions needed for using..."</p>
<p><b>New page</b></p><div>[[Category:Sample Code]]<br />
[[Category:Service Procedures]]<br />
__FORCETOC__<br />
== Summary ==<br />
The following are the RPG/LE fully free-form definitions and instructions needed for using the {{AN}} service procedure. This service procedure simply allows the caller to check if an object exists on the system.<br />
<br />
== Service Prototype ==<br />
Place the following in a separate copybook for inclusion in both the caller and the service program source members.<br />
<pre><br />
**free<br />
<br />
//******************************************************************************<br />
// Uses an IBM API to determine if the specified object exists and, optionally,<br />
// returns the object's library and/or description attributes. The current<br />
// job user must also have at least *USE authority to the specified object.<br />
//******************************************************************************<br />
dcl-pr GenUtl_ObjectExists ind;<br />
pObjectName char(10) const;<br />
pObjectType char(10);<br />
pLibraryName char(10) options(*nopass);<br />
pObjectDesc likeds(QUSD0200) options(*varsize:*nopass);<br />
end-pr;<br />
</pre><br />
<br />
== Service Procedure ==<br />
Place the following in a service program source member.<br />
<pre><br />
**free<br />
ctl-opt NoMain AlwNull(*UsrCtl) Debug Option(*SrcStmt:*NoDebugIo)<br />
DatFmt(*ISO) TimFmt(*ISO);<br />
<br />
//******************************************************************************<br />
// Uses an IBM API to determine if the specified object exists and, optionally,<br />
// returns the object's library and/or description attributes. The current<br />
// job user must also have at least *USE authority to the specified object.<br />
//******************************************************************************<br />
dcl-proc GenUtl_ObjectExists export;<br />
dcl-pi *n ind;<br />
pObjectName char(10) const;<br />
pObjectType char(10);<br />
pLibraryName char(10) options(*nopass);<br />
pObjectDesc likeds(QUSD0200) options(*varsize:*nopass);<br />
end-pi;<br />
<br />
dcl-s objExists ind inz(*on);<br />
dcl-s iLibraryName char(10);<br />
<br />
if %parms() < %parmnum(pLibraryName) // if library name not supplied<br />
or %addr(pLibraryName) = *null // or was omitted<br />
or pLibraryName <= *blanks; // or is blank<br />
if pObjectType = '*AUTL'; // for authorization lists<br />
iLibraryName = 'QSYS'; // use QSYS library default<br />
else; // else<br />
iLibraryName = '*LIBL'; // search library list by default<br />
endif;<br />
else; // else<br />
iLibraryName = pLibraryName; // use supplied library name<br />
endif;<br />
<br />
callp IBMAPI_RtvObjDesc( QUSD0200: %len(QUSD0200): 'OBJD0200'<br />
: pObjectName + iLibraryName: pObjectType<br />
: ApiErrC );<br />
if ApiErrC.BytAvail > *zero; // if errors...<br />
objExists = *off; // assume it does not exist<br />
if ApiErrC.MsgId <> 'CPF9801'; // if more than just 'not found'<br />
pObjectType = 'MSG' + ApiErrC.MsgId; // return exception msgid<br />
endif;<br />
else;<br />
if %parms >= %parmnum(pLibraryName) // if library parm passed<br />
and %addr(pLibraryName) <> *null; // and was not omitted<br />
pLibraryName = QUSOBJLN00; // return library where found<br />
endif;<br />
if %parms >= %parmnum(pObjectDesc) // if description parm passed<br />
and %addr(pObjectDesc) <> *null; // and was not omitted<br />
%subst(pObjectDesc: 1: %len(QUSD0200)) = QUSD0200; // return full desc<br />
endif;<br />
endif;<br />
<br />
return objExists; // indicate existence<br />
end-proc;<br />
</pre><br />
<br />
== References ==<br />
* [[API Error Code Structure (ApiErrC)]]<br />
* [[Retrieve Object Description (QUSROBJD)|IBMAPI_RtvObjDesc]] API</div>
DaveLClarkI