ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/strpgmmnu.htm

404 lines
15 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Start Programmer Menu (STRPGMMNU)</title>
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body bgcolor="white">
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<a name="STRPGMMNU.Top_Of_Page"></a>
<h2>Start Programmer Menu (STRPGMMNU)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>Interactive environments (*INTERACT *IPGM *IREXX *EXEC)<br>
<b>Threadsafe: </b>No
</td>
<td valign="top" align="right">
<a href="#STRPGMMNU.PARAMETERS.TABLE">Parameters</a><br>
<a href="#STRPGMMNU.COMMAND.EXAMPLES">Examples</a><br>
<a href="#STRPGMMNU.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="STRPGMMNU"></a>
<p>The Start Programmer Menu (STRPGMMNU) command shows the programmer menu. This command can be used instead of the CALL QPGMMENU function, and allows you to pass parameters to specify and control the data which appears in the associated fields on the programmer menu.
</p>
<p><b>NOTES:</b>
</p>
<ol>
<li>A user exit program can be called instead of submitting a job when option 3 is selected.
</li>
<li>The first four parameters control the defaults that appear when the menu is first displayed.
</li>
</ol>
<p>More information about using the Programmer Menu is in the CL information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRPGMMNU.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="STRPGMMNU.PARAMETERS.TABLE">Parameters</a></h3>
<table border="1" cellpadding="4" cellspacing="0">
<!-- col1="10" col2="15" col3="30" col4="10" -->
<tr>
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
</tr>
<tr>
<td valign="top"><a href="#STRPGMMNU.SRCFILE"><b>SRCFILE</b></a></td>
<td valign="top">Source file</td>
<td valign="top"><i>Name</i>, <b><u>*DFT</u></b></td>
<td valign="top">Optional, Positional 1</td>
</tr>
<tr>
<td valign="top"><a href="#STRPGMMNU.SRCLIB"><b>SRCLIB</b></a></td>
<td valign="top">Source library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
<td valign="top">Optional, Positional 2</td>
</tr>
<tr>
<td valign="top"><a href="#STRPGMMNU.OBJLIB"><b>OBJLIB</b></a></td>
<td valign="top">Object library</td>
<td valign="top"><i>Name</i>, <b><u>*DFT</u></b>, *CURLIB</td>
<td valign="top">Optional, Positional 3</td>
</tr>
<tr>
<td valign="top"><a href="#STRPGMMNU.JOBD"><b>JOBD</b></a></td>
<td valign="top">Job description</td>
<td valign="top"><i>Name</i>, <b><u>*USRPRF</u></b></td>
<td valign="top">Optional, Positional 4</td>
</tr>
<tr>
<td valign="top"><a href="#STRPGMMNU.ALWUSRCHG"><b>ALWUSRCHG</b></a></td>
<td valign="top">Allow changes</td>
<td valign="top"><b><u>*YES</u></b>, *NO</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#STRPGMMNU.EXITPGM"><b>EXITPGM</b></a></td>
<td valign="top">Option 3 exit program</td>
<td valign="top">Single values: <b><u>*NONE</u></b><br>Other values: <i>Qualified object name</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Qualifier 1: Option 3 exit program</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top">Qualifier 2: Library</td>
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
</tr><tr>
<td valign="top"><a href="#STRPGMMNU.DLTOPT"><b>DLTOPT</b></a></td>
<td valign="top">Delete option</td>
<td valign="top"><b><u>*DLT</u></b>, *PROMPT, *NODLT</td>
<td valign="top">Optional</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#STRPGMMNU.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="STRPGMMNU.SRCFILE"></a>
<h3>Source file (SRCFILE)</h3>
<p>Specifies an existing source file that contains source file members to be updated or to which new source file members are to be added.
</p>
<dl>
<dt><b><u>*DFT</u></b></dt>
<dd>This is the default for the type being specified on the menu. This field is blank when shown on the display station.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the source file to be updated.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRPGMMNU.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="STRPGMMNU.SRCLIB"></a>
<h3>Source library (SRCLIB)</h3>
<p>Specifies the library that is searched for the source file.
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the library list for the current thread are searched until the first match is found.
</dd>
</dl>
<dl>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the job is used to locate the source file. If no current library entry exists in the library list, QGPL is used.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library where the source file is located.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRPGMMNU.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="STRPGMMNU.OBJLIB"></a>
<h3>Object library (OBJLIB)</h3>
<p>Specifies the library that is to contain the object.
</p>
<dl>
<dt><b><u>*DFT</u></b></dt>
<dd>Blanks appear for this field. The library used depends on the menu option you selected.
</dd>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the job is the library that is to contain the object.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library that is to contain the created object.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRPGMMNU.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="STRPGMMNU.JOBD"></a>
<h3>Job description (JOBD)</h3>
<p>Specifies the job description used with the job being submitted.
</p>
<dl>
<dt><b><u>*USRPRF</u></b></dt>
<dd>The job description defined in the user profile of the user running the STRPGMMNU command is used for the job.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the job description used for the job. The job description is found through the library list being used by the job.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRPGMMNU.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="STRPGMMNU.ALWUSRCHG"></a>
<h3>Allow changes (ALWUSRCHG)</h3>
<p>Specifies whether the menu display fields you specified on the previous parameters in this command can be changed by the user.
</p>
<dl>
<dt><b><u>*YES</u></b></dt>
<dd>Values on the display can be changed.
</dd>
<dt><b>*NO</b></dt>
<dd>The display fields cannot be changed.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRPGMMNU.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="STRPGMMNU.EXITPGM"></a>
<h3>Option 3 exit program (EXITPGM)</h3>
<p>Specifies the user-written program that is called as an exit program in place of submitting a batch job when menu option 3 is selected. When the exit program is called, it receives parameters that are sent by the programmer menu. More information about the EXITPGM parameter is in the CL information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>No user-written program is called; a batch job is submitted. When *NONE is specified, *DLT must be specified for the <b>Delete option (DLTOPT)</b> parameter.
</dd>
</dl>
<p><b>Qualifier 1: Option 3 exit program</b>
</p>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the program called when option 3 is selected, instead of submitting the create command as a batch job. When a value is specified on this parameter, the text that appears on the menu for option 3 shows the name and library of the exit program.
</dd>
</dl>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>All libraries in the library list for the current thread are searched until the first match is found.
</dd>
</dl>
<dl>
<dt><b>*CURLIB</b></dt>
<dd>The current library for the job is used to locate the program. If no current library entry exists in the library list, QGPL is used.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the library where the program is located.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRPGMMNU.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="STRPGMMNU.DLTOPT"></a>
<h3>Delete option (DLTOPT)</h3>
<p>Specifies the action to be taken when:
</p>
<ul>
<li>A program name is specified on the <b>Option 3 exit program (EXITPGM)</b> parameter.
</li>
<li>Option 3 of the programmer menu is selected.
</li>
<li>An object of the name and type to be created already exists in the library specified on the menu.
</li>
</ul>
<p>Regardless of the value specified, the system passes a parameter (from among the parameters passed from the Programmer Menu) to the exit program that specifies whether the object exists.
</p>
<dl>
<dt><b><u>*DLT</u></b></dt>
<dd>This value must be specified if *NONE is specified on the EXITPGM parameter. If an exit program is specified for the EXITPGM parameter, and the object specified to be created with option 3 exists, and the Enter key is pressed, a message is shown; press the F11 key to proceed. When the F11 key is pressed, the system deletes or replaces the object before calling the program specified by the exit program. This is the normal Programmer Menu function when an exit program is not specified.
<p><b>NOTES:</b>
</p>
<ol>
<li>When the *DLT value is specified, the object is deleted or replaced before the job is submitted or the user exit program is called.
</li>
<li>If the source type is one of the following, the object is replaced rather than deleted (an exit program must be used to delete instead of replace):
<p>
<pre>
BAS C CBL
CBL36 CLP DSPF
DSPF36 FTN ICFF
MNU36 MSGF36 PAS
PLI PRTF RPG
RPG36 RPT36
</pre>
</p>
</li>
</ol>
</dd>
<dt><b>*PROMPT</b></dt>
<dd>The system does not delete or replace the object, but you are prompted for approval to delete the object. If the object exists, and the Enter key is pressed, a message is displayed. Press the F11 key to proceed; the system does not delete the object. The user confirms whether the object is deleted or replaced, yet the deletion is still controlled by the exit program.
</dd>
<dt><b>*NODLT</b></dt>
<dd>The user exit program is called regardless of the presence of the object.
</dd>
</dl>
<table border="1">
<caption align="bottom"><b>Figure: Table 1. Actions Taken by the System When an Exit Program Is Called</b>
</caption>
<tr>
<td>
<p>
<pre>
|-----------+----------+---------+------------|
| DLTOBJ | F11 | Object | Value |
| Specified | Required | Deleted | Passed |
| | | | to Exit |
| | | | Program |
|-----------+----------+---------+------------|
| If object | |
| existed | |
| when | |
| option 3 | |
| was | |
| selected | |
|--------------------------------+------------|
| *DLT | Yes | Yes | 1 |
|-----------+----------+---------+------------|
| *PROMPT | Yes | No | 0 |
|-----------+----------+---------+------------|
| *NODLT | No | No | 0 |
|-----------+----------+---------+------------|
| If object | |
| did not | |
| exist when | |
| option 3 | |
| was | |
| selected | |
|--------------------------------+------------|
| *DLT | No | --- | 2 |
|-----------+----------+---------+------------|
| *PROMPT | No | --- | 2 |
|-----------+----------+---------+------------|
| *NODLT | No | --- | 2 |
|-----------+----------+---------+------------|
</pre>
</p>
</td>
</tr>
</table>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRPGMMNU.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="STRPGMMNU.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Displaying Programmer Menu</b>
</p>
<p>
<pre>
STRPGMMNU
</pre>
</p>
<p>This command displays the Programmer Menu with defaults for all parameters. This has the same result as entering CALL QPGMMENU.
</p>
<p><b>Example 2: Preventing Values from Being Changed</b>
</p>
<p>
<pre>
STRPGMMNU SRCFILE(YOURFILE) SRCLIB(YOURLIB) OBJLIB(YOURLIB)
JOB(YOURJOBD) ALWUSRCHG(*NO)
</pre>
</p>
<p>This command prevents the values on the menu from being changed from those specified on the command.
</p>
<p><b>Example 3: Calling an Exit Program</b>
</p>
<p>
<pre>
STRPGMMNU EXITPGM(OPT3PGM) DLTOPT(*PROMPT)
</pre>
</p>
<p>This command calls user exit program OPT3PGM instead of submitting a batch job when option 3 is specified. If the object already exists, DLTOPT(*PROMPT) requires the user to press the F11 key; however, the object is not deleted.
</p>
<p><b>Example 4: Receiving Parameters</b>
</p>
<p>The following portion of a CL program is an example of how these parameters would be received by a user exit program. If the specified type is one of those listed, the object is not deleted. The create command with REPLACE(*YES) specified is passed to the exit program. The value passed to the exit program is 0.
</p>
<p>
<pre>
PGM PARM(&amp;OPTION &amp;PARM &amp;TYPE &amp;PARM2 &amp;SRCFILE +
&amp;SRCLIB &amp;OBJLIB &amp;JOBD &amp;RQSLEN &amp;RQSDTA512 +
&amp;F4 &amp;F11 &amp;EXIST)
/* The following values are passed in exactly as */
/* they appear on the Programmer Menu. */
DCL VAR(&amp;OPTION) TYPE(*CHAR) LEN(2)
DCL VAR(&amp;PARM) TYPE(*CHAR) LEN(10)
DCL VAR(&amp;TYPE) TYPE(*CHAR) LEN(10)
DCL VAR(&amp;PARM2) TYPE(*CHAR) LEN(21)
DCL VAR(&amp;SRCFILE) TYPE(*CHAR) LEN(10)
DCL VAR(&amp;SRCLIB) TYPE(*CHAR) LEN(10)
DCL VAR(&amp;OBJLIB) TYPE(*CHAR) LEN(10)
DCL VAR(&amp;JOBD) TYPE(*CHAR) LEN(10)
/* The following values are derived by QPGMMENU */
/* from the information entered to the above fields */
/* and the F keys. */
/* NUMBER OF BYTES OF REQUEST DATA */
DCL VAR(&amp;RQSLEN) TYPE(*DEC) LEN(3 0)
/* DATA FOR RRQSDTA PARAMETER OF SBMJOB COMMAND. */
DCL VAR(&amp;RQSDTA512) TYPE(*CHAR) LEN(512)
/* F4 WAS PRESSED, '1', OTHERWISE '0'. */
DCL VAR(&amp;F4) TYPE(*CHAR) LEN(1)
/* F11 WAS PRESSED, '1', OTHERWISE '0'. */
DCL VAR(&amp;F11) TYPE(*CHAR) LEN(1)
/* OBJECT EXISTS- '0 OBJECT WAS DELETED- '1'
OR OBJECT DID NOT EXIST -'2'*/
DCL VAR(&amp;EXIST) TYPE(*CHAR) LEN(1)
</pre>
</p>
<p>Additional information, along with examples of the STRPGMMNU command with the EXITPGM parameter, can be found in the <b>CL Programming</b> book in the Information Center.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRPGMMNU.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="STRPGMMNU.ERROR.MESSAGES">Error messages</a> </h3>
<p>None
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#STRPGMMNU.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>