Pathway/iTS SCREEN COBOL Reference Manual (G06.24+, H06.03+, Pathway/iTS 1.0+)
Procedure Division
Compaq NonStop™ Pathway/iTS SCREEN COBOL Reference Manual—426750-001
6-14
ACCEPT DATE/DAY/TIME Statement
The CLEAR INPUT statement resets the MDT bits and displays null values in all
unprotected fields of the screens currently displayed. RESET ATTR or TURN
MDTOFF can be used instead if blanking out the input fields is not desired.
You must consider another MDT convention: the TCP turns a field’s MDT bit on in the
following operations:
•
When a TURN TEMP statement selects an input field for changing display
attributes, the MDT bit is always set.
•
When a RESET TEMP statement selects an input field for resetting display
attributes, the MDT bit is set, regardless of the initial MDT attribute of the field.
These two exceptions apply only to the TURN and RESET statements that have the
TEMP modifier.
This MDT convention allows fields to be handled correctly when they contain errors.
When an error is detected in a field, a TURN TEMP statement of a display attribute is
normally performed on that field, whether explicitly by the program or implicitly by the
action of the ACCEPT statement. As indicated by the preceding rules, the MDT is set
also, thus guaranteeing that the data from the field will again be sent from the terminal
on the next read operation. After that next read operation, a RESET TEMP operation is
performed, which removes the flagging display attribute while again turning the MDT
bit on. The latter setting of the MDT is necessary because a subsequent read of the same
data might be performed if another field is found to be in error, and the data in the field
that was RESET must be sent once again to be properly accepted.
ACCEPT DATE/DAY/TIME Statement
The ACCEPT DATE/DAY/TIME statement causes the TCP to obtain the current
operating system settings for date, day, and time and return them to your program data
area.
accept-name
is the identifier of the data item where DATE, DAY, or TIME is stored. DATE,
DAY, and TIME are typically defined as:
PIC 9(8) for DATE YYYYMMDD
PIC 9(6) for DATE
PIC 9(7) for DAY YYYYDDD
PIC 9(5) for DAY
PIC 9(8) for TIME
DATE YYYYMMDD
is the current date expressed as an 8-digit number yyyymmdd where yyyy is the
year, mm is the month, and dd is the day. For example, November 25, 2002, would
be returned as 20021125.
ACCEPT accept-name FROM { DATE [YYYYMMDD] | DAY [YYYYDDD] |
TIME }