Examples of optional null character deletion for DPM-An
The following are examples of optional null character deletion for DPM-An.
In the three examples that follow, the comma is the specified FTAB, X'5F' is input hexadecimal data, and characters are defined as follows:
- X'6B'=C","
- X'C1'=C"A"
- X'C2'=C"B"
- X'C3'=C"C"
- C"b"=blank
- X'40'=C"b"
Example 1: input binary data and nulls
Device Input Format Message Input Definition
INFMT FMT INMSG MSG TYPE=INPUT,SOR=INFMT
DEV TYPE=DPM-A1, FTAB=(;;MIX) SEG
DIV TYPE=INPUT, NULL=DELETE
PPAGE
A DFLD LTH=3 MFLD A, LTH=3
B DFLD LTH=2 MFLD B, LTH=2
FMTEND MSGEND
Input Message | Record | Field | DFLD Data | MFLD Data |
---|---|---|---|---|
(1) X'C1C2C3005F' | 1 | A | C"ABC" | C"ABC" |
B | X'005F' | X'005F' | ||
(2) X'C1C26B005F' | 1 | A | C"AB" | C"ABb" |
B | X'005F' | X'005F' | ||
(3) X'C1C200005F' | 1 | A | C"AB" | C"ABb" |
B | X'005F' | X'005F' | ||
(4) X'C1C2C35F00' | 1 | A | C"ABC" | C"ABC" |
B | X'5F' | X'5F40' | ||
(5) X'C1C26B5F00' | 1 | A | C"AB" | C"ABb" |
B | X'5F' | X'5F40' | ||
Note: The
X'00' (null) at the end of the record in input messages (4) and (5)
is deleted before the data fields (A and B) are scanned. Therefore,
the results are the same for field B, even though an FTAB (comma in
this example) follows field A. If X'00' is to be considered as data
for field B, an FTAB (comma in this example) should be entered following
the X'5F00'.
|
Example 2: record mode input
Device Input Format Message Input Definition
INFMT FMT INMSG MSG TYPE=INPUT,SOR=INFMT
DEV TYPE=DPM-A1, FTAB=(;;MIX), SEG
MODE=RECORD
DIV TYPE=INPUT, RCDCTL=12, MFLD A,LTH=3,FILL=C'*'
NULL=DELETE
PPAGE MFLD B,LTH=3,FILL=C'*'
A DFLD LTH=3 MFLD C,LTH=3,FILL=C'*'
B DFLD LTH=3 MFLD D,LTH=3,FILL=C'*'
C DFLD LTH=3 SEG
D DFLD LTH=3 MFLD E,LTH=5,FILL=C'*'
E DFLD LTH=5 MFLD F,LTH=7,FILL=C'*'
F DFLD LTH=7 SEG
G DFLD LTH=5 MFLD G,LTH=5,FILL=C'*'
FMTEND MSGEND
Input Message | Record | Field | DFLD |
Segment | MFLD |
---|---|---|---|---|---|
(1) X'C10000C20000C3C3C3000000' | 1 | A | C'A' | 1 | C'A**' |
B | C'B' | C'B**' | |||
C | C'CCC' | C'CCC' | |||
D | no data | C'***' | |||
X'C5C56BC6C66B000000000000' |
2 | E | C'EE' | 2 | C'EE***' |
F | C'FF' | C'FF*****' | |||
X'0000000000' |
3 | G | no data | 3 | C'*****' |
(2) X'C10000C20000C3C3C3' | 1 | A | C'A' | 1 | C'A**' |
B | C'B' | C'B**' | |||
C | C'CCC' | C'CCC' | |||
D | no data | C'***' | |||
X'C5C56BC6C6' |
2 | E | C'EE' | 2 | C'EE***' |
F | C'FF' | C'FF*****' | |||
no input record | 3 | G | no data | 3 | C'*****' |
Note: In
this example, no input data was entered for fields D and G. Input
message 1 contains nulls in place of omitted fields. Input message
2 does not contain nulls for omitted fields, but the results are the
same for both input messages.
|
Example 3: stream mode input
Device Input Format Message Input Definition
INFMT FMT INMSG MSG TYPE=INPUT,SOR=INFMT
DEV TYPE=DPM-A1, FTAB=(;;MIX), SEG
MODE=STREAM
DIV TYPE=INPUT, NULL=DELETE MFLD A,LTH=3,FILL=C'*'
PPAGE MFLD B,LTH=3,FILL=C'*'
A DFLD LTH=3 MFLD C,LTH=3,FILL=C'*'
B DFLD LTH=3 MFLD D,LTH=3,FILL=C'*'
C DFLD LTH=3 SEG
D DFLD LTH=3 MFLD E,LTH=5,FILL=C'*'
E DFLD LTH=5 MFLD F,LTH=7,FILL=C'*'
F DFLD LTH=7 SEG
G DFLD LTH=5 MFLD G,LTH=5,FILL=C'*'
FMTEND MSGEND
Input Message | Record | Field | DFLD Data | Segment | MFLD Data |
---|---|---|---|---|---|
(1) X'C10000C20000C3C3C3000000' |
1 | A | C'A' | 1 | C'A**' |
B | C'B' | C'B**' | |||
C | C'CCC' | C'CCC' | |||
D | no data | C'***' | |||
X'C5C56BC6C66B000000000000' |
2 | E | C'EE' | 2 | C'EE***' |
F | C'FF' | C'FF*****' | |||
X'00000000000000' |
3 | G | no data | 3 | C'*****' |
(2) X'C10000C20000C3C3C3' |
1 | A | C'A' | 1 | C'A**' |
B | C'B' | C'B**' | |||
C | C'CCC' | C'CCC' | |||
2 | D | C'EE' | C'EE*' | ||
X'C5C56BC6C6' |
E | C'FF' | 2 | C'FF***' | |
F | no data | C'*******' | |||
no input record | 3 | G | no data | 3 | C'*****' |
Note: In
this example, no input data was entered for fields D and G. Input
message 1 contains nulls in place of omitted fields. Input message
2 does not contain nulls for omitted fields and produces undesirable
results for fields D, E, and F.
|