You can leverage Pega SCE framework to parse incoming x12 Message. Pega uses Java code in activity rule to parse incoming x12 message into various loops and segments and then it uses parse structured rules to parse each segment into x12 data model.
If you are doing on base Pega itself, then you can follow the same approach. My suggestion will be to leverage the Pega SCE framework.
in base pega or in pega customer service framework , is there any OOTB way to send x12 data in param in any rule and get it parsed ? I was going through every rules in RS:PegaHCEDI and did not find it out . Can you please help here
In SCE you will have ruleset specific to x12. I think there will be file listeners to specifically parse institutional/professional/dental claims. They initially parse the incoming file and store each message into a table. For every file they make an entry into a table. After that they have a batch process which will pick up each message and then parse it using java code and parse structured rules and then create claims.
For each claim there is another set of activities which can be leveraged to generate x12 string from claim data.
I dont remember the Pega ruleset name exactly but it has x12 word in its name.