I just want to parse the EDI file using python. I am not sure which is the best way to parse this kind of EDI files. OR should I convert this EDI to other formats and then do parsing? I am not sure. Please help me out. Thanks in advance.
The sample EDI X12 file is as follows.
ISA*00* *00* *01*00060902413PRD *ZZ*RT*200401*0044*U*00401*990002521*0*P*|~
GS*SH*0060902413B2B*004919486*20200401*0044*990002521*X*004010~ ST*856*990002521~
BSN*00*SHPMORSC4983493955*20200331*1647**TS~
HL*1**S~
REF*8X*ASN~
DTM*002*20200331*1647*18~
N1*ST*XYZ Ltd*91*WH3PL1LOC1~
N3*XYZ Ltd Logistics,4601 Stilwell Street~
N4*Kansas City**64120*US*SP*MO~
N1*SF*A Computers*91*CM1LOC1~
N3*A Computers Rd, 110~
N4*Ran**91730*US*SP*CA~
HL*2*1*O~
REF*79*60Y~
REF*DO*MORC493493955~
REF*CR*MRS4983493955~
HL*3*2*T~
MEA*PD*G*1.00*LB~
MEA*PD*HT*1.00*IN~
MEA*PD*LN*1.00*IN~
MEA*PD*WD*1.00*IN~
MAN*GM*134015~
HL*4*3*P~
MAN*GM*136096~
HL*5*4*I~
LIN*1*VP*1003200-01-R***CH*US~
SN1**10*EA**10*EA~
REF*P4*MAIN~
REF*JB*MAIN~
HL*6*2*T~
MEA*PD*G*1.00*LB~
MEA*PD*HT*1.00*IN~
MEA*PD*LN*1.00*IN~
MEA*PD*WD*1.00*IN~
MAN*GM*134015~
HL*7*6*P~
MAN*GM*132973~
HL*8*7*I~
LIN*2*VP*72004985-03-R***CH*US~
SN1**10*EA**10*EA~
REF*SE*AJ162918473~
REF*SE*AJ163222283~
REF*SE*AJ173032198~
REF*SE*AJ162915706~
REF*SE*AJ174446687~
REF*SE*AJ163229302~
REF*SE*AJ163228027~
REF*SE*AJ174450336~
REF*SE*AJ162404159~
REF*SE*AJ162913903~
REF*P4*239326~
REF*JB*MAIN~
PKG*F****LHR25 :ZI1, 226, PM: tii@, Recipient Contact: tilt7.~
PKG*F****02_0>25600~CTT*8~
SE*24069*990002521~
GE*1*990002521~
IEA*1*990002521~