Input message literal fields
Input message fields can be defined to contain literal data that you specify during definition of the MID. You can define a default literal that MFS always inserts as part of the input message. You can also define a literal that MFS inserts as part of the input message when no data for the field is received from the device.
Using a default literal can simplify application programming. When
used, application programs no longer need to test for no data
conditions
or to provide exception handling. Default literals make it possible
for an application program to distinguish between zero-value data
you enter and a condition of no data entered
.
MFLD (DFLD1,'NO DATA'),LTH=7,JUST=R,FILL=C'0'
- Your Entry
- Program Data Viewed
- 296
- 0000296
- 0
- 0000000
- no data entered
- NO DATA
Without a default literal, the results of entering a value of 0 and of entering no data are the same—0000000.
Defaults can be altered without changing application programs, and multiple defaults can be provided by using different message descriptors or different input logical pages.
Default literals can also expand device independence by providing a device-independent method of inserting data in an input message field if no data is entered from the device for that field. This function of the default literal is used often for 3270 or SLU 2 devices, which have the same device format for input as for output. For these devices, the default (transaction code, data, or both) can be provided if you specify a default literal on input (MID).