Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
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.
Note: The graphical user interface must be used to display messages and stop escalation.
Top |
Keyword | Description | Choices | Notes |
---|---|---|---|
RCP | Recipient | Single values: *NONE, *SPLF, *ONCALL Other values (up to 50 repetitions): Name |
Required, Positional 1 |
SUBJECT | Subject | Character value, *NONE | Optional |
MSG | Message | Character value, *NONE | Optional |
ESCALATION | Escalation list | Character value, *NONE, *RCP | Optional |
RTNINTNET | Return Internet address | Character value, *RTNDFT | Optional |
SPLF | Spooled file | Name, *NONE | Optional |
JOB | Job name | Single values: * Other values: Qualified job name |
Optional |
Qualifier 1: Job name | Name | ||
Qualifier 2: User | Name | ||
Qualifier 3: Number | 000000-999999 | ||
SPLNBR | Spooled fie number | Integer, *ONLY, *LAST | Optional |
PAGERANGE | Page range to send | Element list | Optional |
Element 1: Starting page | 1-99999999, 1 | ||
Element 2: Ending page | 1-99999999, *END | ||
SLTTXT | Page selection | Element list | Optional |
Element 1: Selection text | Character value, *NONE | ||
Element 2: Line number | 0-256 | ||
Element 3: Starting position | 0-256 | ||
ATTACH | Attachment name | Name, *SPLF, *NONE | Optional |
SUFFIX | Attachment suffix | Character value, PDF | Optional |
RMVSPLF | Remove spooled file | *NO, *YES | Optional |
TOINTNET | Internet address | Values (up to 50 repetitions): Character value, *NONE | Optional |
ADRLOC | Address location | Element list | Optional |
Element 1: Line number | 0-256, *TEXT | ||
Element 2: Starting position | 0-256, *AFTER | ||
Element 3: Length | 0-60 | ||
Element 4: Text | Character value | ||
PGM | Exit program | Single values: *NONE Other values: Qualified object name |
Optional |
Qualifier 1: Exit program | Name | ||
Qualifier 2: Library | Name, *LIBL, *CURLIB |
Top |
Specifies the recipient to whom you want to send the distribution message.
Note: The graphical user interface must be used to create and update e-mail information for recipients.
This is a required parameter.
Single values
Other values (up to 50 repetitions)
Top |
Specifies the subject for the distribution message.
Top |
Specifies the message text for the distribution message.
Note: Use &N within the message to force the message to a new line.
Top |
Specifies the escalation list for the distribution message.
Note: The graphical user interface must be used to maintain escalation lists.
Top |
Specifies the return internet address (i.e. e-mail address) for the distribution message.
Top |
Specifies the spooled file that you want to attach to the distribution message.
Note: Spooled files that contain graphics cannot be used.
Top |
Specifies the name of the job that created the spooled file attached to the distribution message.
Single values
Qualifier 1: Job name
Qualifier 2: User
Qualifier 3: Number
Top |
Specifies the unique number of the spooled file attached to the distribution message.
Top |
Specifies the page range to send.
Element 1: Starting page
Element 2: Ending page
Top |
Specifies the text contained within a page of the spooled file that you want to select to attach to the distribution message.
Note: To search the entire page for the selection text do not specify a line number or starting position.
Element 1: Selection text
Element 2: Line number
Element 3: Starting position
Top |
Specifies the name to be used for the distribution message attachment.
Top |
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.
Note: Apart from PDF, TXT is the only extension that will convert correctly to an e-mail attachment.
Top |
Specifies if you want to remove the spooled file attachment from your system after the distribution message has completed.
Top |
Specifies the internet address (i.e. e-mail address) for the distribution message.
Top |
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.
Element 1: Line number
Element 2: Starting position
Element 3: Length
Element 4: Text
Top |
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.
Single values
Qualifier 1: Exit program
Qualifier 2: Library
Top |
SNDDSTJS SPLF(QPINVOICE) JOB(*) SPLNBR(*LAST) MSG('Attached is your invoice.') PGM(MYLIB/PGMEXIT) ADRLOC(5 3 10)
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.
Top |
Top |