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

620 lines
20 KiB
HTML
Raw Permalink 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>Send Distribution using JS (SNDDSTJS)</title>
</head>
<body bgcolor="white">
<a name="SNDDSTJS.Top_Of_Page"></a>
<h2>Send Distribution using JS (SNDDSTJS)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
<b>Threadsafe: </b>No
</td>
<td valign="top" align="right">
<a href="#SNDDSTJS.PARAMETERS.TABLE">Parameters</a><br>
<a href="#SNDDSTJS.COMMAND.EXAMPLES">Examples</a><br>
<a href="#SNDDSTJS.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="SNDDSTJS"></a>
<p>The Send Distribution using JS (SNDDSTJS) command allows you to send a spooled file attached to a new distribution message to a recipient or escalation list. The recipient information can be specified explicitly or retrieved from a spooled file.
</p>
<p>
<b>Note: </b>The graphical user interface must be used to display messages and stop escalation.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="SNDDSTJS.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="#SNDDSTJS.RCP"><b>RCP</b></a></td>
<td valign="top">Recipient</td>
<td valign="top">Single values: *NONE, *SPLF, *ONCALL<br>Other values (up to 50 repetitions): <i>Name</i></td>
<td valign="top">Required, Positional 1</td>
</tr>
<tr>
<td valign="top"><a href="#SNDDSTJS.SUBJECT"><b>SUBJECT</b></a></td>
<td valign="top">Subject</td>
<td valign="top"><i>Character value</i>, <b><u>*NONE</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#SNDDSTJS.MSG"><b>MSG</b></a></td>
<td valign="top">Message</td>
<td valign="top"><i>Character value</i>, <b><u>*NONE</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#SNDDSTJS.ESCALATION"><b>ESCALATION</b></a></td>
<td valign="top">Escalation list</td>
<td valign="top"><i>Character value</i>, *NONE, <b><u>*RCP</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#SNDDSTJS.RTNINTNET"><b>RTNINTNET</b></a></td>
<td valign="top">Return Internet address</td>
<td valign="top"><i>Character value</i>, <b><u>*RTNDFT</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#SNDDSTJS.SPLF"><b>SPLF</b></a></td>
<td valign="top">Spooled file</td>
<td valign="top"><i>Name</i>, <b><u>*NONE</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top" rowspan="4"><a href="#SNDDSTJS.JOB"><b>JOB</b></a></td>
<td valign="top">Job name</td>
<td valign="top">Single values: <b><u>*</u></b><br>Other values: <i>Qualified job name</i></td>
<td valign="top" rowspan="4">Optional</td>
</tr>
<tr>
<td valign="top">Qualifier 1: Job name</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top">Qualifier 2: User</td>
<td valign="top"><i>Name</i></td>
</tr><tr>
<td valign="top">Qualifier 3: Number</td>
<td valign="top">000000-999999</td>
</tr><tr>
<td valign="top"><a href="#SNDDSTJS.SPLNBR"><b>SPLNBR</b></a></td>
<td valign="top">Spooled fie number</td>
<td valign="top"><i>Integer</i>, <b><u>*ONLY</u></b>, *LAST</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#SNDDSTJS.PAGERANGE"><b>PAGERANGE</b></a></td>
<td valign="top">Page range to send</td>
<td valign="top"><i>Element list</i></td>
<td valign="top" rowspan="3">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Starting page</td>
<td valign="top">
1-99999999, <b><u>1</u></b></td>
</tr>
<tr>
<td valign="top">Element 2: Ending page</td>
<td valign="top">
1-99999999, <b><u>*END</u></b></td>
</tr>
<tr>
<td valign="top" rowspan="4"><a href="#SNDDSTJS.SLTTXT"><b>SLTTXT</b></a></td>
<td valign="top">Page selection</td>
<td valign="top"><i>Element list</i></td>
<td valign="top" rowspan="4">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Selection text</td>
<td valign="top">
<i>Character value</i>, <b><u>*NONE</u></b></td>
</tr>
<tr>
<td valign="top">Element 2: Line number</td>
<td valign="top">
0-256</td>
</tr>
<tr>
<td valign="top">Element 3: Starting position</td>
<td valign="top">
0-256</td>
</tr>
<tr>
<td valign="top"><a href="#SNDDSTJS.ATTACH"><b>ATTACH</b></a></td>
<td valign="top">Attachment name</td>
<td valign="top"><i>Name</i>, <b><u>*SPLF</u></b>, *NONE</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#SNDDSTJS.SUFFIX"><b>SUFFIX</b></a></td>
<td valign="top">Attachment suffix</td>
<td valign="top"><i>Character value</i>, <b><u>PDF</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#SNDDSTJS.RMVSPLF"><b>RMVSPLF</b></a></td>
<td valign="top">Remove spooled file</td>
<td valign="top"><b><u>*NO</u></b>, *YES</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#SNDDSTJS.TOINTNET"><b>TOINTNET</b></a></td>
<td valign="top">Internet address</td>
<td valign="top">Values (up to 50 repetitions): <i>Character value</i>, <b><u>*NONE</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top" rowspan="5"><a href="#SNDDSTJS.ADRLOC"><b>ADRLOC</b></a></td>
<td valign="top">Address location</td>
<td valign="top"><i>Element list</i></td>
<td valign="top" rowspan="5">Optional</td>
</tr>
<tr>
<td valign="top">Element 1: Line number</td>
<td valign="top">
0-256, *TEXT</td>
</tr>
<tr>
<td valign="top">Element 2: Starting position</td>
<td valign="top">
0-256, *AFTER</td>
</tr>
<tr>
<td valign="top">Element 3: Length</td>
<td valign="top">
0-60</td>
</tr>
<tr>
<td valign="top">Element 4: Text</td>
<td valign="top">
<i>Character value</i></td>
</tr>
<tr>
<td valign="top" rowspan="3"><a href="#SNDDSTJS.PGM"><b>PGM</b></a></td>
<td valign="top">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: 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></table>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="SNDDSTJS.RCP"></a>
<h3>Recipient (RCP)</h3>
<p>Specifies the recipient to whom you want to send the distribution message.
</p>
<p>
<b>Note: </b>The graphical user interface must be used to create and update e-mail information for recipients.
</p>
<p>This is a required parameter.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b>*NONE</b></dt>
<dd>There is no recipient specified for the distribution message. An internet address must be specified.
</dd>
<dt><b>*SPLF</b></dt>
<dd>The recipient information is retrieved from the attached spooled file.
</dd>
<dt><b>*ONCALL</b></dt>
<dd>Only recipients that are on-call will receive the message.
</dd>
</dl>
<p><b>Other values (up to 50 repetitions)</b>
</p>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the recipient. Press F4 when prompting this command to select from a list of existing recipients.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDDSTJS.SUBJECT"></a>
<h3>Subject (SUBJECT)</h3>
<p>Specifies the subject for the distribution message.
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>There is no subject for the distribution message.
</dd>
<dt><b><i>character-value</i></b></dt>
<dd>Specify the subject for the distribution message.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDDSTJS.MSG"></a>
<h3>Message (MSG)</h3>
<p>Specifies the message text for the distribution message.
</p>
<p>
<b>Note: </b>Use &amp;N within the message to force the message to a new line.
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>There is no message body for the distribution message.
</dd>
<dt><b><i>character-value</i></b></dt>
<dd>Specify the message body for the distribution message.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDDSTJS.ESCALATION"></a>
<h3>Escalation list (ESCALATION)</h3>
<p>Specifies the escalation list for the distribution message.
</p>
<p>
<b>Note: </b>The graphical user interface must be used to maintain escalation lists.
</p>
<dl>
<dt><b><u>*RCP</u></b></dt>
<dd>The escalation list associated with the recipient is used for the distribution message.
</dd>
<dt><b>*NONE</b></dt>
<dd>No escalation list is used for the distribution message.
</dd>
<dt><b><i>character-value</i></b></dt>
<dd>Specify the name of the escalation list for the distribution message.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDDSTJS.RTNINTNET"></a>
<h3>Return Internet address (RTNINTNET)</h3>
<p>Specifies the return internet address (i.e. e-mail address) for the distribution message.
</p>
<dl>
<dt><b><u>*RTNDFT</u></b></dt>
<dd>Use the return internet address specified in the e-mail properties.
</dd>
<dt><b><i>character-value</i></b></dt>
<dd>Specify the return e-mail address for the distribution message.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDDSTJS.SPLF"></a>
<h3>Spooled file (SPLF)</h3>
<p>Specifies the spooled file that you want to attach to the distribution message.
</p>
<p>
<b>Note: </b>Spooled files that contain graphics cannot be used.
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>You do not want to send a spooled file with the distribution message.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the spooled file to attach to the distribution message.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDDSTJS.JOB"></a>
<h3>Job name (JOB)</h3>
<p>Specifies the name of the job that created the spooled file attached to the distribution message.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b><u>*</u></b></dt>
<dd>The job that created the spooled file issued this command.
</dd>
</dl>
<p><b>Qualifier 1: Job name</b>
</p>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the job that contains the spooled file.
</dd>
</dl>
<p><b>Qualifier 2: User</b>
</p>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the user from which the spooled file originated.
</dd>
</dl>
<p><b>Qualifier 3: Number</b>
</p>
<dl>
<dt><b><i>000000-999999</i></b></dt>
<dd>Specify a number between 000000 and 999999, which is the system-assigned job number.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDDSTJS.SPLNBR"></a>
<h3>Spooled fie number (SPLNBR)</h3>
<p>Specifies the unique number of the spooled file attached to the distribution message.
</p>
<dl>
<dt><b><u>*ONLY</u></b></dt>
<dd>Only one spooled file in the job has the specified file name; therefore, the number of the spooled file is not necessary.
</dd>
<dt><b>*LAST</b></dt>
<dd>If there is more than one spooled file with the specified file name, the one with the highest number is the file that is sent.
</dd>
<dt><b><i>integer</i></b></dt>
<dd>Specify the number of the spooled file that matches the file you want to send.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDDSTJS.PAGERANGE"></a>
<h3>Page range to send (PAGERANGE)</h3>
<p>Specifies the page range to send.
</p>
<p><b>Element 1: Starting page</b>
</p>
<dl>
<dt><b><u>1</u></b></dt>
<dd>The first page of the spooled file.
</dd>
<dt><b><i>starting-page</i></b></dt>
<dd>Specify the starting page to send.
</dd>
</dl>
<p><b>Element 2: Ending page</b>
</p>
<dl>
<dt><b><u>*END</u></b></dt>
<dd>The last page of the file is the ending page to send.
</dd>
<dt><b><i>ending-page</i></b></dt>
<dd>Specify the ending page to send.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDDSTJS.SLTTXT"></a>
<h3>Page selection (SLTTXT)</h3>
<p>Specifies the text contained within a page of the spooled file that you want to select to attach to the distribution message.
</p>
<p>
<b>Note: </b>To search the entire page for the selection text do not specify a line number or starting position.
</p>
<p><b>Element 1: Selection text</b>
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>The entire spooled file will be sent.
</dd>
<dt><b><i>character-value</i></b></dt>
<dd>Specify the text within a page of the spooled file that you want to attach to a distribution message. For example, you can specify SLTTXT('Account - 1234'), and Advanced Job Scheduler will select out the pages that contain 'Account - 1234' to send to the recipient you have specified.
</dd>
</dl>
<p><b>Element 2: Line number</b>
</p>
<dl>
<dt><b><i>0-256</i></b></dt>
<dd>Specify the line number within the spooled file.
</dd>
</dl>
<p><b>Element 3: Starting position</b>
</p>
<dl>
<dt><b><i>0-256</i></b></dt>
<dd>Specify the starting position within the spooled file.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDDSTJS.ATTACH"></a>
<h3>Attachment name (ATTACH)</h3>
<p>Specifies the name to be used for the distribution message attachment.
</p>
<dl>
<dt><b><u>*SPLF</u></b></dt>
<dd>The attachment file name is the name specified for the <b>Spooled file (SPLF)</b> parameter.
</dd>
<dt><b>*NONE</b></dt>
<dd>No attachment file name is specified. The spooled file will be embedded into the body of the message.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name for the spooled file attachment.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDDSTJS.SUFFIX"></a>
<h3>Attachment suffix (SUFFIX)</h3>
<p>Specify the extension name for the spooled file attachment. You can specify any 3 or 4 character extension for your spooled file. The default extension is PDF for a portable document format attachment conversion. However, changing the extension does not necessarily change the actual format of the file itself. For example, if you were to change the extension to TXT, the attached file would only have the characteristics of a text file attachment when mailed, and not be an actual text file itself. This will only work if you have an actual text file on your system that you need to attach to an e-mail.
</p>
<p>
<b>Note: </b>Apart from PDF, TXT is the only extension that will convert correctly to an e-mail attachment.
</p>
<dl>
<dt><b><u>PDF</u></b></dt>
<dd>The attachement is converted to a PDF (Portable Document Format) file.
</dd>
<dt><b><i>character-value</i></b></dt>
<dd>Specify the file extension for the spooled file attachment.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDDSTJS.RMVSPLF"></a>
<h3>Remove spooled file (RMVSPLF)</h3>
<p>Specifies if you want to remove the spooled file attachment from your system after the distribution message has completed.
</p>
<dl>
<dt><b><u>*NO</u></b></dt>
<dd>You do not wish to remove the spooled file after the message has completed.
</dd>
<dt><b>*YES</b></dt>
<dd>You do wish to remove the spooled file after the message is completed.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDDSTJS.TOINTNET"></a>
<h3>Internet address (TOINTNET)</h3>
<p>Specifies the internet address (i.e. e-mail address) for the distribution message.
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>There is no internet address for this message.
</dd>
<dt><b><i>character-value</i></b></dt>
<dd>Specify the internet address for the distribution message.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDDSTJS.ADRLOC"></a>
<h3>Address location (ADRLOC)</h3>
<p>Specifies the parameters that you want to use to find the address information (i.e. e-mail addresses) for the distribution message. This includes the line number within the spooled file, the starting position, the length, and the search text. An e-mail address can be extracted from each page of the spooled file or can be retrieved using an exit program and the value extracted from each page of the spooled file. For example, you can specify that the e-mail address for the invoice is always on line 3, position 45 for a length of 40. Or you can specify that the e-mail address is found after the word 'Email:' for a length of 40. Or you can specify that the account number for a customer is found after the word 'Account:' for a length of 10 and the exit program to retrieve the e-mail address for the account number extracted.
</p>
<p><b>Element 1: Line number</b>
</p>
<dl>
<dt><b>*TEXT</b></dt>
<dd>You will use search text to identify the address information.
</dd>
<dt><b><i>0-256</i></b></dt>
<dd>Specify the line number within the spooled file.
</dd>
</dl>
<p><b>Element 2: Starting position</b>
</p>
<dl>
<dt><b>*AFTER</b></dt>
<dd>The starting position will be the first character after the located search text.
</dd>
<dt><b><i>0-256</i></b></dt>
<dd>Specify the starting position within the spooled file.
</dd>
</dl>
<p><b>Element 3: Length</b>
</p>
<dl>
<dt><b><i>0-60</i></b></dt>
<dd>Specify the length of the address information.
</dd>
</dl>
<p><b>Element 4: Text</b>
</p>
<dl>
<dt><b><i>character-value</i></b></dt>
<dd>Specify the text to search for within the spooled file.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="SNDDSTJS.PGM"></a>
<h3>Exit program (PGM)</h3>
<p>Specifies the program that Advanced Job Scheduler will use to retrieve the address. The ADRLOC parameter will be used to located the key information that the program will need to find the address information. This user-written program must have 2 parameters. The first is a 60-byte character parameter. It will contain the value extracted from the spooled file based on the line number, starting position and length. The second is a 256-byte character parameter. It should return the e-mail address to use when sending that page of the spooled file. It should return blanks if no address is found.
</p>
<p><b>Single values</b>
</p>
<dl>
<dt><b><u>*NONE</u></b></dt>
<dd>No program is used to retrieve the address.
</dd>
</dl>
<p><b>Qualifier 1: Exit program</b>
</p>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the exit program.
</dd>
</dl>
<p><b>Qualifier 2: Library</b>
</p>
<dl>
<dt><b><u>*LIBL</u></b></dt>
<dd>The library list is used to locate the program.
</dd>
<dt><b>*CURLIB</b></dt>
<dd>The current library is used to locate the program. If no current library is defined for the job, QGPL library is used.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library where the exit program is located.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="SNDDSTJS.COMMAND.EXAMPLES">Examples</a> </h3>
<p>
<pre>
SNDDSTJS SPLF(QPINVOICE) JOB(*) SPLNBR(*LAST)
MSG('Attached is your invoice.')
PGM(MYLIB/PGMEXIT) ADRLOC(5 3 10)
</pre>
</p>
<p>This command sends the most-recently created spooled file named QPINVOICE for the current job as an e-mail attachment. The exit program PGMEXIT in library MYLIB will be invoked. The account number is found on line 5 of each page of the spooled file, in position 3 and is 10 in length. The program is called to retrieve the e-mail address for the account number found in the spooled file.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="SNDDSTJS.ERROR.MESSAGES">Error messages</a></h3>Unknown
</div>
<table width="100%">
<tr><td align="right"><a href="#SNDDSTJS.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>