Receive Distribution (RCVDST)

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

The Receive Distribution (RCVDST) command allows you to receive incoming distributions such as documents or files. The documents or files can be placed in folders or document objects or can be placed in an output file for processing.

Restriction: The requester of the command must be enrolled in the system distribution directory. If you request distribution information for another user, you must have been given permission to work on behalf of that user with the Grant User Permission (GRTUSRPMN) command. Personal distribution cannot be requested if the requester is working on behalf of another user.

Top

Parameters

Keyword Description Choices Notes
DSTID Distribution identifier Character value Required, Positional 1
USRID User identifier Single values: *CURRENT
Other values: Element list
Optional
Element 1: User ID Character value
Element 2: Address Character value
DOC Document Character value, *NONE Optional, Positional 2
FLR In folder Character value, *NONE Optional, Positional 3
OUTFILE File to receive output Single values: *NONE
Other values: Qualified object name
Optional
Qualifier 1: File to receive output Name
Qualifier 2: Library Name, *LIBL, *CURLIB
OUTMBR Output member options Element list Optional
Element 1: Member to receive output Name, *FIRST
Element 2: Replace or add records *REPLACE, *ADD
OUTDTATYP Type of data for output Single values: *DFT, *ALL
Other values (up to 24 repetitions): *DSTINFO, *MSG, *DOCD, *CRTDATE, *EXPDATE, *DOCDATE, *FILDATE, *CHGDATE, *ACTDATE, *CMPDATE, *AUTHOR, *CPYLST, *DOCCLS, *FILCAB, *SUBJECT, *KWD, *REF, *STATUS, *PROJECT, *RPYDATE, *AUTUSR, *DSTEXPDATE, *IDP, *DOC
Optional
ACKRCV Acknowledge receipt *YES, *NO Optional
DSTIDEXN Distribution ID extension 1-99, *NONE Optional
KEEP Keep in mail log *NO, *YES Optional
CMDCHRID Command character identifier Single values: *SYSVAL, *DEVD
Other values: Element list
Optional
Element 1: Graphic character set Integer
Element 2: Code page Integer
Top

Distribution identifier (DSTID)

Specifies the unique distribution identifier of the distribution. The identifier is assigned to the distribution by the system that originated it. Only incoming distributions can be received. If the identifier represents an outgoing distribution, an error message is returned.

distribution-id
The distribution identifier is composed of the second part of the sender's user ID (padded on the right to 8 characters), the first part of the sender's user ID (padded on the right to 8 characters), and a 4-digit zoned sequence number with the leading zeros. For example, 'NEWYORK SMITH 0204'. This parameter is required when *DSTID is specified on the Information to be sent prompt (TYPE parameter).

This is a required parameter.

Top

User identifier (USRID)

Specifies which user ID and user ID address should be associated with the request.

*CURRENT
You are performing the request for yourself.
user-ID
Specify another user's user ID or your user ID. You must have been given permission to work on behalf of another user or have *ALLOBJ authority.
user-ID-address
Specify another user's address or your address. You must have been given permission to work on behalf of another user or have *ALLOBJ authority.
Top

Document (DOC)

Specifies the name of the document object in which the distribution is placed when it is received. This document must not already exist and it is created as a private document. The document is either owned by you, or by an authority-granting user for whom you work.

*NONE
The distribution being received is not placed in a document object.
document-name
Specify the name of the document in which the distribution is placed. A maximum of 12 characters can be specified.
Top

In folder (FLR)

Specifies the name of the folder that contains the document receiving the distribution. The folder must already exist and you must have the authority to create new documents in the folder.

*NONE
The document being received is not placed in a folder. Specify this value if the document is received into a database file for processing and Document(DOC parameter) is not specified.
folder-name
Specify the name of the folder that contains the document. A folder name can consist of a series of folder names if the document is located in a folder contained within another folder. A maximum of 63 characters can be specified.
Top

File to receive output (OUTFILE)

Specifies the name and library of the database file to which the output is directed. If the output file does not exist, this command creates a database file in the specified library. The authority for users with no specific authority is the same as the create authority specified for the library in which the file is created. Use the Display Library Description (DSPLIBD) command to show the library's create authority.

*NONE
The output is not directed to a database file.
data-base-file-name
Specify the name of the database file that receives the output.

The possible library values are:

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is used to locate the database file. If no current library entry exists in the library list, QGPL is used.
library-name
Specify the library where the database file is located.

Note: If a new file is created, the system uses QAOSIRCV in QSYS with a format name of OSRCVD as a model.

Top

Output member options (OUTMBR)

Specifies whether the output from the command is displayed at the requesting work station or printed with the job's spooled output.

The possible member to receive output values are:

*FIRST
The first member in the file receives the output. If the member does not exist, the system creates a member with the name of the file specified on the File to receive output prompt (OUTFILE parameter).
member-name
Specify the name of the file member that receives the output. If the member does not exist, the system creates the file member. If the member already exists, the system adds records to the end of the member or clears the member and then adds the records.

The possible add or replace values are:

*REPLACE
The system clears the existing member and adds the new records.
*ADD
The system adds the new records to the end of the existing records.
Top

Type of data for output (OUTDTATYP)

Specifies which type of distribution data is written to the database file.

*DFT
The following record codes are written to the output file:
Record code
Description
010
Distribution Description
020
Message Text
105
Document Description
800
Document Data
*ALL
All record formats are written to the output file.
*DSTINFO
The distribution description record is written. The record code is 010.
*MSG
The message text record is written. The record code is 020.
*DOCD
The document description record is written. The record code is 105.
*DOCCLS
The document class record is written. The record code is 155.
*SUBJECT
The subject records are written. The record code is 165.
*FILCAB
The file cabinet reference record is written. The record code is 160.
*AUTHOR
The author records are written. The record code is 145.
*KWD
The keyword records are written. The record code is 170.
*CPYLST
The copy list records are written. The record code is 150.
*FILDATE
The file date record is written. The record code is 125.
*EXPDATE
The expiration date record is written. The record code is 115.
*DOCDATE
The document date record is written. The record code is 120.
*CRTDATE
The create date record is written. The record code is 110.
*ACTDATE
The action due date record is written. The record code is 135.
*CHGDATE
The date last changed record is written. The record code is 130.
*CMPDATE
The completion date record is written. The record code is 140.
*REF
The reference record is written. The record code is 175.
*STATUS
The status record is written. The record code is 180.
*PROJECT
The project record is written. The record code is 185.
*AUTUSR
The authorizing Userid and Address is written. This is the user that authorized the content of this distribution. The record code is 190.
*DSTEXPDATE
The distribution expiration date and time is written. The record code is 195.
*RPYDATE
The reply requested date and time is written. The record code is 200.
*IDP
The interchange document profile (IDP) is written. The record code is 500.
*DOC
The document data records are written. The record code is 800.
Top

Acknowledge receipt (ACKRCV)

Specifies whether a confirmation of delivery (acknowledgement) is sent back to the sender of the distribution.

*YES
The confirmation of delivery (COD) is sent back to the sender.
*NO
The confirmation of delivery is not sent back to the sender.
Top

Distribution ID extension (DSTIDEXN)

Specifies the extension of the distribution identifier (if any) specified on the Distribution identifier prompt (DSTID parameter). This 2-digit extension has a value ranging from 01 through 99 that uniquely identifies duplicate distributions. The default value is 01.

*NONE
There is no duplicate distribution. *NONE is equivalent to an extension of 01.
distribution-id-extension
Specify the extension associated with the distribution. This is used to uniquely identify duplicate distributions.
Top

Keep in mail log (KEEP)

Specifies whether the received distribution is deleted from the mail log or kept in the mail log.

*NO
When all the information requested has been written to the OUTFILE or DOC, the distribution is removed from the user's incoming mail.
*YES
When all the information requested has been written to the OUTFILE or to DOC, the distribution is not removed from the user's incoming mail.
Top

Command character identifier (CMDCHRID)

Specifies the character identifier (graphic character set and code page) for the data being entered as command parameter values. The character identifier is related to the display device used to enter the command.

If the values specified on the Distribution identifier prompt (DSTID parameter) and User identifier prompt (USRID parameter) are being read from an output file created by the Query Distribution (QRYDST) command, specify '930 500' on this parameter.

*SYSVAL
The system determines the graphic character set and code page values for the command parameters from the QCHRID system value.
*DEVD
The system determines the graphic character set and code page values from the display device description where this command was entered. This option is valid only when entered from an interactive job. If this option is specified in a batch job, an error occurs.

Element 1: Graphic character set

1-32767
Specify the graphic character set to use.

Element 2: Code page

1-32767
Specify the code page to use.
Top

Examples

Example 1: Receiving Current User Distribution

RCVDST   DISTID('SYSTEM1 USERA 0001')
         OUTFILE(MYLIB/MYFILE)  OUTMBR(MYMBR *ADD)
         OUTDTATYP(*ALL)  CMDCHRID(*DEVD)

This command receives the current user distribution into output file MYFILE located in library MYLIB. The distribution is added to member MYMBR. All output file information is added to the output file MYFILE.

Example 2: Receiving Distribution Sent to a User

RCVDST   DSTID('BAKER RCH38P 0019')  DSTINDEXN(01)
         OUTFILE(JOWLIB/DOCUMENTS)  USRID(*CURRENT)

This command receives a distribution that was sent to a user. It is copied into the first member in a database file called DOCUMENTS in a library called JOWLIB.

Top

Error messages

*ESCAPE Messages

CPF8A87
Document name &2 not correct.
CPF8A97
Folder name &1 not correct.
CPF900B
User ID and address &1 &2 not in System Distribution Directory.
CPF900C
Sign on and verify of user failed.
CPF905C
Error occurred trying to find a translation table.
CPF9096
Cannot use CMDCHRID(*DEVD), DOCCHRID(*DEVD) in batch job.
CPF9098
Distribution not received.
CPF9845
Error occurred while opening file &1.
CPF9846
Error while processing file &1 in library &2.
CPF9847
Error occurred while closing file &1 in library &2.
CPF9860
Error occurred during output file processing.
Top