Trailing blank compression
Blanks at the end of segments are compressed if all of the following are true.
- OFTAB= is specified on the DIV or DPAGE statement, or if FILL=NULL or FILL=PT.
- GRAPHIC=YES is specified for the segment.
- OPT=1 or OPT=2 is specified in the MSG statement.
Specifying COMPR
You can specify trailing blank compression (COMPR=) as FIXED, SHORT, or ALL.
FIXEDIf COMPR=FIXED is specified, MFS removes trailing blanks from fixed-length data fields. The resulting mapping in the DFLD is as if the application program inserted a short data field (by inserting X'3F' in the position after significant data or by inserting a short segment) or omitted the field (by inserting X'3F' in the first position of the field or by inserting a short segment) if the entire field contains blanks.
Fields shortened by an application program are not compressed in the same way as when COMPR=FIXED is specified. This option is provided for application programs that always supply maximum-length fields (such as the NAME field) for simplicity of the application program, and these blanks are not significant to the receiver. The receiver can assume that fields shortened or omitted by the compress option or by the application program have the same meaning.
SHORTIf COMPR=SHORT is specified, MFS removes trailing blanks from the data fields shortened by the application program. The resulting mapping in the DFLD is as if the application program inserted a short field with no trailing blanks or omitted the field. Fixed-length fields do not undergo this compression.
This option is provided for application programs written for the 3270 and without application program changes.
ALLIf COMPR=ALL is specified, the trailing blanks in the fixed-length and short fields are removed.
Trailing blanks in a short field or a single blank short field causes a specific operation on the 3270 (that is, to clear the entire field on the screen for a single blank and insert a program tab character (FILL=PT), or to clear the remaining portion of the updated field and insert one or more null characters (FILL=NULL)).
Saving line transmission time
Line transmission time can be saved by using one of the following methods:
- Specifying COMPR=ALL, which removes the trailing blanks in fixed-length and short fields
- Defining record mode, and defining the fields as occurring at the end of the record
Blank compression on variable-length output
The following code example shows the data entered by the IMS application:
DLZZ FIELD A1 | FIELD A2 |FIELD A3 |FIELD A4 |FIELDC1|FIELD C2
0200 AAAAA44444|1234563...|43.......|A4A4A4
0800 00000| F |0FDLZZ FIELD B1 | FIELD B2 |FIELD D1 |FIELD D2 |FIELD D3|FIELD E1
0300 BBBBBBBBBB|4444444444|DDDDDD43.|3........|D3D3D3D3
0400 |0000000000| 0F |F |The following table shows the MFS definitions used in the previous code example.
| MSGOUT | MSG | TYPE=OUTPUT, SOR=FMTOUT |
|---|---|---|
| SEG | ||
| MFLD | A1,LTH=10 | |
| MFLD | A2,LTH=10 | |
| MFLD | A3,LTH=10 | |
| MFLD | A4,LTH=10 | |
| MFLD | C1,LTH=10 | |
| MFLD | C2,LTH=10 | |
| SEG | ||
| MFLD | B1,LTH=10 | |
| MFLD | B2,LTH=10 | |
| MFLD | D1,LTH=10 | |
| MFLD | D2,LTH=10 | |
| MFLD | D3,LTH=10 | |
| MFLD | E1,LTH=10 | |
| MSGEND | ||
| FMTOUT | FMT | |
Examples of variable-length output with blank compression are shown in the code examples below.
The following code example shows variable-length output with blank compression in record mode:
VLVB FIELD A1 THRU A4: (First record)
01 AAAAA,123456,,A4A4A4
06
VLVB FIELD B1: (Second record)
00 BBBBBBBBBB
0C
VLVB NO DATA: (Third record)
00
03
VLVB FIELDS D1 and D3: (Fourth record)
01 DDDDDD,,D3D3D3D3
02- Field A2 was short.
- Field A3 had no data.
- Field A4 was short. Trailing separators in a record are not transmitted.
- Field B2 had no data.
- Fields C1 and C2 had no data. A 1-byte record is transmitted because more data follows.
- Field D1 was short.
- Field D2 had no data.
- Field E1 had no data. A record is not transmitted because no more data follows.
The following table shows the MFS definitions used for record mode output as shown in the previous code example.
| Field | Type | Definition | |
|---|---|---|---|
| DEV | TYPE=DPM-B1, FEAT=5, MODE=RECORD | ||
| DIV | TYPE=OUTPUT, | X | |
| OFTAB=(c',',MIX), COMPR=ALL | |||
| A1 | DFLD | LTH=10 | |
| A2 | DFLD | LTH=10 | |
| A3 | DFLD | LTH=10 | |
| A4 | DFLD | LTH=10 | |
| RCD | |||
| B1 | DFLD | LTH=10 | |
| B2 | DFLD | LTH=10 | |
| RCD | |||
| C1 | DFLD | LTH=10 | |
| C2 | DFLD | LTH=10 | |
| RCD | |||
| D1 | DFLD | LTH=10 | |
| D2 | DFLD | LTH=10 | |
| D3 | DFLD | LTH=10 | |
| RCD | |||
| E1 | DFLD | LTH=10 | |
The following code example shows variable-length output with blank compression in stream mode:
VLVB FIELDS A1 THROUGH D3: (Single record)
03 AAAAA,123456,,A4A4A4,BBBBBBBBBB,,,DDDDDD,,D3D3D3D3 The following table shows the MFS definitions used for stream mode output as shown in the previous code example.
| Field | Type | Definition | |
|---|---|---|---|
| DEV | TYPE=DPM-B1, FEAT=6, MODE=STREAM | ||
| DIV | TYPE=OUTPUT, | X | |
| OFTAB=(c',',MIX), COMPR=ALL | |||
| A1 | DFLD | LTH=10 | |
| A2 | DFLD | LTH=10 | |
| A3 | DFLD | LTH=10 | |
| A4 | DFLD | LTH=10 | |
| B1 | DFLD | LTH=10 | |
| B2 | DFLD | LTH=10 | |
| C1 | DFLD | LTH=10 | |
| C2 | DFLD | LTH=10 | |
| D1 | DFLD | LTH=10 | |
| D2 | DFLD | LTH=10 | |
| D3 | DFLD | LTH=10 | |
| E1 | DFLD | LTH=10 | |
| FMTEND | |||