• No results found

RECEIVE command

In document Expedite Base/400 Programming Guide (Page 126-132)

RECEIVE command

The RECEIVE command retrieves files from the Information Exchange mailbox.

Syntax

receive fileid(library1/sales(price)) class(prices) startdate(040701) starttime(000000) enddate(041231) endtime(180000);

Results: Files in your Information Exchange mailbox with a user class of prices are received in price. If more than one such file exists in your mailbox, it is appended to price. Only files sent between 00:00:00 hours (your local time) on July 1, 2004, and 18:00:00 hours on December 31, 2004, are received from your mailbox.

Parameters alias

Table type and table name of an alias table.

NOTE: If you are using supported data compression software and receive compressed data, not all parameters are supported. See Appendix D, “Using data compression,’’ for more information.

blank An alias name was not used. This is the default.

gxxx Global alias table, where xxx identifies a 1- to 3-character table name.

oxxx Organizational alias table, where xxx identifies a 1- to 3-character table name.

pxxx Private alias table, where xxx identifies a 1- to 3-character table name.

NOTE: You create and maintain alias tables by using Information Exchange Administration Services (see Using Information Exchange Administration Services), or by using the DEFINEALIAS command (see “DEFINEALIAS command” on page 94).

RECEIVE command

aliasname

Alias name defined in the alias table. Use 1 to 16 alphanumeric characters.

sysid

System ID of a single-source user ID. You need the system ID only if you specify the

ACCOUNT and USERID parameters for a user on another Information Exchange system. If you specify a SYSID parameter, you must specify the ACCOUNT and USERID parameters. Use 1 to 3 alphanumeric characters.

account

Account of a single-destination user to whom you are sending data. Expedite Base/400 uses this field together with the USERID parameter to identify the user. If you specify an ACCOUNT

parameter, you must also specify a USERID parameter. Use 1 to 8 alphanumeric characters.

userid

User ID of an Information Exchange user from whom you are receiving data.

Expedite Base/400 uses this field together with the ACCOUNT parameter to identify the user.

If you specify a USERID parameter, you must also specify an ACCOUNT parameter. Use 1 to 8 alphanumeric characters.

listname

Name of a previously defined list of account IDs and user IDs. Use 1 to 8 alphanumeric characters.

requeued

Specifies whether Expedite Base/400 receives only files that have been retrieved from archive.

fileid

Name of the file where the received data should go. This parameter is required. Use 1 to 33 alphanumeric characters. Format is:

library/filename(member) format

Specifies whether you want to receive the data as a file or as a free-format message. See

“Free-format messages” on page 67 for more information.

n Receive all files in your mailbox. This is the default.

y Receive files retrieved from archive only. If you specify y, you cannot specify an Information Exchange source.

NOTE: Expedite Base/400 ignores this option when processing EDI or record delimiters.

y Expedite Base/400 formats the data as a free-format message. This implies fixed 79-byte records.

n Expedite Base/400 does not format the data as a free-format message. This is the default.

RECEIVE command

You can use a question mark as a wildcard character to substitute for any character or characters. For example, to select all messages with a user classification that begins with AB1, you would type: AB1?

To select all those with a user classification that ends with 999, you would type: ?999 If you specify FORMAT(y), the default value is ffmsg001, which is reserved for free-format messages. If you specify FORMAT(n), the default is blank, which indicates all classes.

archiveid

Archive reference identifier you want assigned to the files delivered in response to RECEIVE command requests. Use 1 to 8 alphanumeric characters.

autoedi

Specifies whether EDI processing (as defined in Chapter 4, “Sending and receiving EDI data,’’) should be done automatically for files if the CDH indicates that the files are EDI formatted.

ediopt

Specifies whether EDI data should be split at the end of EDI segments. This option is ignored unless the CDH indicates that the received message is EDI data and AUTOEDI is set to y.

delimited

Determines the record structure of the received data. If you specify y for DLMOVERRIDE, Expedite Base/400 uses the information in the DELIMITED parameter even if the CDH indicates the record is structured differently. If you specify n for DLMOVERRIDE, Expedite Base/400 ignores the DELIMITED parameter if the CDH indicates the record structure of the data.

y Automatically perform EDI processing if the CDH indicates that the file is EDI formatted. This is the default.

n Do not perform EDI processing for any of the files.

NOTE: This parameter does not do anything for files sent without a CDH. For more information on the CDH, see Appendix B, “Common data header (CDH).’’

y Split records at the end of EDI segments if the CDH indicates that the message is EDI formatted. This is the default.

n Do not split records at the end of EDI segments.

c Split records at CRLF characters. If the CDH includes the CRLFEOF parameter, Expedite Base/400 uses the CRLF characters from that parameter. Otherwise, Expedite Base/400 uses X‘0D0A’ for the CRLF.

l Split records according to the 2-byte length delimiters at the beginning of each record.

n Store the data as it is received. The record length depends on the record length of the data set allocated to receive the data. This is the default.

RECEIVE command

dlmoverride

Specifies whether the DELIMITED parameter should override the structure specified by the CDH.

endstr

Specifies the string used at the end of each message received. This permits you to separate messages within a file.

The s: and the r: are not counted as part of the delimiter string and are not placed in the received file. If you do not specify this parameter, or if you leave it blank, Expedite Base/400 does not write a delimiter string at the end of each message. Use 1 to 79 alphanumeric characters.

resrecl

Indicates how Expedite Base/400 should resolve a disparity between the length of the record built while receiving data and the logical record length of the data set allocated to receive data.

allfiles

Specifies whether Expedite Base/400 should receive all files that match the RECEIVE specifi-cations or just the first file in the Information Exchange mailbox that matches the RECEIVE specifications.

y Format the data according to the DELIMITED parameter, even if the CDH indicates a record delimiter type.

n If the CDH indicates a record delimiter type, format the data according to the CDH. This is the default.

s: Begin the delimiter string with s: to place the delimiter immediately after the received data, regardless of record boundaries.

r: . Begin the delimiter string with r: to place the delimiter at the beginning of the record, following the received data. This is the default

NOTE: If the data is processed as EDI data (using the AUTOEDI option), records are always split if they are too long for the data set. If the data does not contain delimiters, record length is determined by the logical record length of the response data set, and this does not apply.

e If the record received is too long for the data set, terminate the session with an error.

This option is valid only for session-level recovery, because you might find it difficult to correct the error and still restart correctly using checkpoint-level recovery.

s If the record received is too long for the data set, split the record and write a warning message to the response file. This is the default.

y Receive all files that match the RECEIVE specifications. This is the default.

RECEIVE command

nonedionly

Specifies that only non-EDI data should be received.

msgkey

Unique message key you can use to receive a specific file from the mailbox. Its value is taken from the AVAILABLE record in response to a QUERY command. Use 20 hexadecimal characters.

startdate

Starting date of a time range for the files you want to receive from Information Exchange.

For a file to qualify to be received, the date the file was sent to Information Exchange must fall within this date range. The format is YYMMDD or YYYYMMDD. The default value is determined by Information Exchange, and is currently 000102 (January 2, 1900).

If you limit the range to one day and an error occurs while sending the file, files could be left undetected in the mailbox. For example, assume that an error occurs while sending a file on June 11, 2004, and the file is not actually placed in the mailbox until 11:00 a.m. on June 12.

If you issue a RECEIVE command at 8:00 a.m. on June 12, 2004 with a range of 00:00:00 to 24:00:00 on June 11 specified, the file will not be received because it has not yet arrived in the mailbox. If you then issue another RECEIVE command at 8:00 a.m. on June 13, 2004 with a range of 00:00:00 to 24:00:00 on June 12 specified, the file will still not be received because its starting date of June 11 is outside of the specified range.

To avoid missing any files, you should either move the starting date earlier, or periodically check your mailbox.

starttime

Starting time of a time range for the files you want to receive from Information Exchange.

For a file to qualify to be received, the time the file was sent to Information Exchange must fall within this time range. The format is HHMMSS. The default value is determined by Information Exchange, and is currently 000000 (0 hours).

enddate

Ending date of a time range for the files you want to receive from Information Exchange.

For a file to qualify to be received, the date the file was sent to Information Exchange must fall within this date range. The format is YYMMDD or YYYYMMDD. The default value is determined by Information Exchange, and is currently 420916 (September 16, 2042).

endtime

Ending time of a time range for files you want to receive from Information Exchange. For a file to qualify to be received, the time the file was sent to Information Exchange must fall within this time range. Use the HHMMSS format for the ending time. The default value is determined by Information Exchange, and is currently 235347 (23:53:47).

timezone

Time reference in the STARTTIME and ENDTIME parameters.

y Receive only those messages from your mailbox that are identified in the CDH as not having one of the EDI formats.

n Receive all messages from your mailbox that satisfy your RECEIVE request. This is the default.

l Your local time, as specified by the TIMEZONE parameter of the IDENTIFY

RECEIVE command

g Greenwich mean time (GMT).

In document Expedite Base/400 Programming Guide (Page 126-132)