To support the RPG cycle in Monarch migrated applications, the Visual RPG compiler has predefined the matching record indicator *INMR. This matching record indicator will be migrated as such, and does not need to be explicity declared.
The following image shows the Matching Record field as M1 is defined by Item#; OOItem# and DOrder# and BOOrder#.

BegClass
MyCycleProgram
Access(*Public)
...
dclDiskFile
Order
Type(*input)
Designation(*primary)
...
dclDiskFile Detail
Type(*input)
Designation(*secondary)
...
dclDiskFile BackOrder
Type(*input)
Designation(*secondary)
...
dclPrintFile
OrderRpt
OverflowInd(*INOF)
...
DclFmtCycleAttr
ROrder *in77
M1(OOrder#) L2(OOrder#)
DclFmtCycleAttr
RDetail *in42
M1(DOrder#)
DclFmtCycleAttr
RBackOrder
*in43
M1(BOOrder#) L1(BOOrder#,BOItem#)
BegCyclePrintAttr
headingspec rptHeader
cond(*in1p
*or *inOF)
detailspec rptDetail
fetchOverflow(*yes)
cond(*inL1)
totalspec rptTotal
fetchOverflow(*yes)
cond(*inl2)
EndCyclePrintAttr
\avrlrfDatabaseMembers.htm
Begsr Main shared(*yes) access(*public)
dclsrparm
args
type(*string)
rank(1)
dclfld pgm
Type(MyCycleProgram)
new()
pgm.*StartCycle()
Close pgm.CustRpt
Console.ReadLine()
endsr
BegSr
*DetailCalc
if *inMR
...
endif
EndSr
BegSr
*TotalCalc
if *inL1
...
endif
EndSr
EndClass