R371 – Using CREATE with a PARSE within a LOOP will cause multiple parsers to be created and can consume a lot of resources (WMB)

Using CREATE with a PARSE within a LOOP will cause multiple parsers to be created and can consume a lot of resources (WMB)

When message is parsed, each section requires the creation of a new parser. There are more details available here.

For example, the below will create a new parser for each child that it creates.

For example WHILE LASTMOVE(envRef) DO
CREATE LASTCHILD OF Environment DOMAIN(‘DFDL’) PARSE(envRef OPTIONS parseOptions TYPE ‘{}:CSV_DFDL’);
CREATE LASTCHILD OF outRef NAME ‘Record’;
SET outRef = Environment.DFDL;
MOVE envRef NEXTSIBLING NAME ‘MsgData’;
END WHILE;