At least one of the host variables has subordinates. In CA-IDMS, embedded SQL can only work with host variables that are at the “bottom” of the element structure and have no subordinates.
For example, with this structure:-
01 P1 PIC X(80).
05 P2-A PIC X(40).
05 P2-B PIC X(40).
01 P3 PIC X(8).
The following statement will result in the DB005202 error when creating the ACCESS MODULE.
SET :P1 = REPLACE(:P2,’&CONTEXTID’,RTRIM(:P3))