Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

DFSORT/ICETOOL :: RE: Unwrap the data based on delimiter X'25'

$
0
0
Author: bhavana yalavarthi
Posted: Fri Dec 09, 2016 1:47 pm (GMT 5.5)

Yes,they are of different records.Iam dealing with both FB and VB files.So can you plz help me with the code that will work for both FB & VB files.


Code:
ISA*00*          *00*          *01*078769021      *16*054481205CPIC  *16
9*U*00301*000000061*0*P*~ GS*PS*078769021*054481205*161111*0229*61*X*003
30*610001 BFR*00**161110*DL*A*170201*170301*161110 N1*MI*Toyota Tsusho A
Inc.*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 FST
2*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
70301**002*0229*DO*20212149 SDP*Y*Y FST*66138.69*D*D*170401**002*0229*DO
9 LIN**VP*781865AA0AC*PO*20212149 UIT*LB PID*F*9B***CR SP123B .047 X 49.



The expected output is,
Code:
ISA*00**00**01*078769021*16*054481205CPIC*161111*0229*U*00301*000000061*
GS*PS*078769021*054481205*161111*0229*61*X*003010                       
ST*830*610001                                                           
N1*MI*ToyotaTsushoAmerica,Inc.*92*311                                   
ISA*00**00**01*017093972*16*054481205CPIC*161110*0320*U*00300*000000095*
GS*PS*0000000282*054481205*161110*0320*95*X*003010                     
ST*830*950001                                                           
N1*MI*MILLSTEELCOMPANY*92*0000000282                                   
ISA*00**00**01*112064324*16*054481205CPIC*161108*1452*X*00300*000000157*
GS*PS*000000195*054481205*161108*1452*157*X*003010                     
ST*830*000000272                                                       
N1*MI*MI-TECHSTEEL-DECATUR,AL.*92*33                                   
ISA*00**00**01*884601162*16*054481205CPIC*161108*1453*X*00300*000000105*
GS*PS*884601162*054481205*161108*1453*105**003010                       
ST*830*000000272                                                       
N1*MI*STEELTECHNOLOGIES-GHENT,KY*92*262                                 



These ISA,GS and N1 segments will not start at the same position in every transaction.We have to make ISA segment to come in 1 row,GS segment to come in 1 row and N1 to come in 1 row based on delimiter X'25'.
_________________
Y.Bhavana


Viewing all articles
Browse latest Browse all 9405

Trending Articles