Author: bhavana yalavarthi
Subject: Unwrap the data based on delimiter X'25'
Posted: Fri Dec 09, 2016 10:25 am (GMT 5.5)
I have a input data like,
ISA*00* *00* *01*078769021 *16*054481205CPIC *16
9*U*00301*000000061*0*P*~GS*PS*078769021*054481205*161111*0229*61*X*00330*610001BFR*00**161110*DL*A*170201*170301*161110 N1*MI*Toyota Tsusho AInc.*92*311 LIN**VP*766325AA0AC*PO*20212149 UIT*LB PID*F*9B***CR SP122B
7.01 SDP*Y*Y FST*119049.642*C*D*170301**002*0229*DO*20212149 SDP*Y*Y FST2*D*D*170401**002*0229*DO*20212149 LIN**VP*781985AA0AC*PO*20212149 UIT*L
9B***GA SP781B .039 X 61.73 SDP*Y*Y FST*62986.07911*C*D*170301**002*0229
2149 SDP*Y*Y FST*74957.182*D*D*170401**002*0229*DO*20212149 LIN**VP*7811
PO*20212149 UIT*LB PID*F*9B***CR SP123B .028 X 57.01 SDP*Y*Y FST*39683.2
I want to unwrap the data such that ISA segment will come in one row,GS segment in one row and N1 segment in one row,based on the delimiter X'25',which comes at the end of each ISA,GS,N1 and I want only these 3 segments.The main thing here is ISA,GS,N1 segments will not come in the same position every time in a transaction.I tried using PARSE,when=group,records=2.But the ISA's which are extending upto 3 columns are getting missed out,as I have tried to group only 2 records.So can you please give me a solution for this through ICETOOL/DFSORT.
The other details are the input file can be fixed or variable block file.
Please provide me the solution.
_________________
Y.Bhavana
Subject: Unwrap the data based on delimiter X'25'
Posted: Fri Dec 09, 2016 10:25 am (GMT 5.5)
I have a input data like,
ISA*00* *00* *01*078769021 *16*054481205CPIC *16
9*U*00301*000000061*0*P*~GS*PS*078769021*054481205*161111*0229*61*X*00330*610001BFR*00**161110*DL*A*170201*170301*161110 N1*MI*Toyota Tsusho AInc.*92*311 LIN**VP*766325AA0AC*PO*20212149 UIT*LB PID*F*9B***CR SP122B
7.01 SDP*Y*Y FST*119049.642*C*D*170301**002*0229*DO*20212149 SDP*Y*Y FST2*D*D*170401**002*0229*DO*20212149 LIN**VP*781985AA0AC*PO*20212149 UIT*L
9B***GA SP781B .039 X 61.73 SDP*Y*Y FST*62986.07911*C*D*170301**002*0229
2149 SDP*Y*Y FST*74957.182*D*D*170401**002*0229*DO*20212149 LIN**VP*7811
PO*20212149 UIT*LB PID*F*9B***CR SP123B .028 X 57.01 SDP*Y*Y FST*39683.2
I want to unwrap the data such that ISA segment will come in one row,GS segment in one row and N1 segment in one row,based on the delimiter X'25',which comes at the end of each ISA,GS,N1 and I want only these 3 segments.The main thing here is ISA,GS,N1 segments will not come in the same position every time in a transaction.I tried using PARSE,when=group,records=2.But the ISA's which are extending upto 3 columns are getting missed out,as I have tried to group only 2 records.So can you please give me a solution for this through ICETOOL/DFSORT.
The other details are the input file can be fixed or variable block file.
Please provide me the solution.
_________________
Y.Bhavana