SET is used to assign data to a 3270 screen, in
preparation for a later SEND statement.
For example
SET (CICS2S.Account = Custf2.account
CURSOR BRIGHT BLINK RED);
…
SEND CICS2S DATA(CICS2S.Region = custf2.region
DARK);
Here the SEND sends the screen combining the data from the SET and the SEND
statement.
SET
names one or several items. Each item
has the following form: -
ScreenItem [ = Value] [Attributes]
For example
SET (CICS2S.Account = Custf2.account
CURSOR BRIGHT BLINK RED, CICS2S.REGION DARK );
Rules: -
1.
Each item must refer to the same
record. Thus
SET (CICS2S.Account BRIGHT, CICS3S.REGION DARK );
is invalid because it mixes CICS2S and
CICS3S
2.
The record (CICS2S in this example) must
be a 3270 screen layout.
3.
If the value expression is omitted then
the value relationships built into the screen definition are used. Thus without = Custf2.account the
value of CICS2S.Account will be set to Custf.account.
4.
If present, the value expression must name
a single field that can validly be assigned to the screen field. You cannot use a value expression with a generic
expression
5.
Following the value expression, if
present, you can set
screen attributes such as colours, highlighting, cursor position, etc. If applied to a
generic reference then the attribute applies to all of the implied field
references. Possible Screen Attributes are listed below. If attributes conflict, as in
SET (CICS2S.Account BRIGHT DARK BLUE RED);
then the conflicting attributes (DARK, RED) will be
rejected with an error message.
Causes the cursor to be placed in this field. If several items use the CURSOR option
then the first (from the top of the screen) will receive the cursor, other CURSOR options
will be ignored.
PROT
or UNPROT or SKIP
You can set PROT (means “Protected”) on an input field in circumstances when you want to prevent the user from entering data, and you can set a field to UNPROT to allow data entry. SKIP causes the cursor to skip to the next field
Note that you cannot set this attribute for a constant or output-only field: these are fixed as protected and not transmitted to/from your program.
Controls field display intensity.
BRIGHT displays the field with high intensity: you might use this to highlight errors, or emphasis particularly important fields.
DARK: the field is not shown. Use this for password fields, and to pass information to a screen and back that you don’t want the user to see (this can be a useful way of passing data from one part of a pseudo-conversation to another).
If none of these options are used then the attributes defined with the screen will be used.
Stands for “Modified Data Tag”. When a user types something into an input field then CICS sets an indicator, called a “Modified Data Tag”, showing that the data in this field has been modified. The system then knows that the data in this field is to be sent back from the 3270 terminal to the program. If the MDT is not set then there has been no change: CICS knows that there is no need to send the value back as the program already has its value.
Sometimes however you want to send data to a screen, and have it returned. This might be because the screen is initiating another program, or another part of the pseudo-conversation, and in spite of the apparent inefficiency of passing data to the terminal and reading it back again this can be a convenient way of managing your system logic. In such cases you should use the MDT option, so that CICS “thinks” that the data that you wrote into the field has been entered by a user and so will send it back to the program. MDT is often used together with DARK.
You can give one of these attributes to provide highlighting.
BLINK, REVERSE, UNDERSCORE
You can give one of these attributes
BLUE, RED, PINK, GREEN, TURQUOISE, YELLOW, NEUTRAL (or WHITE)