You can include records in a Mumps data source using a technique in which fields from all the segments are active before the INCLUDE command is processed for some non-last segment called X. The adapter receives the sequence of INCLUDE commands for all the segments, starting with X and proceeding to the last segment. However, all of the INCLUDE commands except the last one are ignored. As the result, only the terminal node is written to the Global Variable even if non-terminal nodes with the corresponding keys do not exist.
Note that this approach differs from the "SQL style" in which a MODIFY request is structured by segments. Only fields from the processed segment are active in each segment related to the MODIFY case. As a result, all non-existing key fields for processed segments are inserted.
The technique is designed to support DataMigrator MODIFY requests against a Mumps data source.
The following MODIFY request was generated by DataMigrator for transferring data from the file CARFLAT to the file MYCAR.
MODIFY FILE mycar FIXFORM FROM CARFLAT ALIAS PROPAGATE GOTO MATCHIT1 CASE MATCHIT1 COMPUTE DUMMY/A1=''; SUB1/A7=SUBSTR(7, COUNTRY, 1, 7, 7, 'A7'); SUB2/A7=SUBSTR(7, CAR, 1, 7, 7, 'A7'); SUB3/A7=SUBSTR(7, BODYTYPE, 1, 7, 7, 'A7'); SUB4/A7=EDIT(SEATS); MATCH DUMMY ON NOMATCH INCLUDE ON MATCH CONTINUE MATCH SUB1 ON NOMATCH INCLUDE ON MATCH CONTINUE MATCH SUB2 ON NOMATCH INCLUDE ON MATCH CONTINUE MATCH SUB3 ON NOMATCH INCLUDE ON MATCH CONTINUE MATCH SUB4 ON MATCH REJECT ON NOMATCH INCLUDE GOTO TOP ENDCASE
CASE AT START START &STARTAT STOP &STOPAT STOP DBMSERRORS &DBMSERROR LOG DBMSERR MSG OFF LOG DUPL MSG OFF LOG INVALID MSG OFF LOG NOMATCH MSG OFF LOG FORMAT MSG OFF LOG ACCEPT MSG OFF LOG TRANS MSG OFF CHECK 1000 ENDCASE DATA ON CARFLAT END
iWay Software |