Menu principal                 [Fechar]


CICS Manual do Usuário - RECEIVE (terminal)


Volta a página anterior

Volta ao Menu Principal


Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

RECEIVE (terminal)

Receives data from a terminal.

Sintaxe:

RECEIVE (terminal)
 
>>-RECEIVE--+-------------------------------------+------------->
            +-INTO(data-area)---------------------+
            '-SET(ptr-ref)-+-LENGTH(data-area)--+-'
                           '-FLENGTH(data-area)-'
 
>--+------------------------+--+------------+--+------+--------->
   +-MAXLENGTH(data-value)--+  '-NOTRUNCATE-'  '-ASIS-'
   '-MAXFLENGTH(data-value)-'
 
>--+--------+--------------------------------------------------><
   '-BUFFER-'
 
 

Condições: INVREQ, LENGERR, NOTALLOC, TERMERR

 

Descrição:

RECEIVE receives data from either a terminal or an advanced program-to-program communications (APPC) mapped conversation.
The form of RECEIVE command that is described here is used for receiving data from a terminal.
For details about the RECEIVE command for use on APPC mapped conversations, see RECEIVE (APPC). (An APPC conversation allows a program to send data to, and receive data from, a program that is running in a remote system.
Programming that uses APPC conversations is called Distributed Transaction Programming (DTP).
For guidance information on DTP, refer to the TXSeries for Multiplatforms Intercommunication Guide.)

Opções:

    ASIS
  • Specifies that lowercase characters in the input data stream are not translated to uppercase; this allows the current task to receive a message containing both uppercase and lowercase data.
  • This option has no effect on the first RECEIVE command of a transaction, because terminal control performs a read initial and uses the terminal defaults to translate data.
  • This option has no effect if the screen contains data before a transaction is initiated.
  • This data is read and translated in preparation for the next task and the first RECEIVE command in that task retrieves the translated data.
    BUFFER
  • Specifies that the contents of the terminal buffer are to be read, beginning at buffer location one and continuing until all contents have been read.
  • All character and attribute sequences (including nulls) appear in the input data stream in the same sequence in which they appear in the terminal buffer.
    FLENGTH(data-area)
  • A 32-bit alternative to LENGTH(data-area).
    INTO(data-area)
  • Specifies the receiving field for data that is read from the terminal.
  • The length of the INTO data area must be greater than, or equal to, the maximum that is specified in the LENGTH and MAXLENGTH options.
  • See INTO and SET for more information about using this option.
    LENGTH(data-area)
  • Specifies a 16-bit binary value that CICS uses to return the maximum amount of data that is received.
  • if the NOTRUNCATE option is specified, the LENGTH option contains the amount of data that is to be passed back to the application.
  • If the NOTRUNCATE option is not specified, the LENGTH option contains the amount of data that was received by CICS before any truncation occurred.

  • If MAXLENGTH is not specified, the LENGTH option is also used to specify that maximum amount of data that CICS can return to the application on the RECEIVE call.
  • If LENGTH is used to pass the maximum value, it must be set up before each call to RECEIVE because its value might have been changed by the previous RECEIVE command.
  • If the value of LENGTH passed is less that zero, CICS uses the maximum length of zero
    MAXFLENGTH(data-value)
  • A 32-bit alternative to MAXLENGTH(data-value).
    MAXLENGTH(data-value)
  • Specifies, as a 16-bit binary value, the maximum amount of data that CICS can return to the application on the RECEIVE command.
  • This value must be zero through 32767.

  • If the NOTRUNCATE option is specified and the data that is received is longer than the maximum that is specified in MAXLENGTH, CICS returns the data up to the maximum length and sets EIBCOMPL=EIBFALSE to indicate that more data is to follow.
  • The remaining data can be received by using one or more of the RECEIVE commands.

  • If the NOTRUNCATE option is not specified and the data that is received is longer than the maximum that is specified in MAXLENGTH, CICS returns the data up to the maximum length and returns the LENGERR condition.
  • The remaining data is discarded by CICS and cannot be received by the application.
  • If MAXLENGTH is not coded on the RECEIVE command, CICS uses the value that is passed in the LENGTH argument as the maximum length.
    NOTRUNCATE
  • Specifies that, when the data that is available exceeds the length that is requested, the remaining data is not to be discarded, but is to be retained for retrieval by subsequent RECEIVE commands.
    SET(ptr-ref)
  • Specifies a pointer reference that is to be set to the address of the data that is received from the terminal.
  • This pointer reference is valid until the next terminal control or APPC command, or the end of task.
  • See INTO and SET for more information about using this option.

Condições:

    INVREQ
  • Occurs for the following conditions, depending on the options that are specified on the RECEIVE command:
    • Any of the terminal-related RECEIVE options (ASIS or BUFFER) has been specified, but the principal facility for the task is not a terminal (that is, it is an APPC conversation).
    • An attempt is made to issue a RECEIVE command with terminal-related options from a remotely linked-to program.
    • A remotely linked-to program attempted to execute a RECEIVE command that refers to the principal facility.
  • Ação pré-definida: Terminates the task abnormally.
    LENGERR
  • Occurs for the following conditions:
    • Received data was truncated because the length exceeded the maximum that is allowed by the program and the NOTRUNCATE option was not specified.
    • Refer to the option descriptions for information about maximum lengths.
    • An out-of-range value is supplied in the LENGTH or MAXLENGTH option, or in one of the alternative 32-bit length options.
  • Ação pré-definida: Terminates the task abnormally.
    NOTALLOC
  • Occurs if this command is issued in a task that is not associated with a terminal.
  • Ação pré-definida: Terminates the task abnormally.