DISABLE Statement COBOL

The DISABLE statement notifies the Message Control System (MCS) to inhibit data transfer between specified output queues and destinations for output, between specified sources and input queues for input or between the program and one specified source or destination for input-output.

DISABLE Statement

cd-name-1 is defined below for each phrase. identifier-1 must refer to a data item of category alphanumeric. literal-1 must be a nonnumeric literal.

The DISABLE statement provides a logical disconnection between the MCS and the specified sources or destinations.When this logical disconnection is already in existence, or is to be handled by some other means external to this program, the DISABLE statement is not required in this program.No action is taken when a DISABLE statement is executed which specifies a source or destination that is already disconnected, except that the value in the status key data item indicates this condition .The logical path for the transfer of data between the object programs and the MCS is not affected by the DISABLE statement.

The MCS ensures that the execution of a DISABLE statement causes the logical disconnection at the earliest time the source or destination is inactive.The execution of the DISABLE statement never causes the remaining portion of the message to be terminated during transmission to or from a terminal.

A DISABLE statement that lacks an INPUT, OUTPUT, I-O or TERMINAL keyword is treated according to the format of the description of the cd-name:

  • A DISABLE statement that refers to an INPUT cd-name and does not specify the INPUT keyword is treated as if the INPUT clause without the keyword TERMINAL were specified.
  • A DISABLE statement that refers to an OUTPUT cd-name and does not specify the OUTPUT keyword is treated as if the OUTPUT clause were specified.
  • A DISABLE statement that refers to an I-O cd-name and does not specify the I-O keyword is treated as if the I-O TERMINAL clause were specified.

INPUT Phrase

INPUT Phrase

cd-name-1 must reference an input CD when the INPUT phrase is specified.

When the INPUT phrase with the optional word TERMINAL is specified, the logical paths between the source and all of its associated queues and subqueues are deactivated. Only the contents of the data item referenced by data-name-7 (SYMBOLIC SOURCE) of the area referenced by cd-name-1 are meaningful.

When the INPUT phrase without the optional word TERMINAL is specified, the logical paths for all of the enabled sources associated with the queues and subqueues specified by the contents of data-name-1 (SYMBOLIC QUEUE) through data-name-4 (SYMBOLIC SUB-QUEUE-3) of the area referenced by cd-name-1 are deactivated.

I-O TERMINAL Phrase

I-OTERMINAL

cd-name-1 must reference an input-output CD when the I-O TERMINAL phrase is specified.

When the I-O TERMINAL phrase is specified, the logical path between the source and the program is deactivated.The source is defined by the contents of the data item referenced by data-name-3 (SYMBOLIC TERMINAL) of the area referenced by cd-name-1.

OUTPUT Phrase

OUTPUT

cd-name-1 must reference an output CD when the OUTPUT phrase is specified.

When the OUTPUT phrase is specified, the logical paths for all destinations, specified by the contents of the data item referenced by data-name-5 (SYMBOLIC DESTINATION) of the area referenced by cd-name-1, are deactivated.

TERMINAL Phrase

TERMINAL

cd-name-1 must reference either an input or an input-output CD.If cd-name-1 refers to an input CD, the DISABLE statement is treated as if it specified the INPUT TERMINAL phrase; if cd-name-1 refers to an I-O CD, the DISABLE statement is treated as if it specified the I-O TERMINAL phrase.

WITH KEY Phrase

WITH KEY Phrase

In the WITH KEY phrase, literal-1 or the contents of the data item referenced by identifier-1 are compared with a password built into the system.The DISABLE statement is honored only if literal-1 or the contents of the data item referenced by identifier-1 match the system password.When literal or the contents of the data item referenced by identifier-1 do not match the system password, the value of the STATUS KEY item in the area referenced by cd-name-1 is updated.

If the WITH KEY phrase is omitted, the DISABLE statement is honored only if a password is not required by the system.

DISABLE Statement Example


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

COBOL Topics