COZZI - Email a SPOOL File (EMAILSPLF)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The COZZI - Email a SPOOL File (EMAILSPLF) command sends an existing SPOOL file using the Java SendMail API found in COZTOOLS SENDMAIL library. The SendMail library must be installed and configured in order for EMAILSPLF to function.

Restrictions:

Top

Parameters

Keyword Description Choices Notes
FROM Send From Character value, *PROPERTIES Optional, Positional 1
TO Send To (use & to extend) Values (up to 300 repetitions): Character value, *NONE Optional, Positional 2
SUBJECT Email subject line Character value, *SPLF, *NONE Optional, Positional 3
SPLFNAME Spooled file name Name, *LAST Optional, Positional 4
JOB Job name Single values: *, *CURRENT
Other values: Qualified job name
Optional, Positional 5
Qualifier 1: Job name Name
Qualifier 2: User Name
Qualifier 3: Number 000000-999999
SPLNBR SPOOL file number 0-999999, *ONLY, *LAST, *ANY Optional, Positional 6
FMT SPOOL Format for email *PDF, *TEXT Optional, Positional 7
STMF SPOOL File workfile directory Path name, *NONE, *HOME Optional, Positional 8
STMFNAME IFS Stream file name Path name, *SPLFNAME, *OUTQ, *SRLNBR, *USRDTA, *DATE, *FULL, *FULLSYS Optional, Positional 9
STMFOPT Replace IFS work file *REPLACE, *CREATE Optional, Positional 10
EMAILPARMS Show additional email options *NO, *YES Optional, Positional 11
MSG Message Character value, *NONE Optional, Positional 12
USER Email User ID Character value, *NONE, *FROM, *PROPERTIES Optional, Positional 13
PWD Email Password Character value, *PROPERTIES, *NONE, *USER Optional, Positional 14
SMTPSVR SMTP server/relay Path name, *PROPERTIES, *GMAIL, *GODADDY, *COMCAST Optional, Positional 15
PORT SMTP port Integer, *AUTO, *PROPERTIES, 25, 80, 465, 587, 995, 3535 Optional, Positional 16
Top

Send From (FROM)

Specifies the Sender of the email.

*PROPERTIES
Use the mail.smtp.user setting found in the Properties file located on the IFS. If there is no Proporties setting found, it is assumed that no send is or Authentication is required on the mail server.
character-value
Specify the email address used as the FROM (sender) on the email.
Top

Send To (use & to extend) (TO)

Specifies up to 300 email addresses to recieve this SPOOL file.

You can specify 300 values for this parameter.

*NONE
No one receives the email.
character-value
Specify the email addresses that should receive the specified SPOOL file.
Top

Email subject line (SUBJECT)

Specifies the optional Subject line for the email.

*SPLF
The SPOOL File name and number are inserted into the Subject line.
*NONE
No subject is specified.
character-value
Specify the email Subject. Up to 128 characters are permitted for the Subject line.
Top

Spooled file name (SPLFNAME)

Specifies the SPOOL File name to be emailed.

*LAST
The most recent SPOOL file created by the user is emailed.
name
Specify the name of the SPOOL file that is emailed.
Top

Job name (JOB)

Specifies the fully qualified job name, user, number that created the SPOOL file being emailed. If *LAST is specified for SPLFNAME and SPLNBR parameters, the default for this parameter causes all jobs for the user running the EMAILSPLF command to be searched.

Single values

*
The Current job is searched for the specified SPOOL file.
*CURRENT
This has the same result as JOB(*).

Qualifier 1: Job name

name
Specify the name of job.

Qualifier 2: User

name
Specify the User Profile of the job name be specified.

Qualifier 3: Number

000000-999999
Specify the job number of job being specified.
Top

SPOOL file number (SPLNBR)

Specifies SPOOL File number. When multiple entries for the SPLFNAME exist, use the SPLNBR parameter to identify which SPOOL file should be selected.

*ONLY
Rarely used, this option indicates that only one SPOOL exists with the name specified on the SPLFNAME parameter.
*LAST
The most recent SPOOL file named on the SPLFNAME parameter is selected. If SPLFNAME(*LAST) and JOB(*) are also specified, all jobs for the current user are searched for the most recent SPOOL file.
*ANY
Any SPOOL file (regardless of sequence number) is selected, using the SPLFNAME specified on the SPLFNAME parameter.
0-999999
When multiple entries for the SPLFNAME exist, use the SPLNBR parameter to identify which SPOOL file should be selected.
Top

SPOOL Format for email (FMT)

Specifies format of the SPOOL file when sent as an email attachment.

*PDF
The SPOOL file is converted to PDF format and emailed. This is the default.
*TEXT
The SPOOL file is converted to plain text and emailed. NOTE that some formatting charateristics are lost when *TEXT is selected.
Top

SPOOL File workfile directory (STMF)

Specifies <...>

*NONE
<...>
*HOME
<...>
path-name
Specify the path name of <...>
Top

IFS Stream file name (STMFNAME)

Specifies <...>

*SPLFNAME
<...>
*OUTQ
<...>
*SRLNBR
<...>
*USRDTA
<...>
*DATE
<...>
*FULL
<...>
*FULLSYS
<...>
path-name
Specify the path name of <...>
Top

Replace IFS work file (STMFOPT)

Specifies <...>

*REPLACE
<...>
*CREATE
<...>
Top

Show additional email options (EMAILPARMS)

Specifies <...>

*NO
<...>
*YES
<...>
Top

Message (MSG)

Specifies <...>

*NONE
<...>
character-value
Specify the <...>
Top

Email User ID (USER)

Specifies <...>

*NONE
<...>
*FROM
<...>
*PROPERTIES
<...>
character-value
Specify the <...>
Top

Email Password (PWD)

Specifies <...>

*PROPERTIES
<...>
*NONE
<...>
*USER
<...>
character-value
Specify the <...>
Top

SMTP server/relay (SMTPSVR)

Specifies <...>

*PROPERTIES
<...>
*GMAIL
<...>
*GODADDY
<...>
*COMCAST
<...>
path-name
Specify the path name of <...>
Top

SMTP port (PORT)

Specifies <...>

*AUTO
<...>
*PROPERTIES
<...>
25
<...>
80
<...>
465
<...>
587
<...>
995
<...>
3535
<...>
integer
Specify the number of <...>
Top

Examples for EMAILSPLF

Example 1: Simple Command Example

EMAILSPLF  KWD1(PARMVAL1)

This command <...>

Example 2: More Complex Command Example

EMAILSPLF   KWD1(PARMVAL1)  KWD2(PARMVAL2)
            KWD3(PARMVAL3)

This command <...>

Top

Error messages for EMAILSPLF

*ESCAPE Messages

CPF9801
Object &2 in library &3 not found.
CPF9802
Not authorized to object &2 in &3.
CPF9803
Cannot allocate object &2 in library &3.
CPF9807
One or more libraries in library list deleted.
CPF9808
Cannot allocate one or more libraries on library list.
CPF9810
Library &1 not found.
CPF9811
Program &1 in library &2 not found.
CPF9812
File &1 in library &2 not found.
CPF9820
Not authorized to use library &1.
CPF9830
Cannot assign library &1.
CPF9899
Error occurred during processing of command.
Top