by rahulj » Fri May 23, 2008 11:25 am
Hi Frank
Here I have mentioned your last question's answer
Q >Is the situation that ST appears in the first record of the group in positions 1-2,
Ans:-Yes , starting with ST ( Column: 1 to 2 )
Q > 037159 appears in the second record of the group in positions 7-12
Ans :No ,037159 , that is present at Column 13 to 18
Q>SE appears in the last record of the group in positions 1-2? If not, what exactly is the situation?
Ans:- Yes,SE(Column: 1 to 2 )
RECFM=FB and LRECL=80
My Requirement is ..
1 . I have Data It contain multiple lines which is starting with ST ( Column: 1 to 2 )
and End With SE(Column: 1 to 2 )
2. In between ST & SE , BHT line present (Column: 1 to 3)with Sixdigit Number#037159 (Column 13 to 18)
3. I have many numbers like 037159, 037169, 037205 etc,,
4. Base on that numbers i need to check data in my PS file.
5 Above number present in BHT line.
6. If that number found I need to CUT from ST/SE batch and paste in other PS file manually.
7 So is there any JCL SORT card present for minimizing this manual work into JCL programming
Note : We cant guess how many line present in between ST/SE .That may varies in each ST/SE
Please see below INPUT File.
INPUT FILE :-
**********************************************START*****************************************
ST*857*003478874Ã…
BHT*0002*33*037159JAN220870*20080124Ã…
HL*1**S*1Ã…
G05*1*SHÃ…
DTM*011*20080124Ã…
DTM*373*20080122Ã…
N1*SF**FI*820477390Ã…
N4*PHOENIX*AZ*85043Ã…
N1*ST**10*188111Ã…
HL*2*1*O*1Ã…
TDS*3190Ã…
N9*IV*037159JAN220870Ã…
DTM*373*20080122Ã…
TXI*ZZ*1.28Ã…
N1*BT**10*188111Ã…
HL*3*2*I*0Ã…
IT1*1*1*EA*9.16**PL*1*SW*L279823Ã…
IT3*1*EAÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014621587Ã…
N9*VN*037159JAN220870Ã…
HL*4*2*I*0Ã…
IT1*2*1*EA*5.97**PL*3*SW*L279782Ã…
IT3*1*EAÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014621587Ã…
N9*VN*037159JAN220870Ã…
HL*5*2*I*0Ã…
IT1*3*1*EA*5.97**PL*4*SW*L279582Ã…
IT3*1*EAÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014621587Ã…
N9*VN*037159JAN220870Ã…
HL*6*2*I*0Ã…
IT1*4*1*EA*7.38**PL*5*SW*F2VZ01169Ã…
IT3*1*EAÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014621587Ã…
N9*VN*037159JAN220870Ã…
HL*7*2*I*0Ã…
IT1*5*1*ST*2.14**PL*7*SW*F203513Ã…
IT3*1*STÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014621587Ã…
N9*VN*037159JAN220870Ã…
SE*51*003478874Ã…
ST*857*003478884Ã…
BHT*0002*33*037169JAN220889*20080124Ã…
HL*1**S*1Ã…
G05*1*SHÃ…
DTM*011*20080124Ã…
DTM*373*20080122Ã…
N1*SF**FI*820477390Ã…
N4*SALT LAKE CITY*UT*84101Ã…
N1*ST**10*180312Ã…
HL*2*1*O*1Ã…
TDS*28567Ã…
N9*IV*037169JAN220889Ã…
DTM*373*20080122Ã…
N1*BT**10*180312Ã…
HL*3*2*I*0Ã…
IT1*1*2*EA*6.91**PL*2*SW*A5TZ211Ã…
IT3*2*EAÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014632784Ã…
N9*VN*037169JAN220889Ã…
HL*4*2*I*0Ã…
IT1*2*2*EA*7.78**PL*3*SW*A5TZ221Ã…
IT3*2*EAÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014632784Ã…
N9*VN*037169JAN220889Ã…
HL*5*2*I*0Ã…
IT1*3*2*EA*15**PL*4*SW*A5TZ232Ã…
IT3*2*EAÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014632784Ã…
N9*VN*037169JAN220889Ã…
HL*6*2*I*0Ã…
IT1*4*50*RM*3.29**PL*5*SW*P1054901Ã…
IT3*50*RMÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014632784Ã…
N9*VN*037169JAN220889Ã…
HL*7*2*I*0Ã…
IT1*5*5*PK*4.67**PL*6*SW*A83710-2CR6Ã…
IT3*5*PKÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014632784Ã…
N9*VN*037169JAN220889Ã…
HL*8*2*I*0Ã…
IT1*6*2*DZ*1.37**PL*8*SW*H410002236807Ã…
IT3*2*DZÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014632784Ã…
N9*VN*037169JAN220889Ã…
HL*9*2*I*0Ã…
IT1*7*2*DZ*.57**PL*9*SW*H410002828201Ã…
IT3*2*DZÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014632784Ã…
N9*VN*037169JAN220889Ã…
HL*10*2*I*0Ã…
IT1*8*36*EA*.37**PL*12*SW*N120009357135Ã…
IT3*36*EAÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014632784Ã…
N9*VN*037169JAN220889Ã…
HL*11*2*I*0Ã…
IT1*9*2*DZ*3.32**PL*13*SW*H410002855995Ã…
IT3*2*DZÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014632784Ã…
N9*VN*037169JAN220889Ã…
HL*12*2*I*0Ã…
IT1*10*1*DZ*14.6**PL*14*SW*P330011245660Ã…
IT3*1*DZÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014632784Ã…
N9*VN*037169JAN220889Ã…
SE*85*003478884Ã…
ST*857*003478916Ã…
BHT*0002*33*037205JAN220887*20080124Ã…
HL*1**S*1Ã…
G05*1*SHÃ…
DTM*011*20080124Ã…
DTM*373*20080122Ã…
N1*SF**FI*820477390Ã…
N4*KENT*WA*98032Ã…
N1*ST**10*18051VÃ…
HL*2*1*O*1Ã…
TDS*18845Ã…
N9*IV*037205JAN220887Ã…
DTM*373*20080122Ã…
N1*BT**10*18051VÃ…
HL*3*2*I*0Ã…
IT1*1*1*EA*14.98**PL*1*SW*F466454Ã…
IT3*1*EAÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014649768Ã…
N9*VN*037205JAN220887Ã…
HL*4*2*I*0Ã…
IT1*2*6*PK*1.5**PL*2*SW*F467695Ã…
IT3*6*PKÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014649768Ã…
N9*VN*037205JAN220887Ã…
HL*5*2*I*0Ã…
IT1*3*2*BX*12.4**PL*3*SW*F541521/5-VIOÃ…
IT3*2*BXÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014649768Ã…
N9*VN*037205JAN220887Ã…
HL*6*2*I*0Ã…
IT1*4*1*BX*12.4**PL*4*SW*F541521/5-BLUÃ…
IT3*1*BXÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014649768Ã…
N9*VN*037205JAN220887Ã…
HL*7*2*I*0Ã…
IT1*5*1*BX*12.4**PL*5*SW*F541521/5-YELÃ…
IT3*1*BXÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014649768Ã…
N9*VN*037205JAN220887Ã…
HL*8*2*I*0Ã…
IT1*6*1*BX*10.71**PL*6*SW*F541521/5-BURÃ…
IT3*1*BXÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014649768Ã…
N9*VN*037205JAN220887Ã…
HL*9*2*I*0Ã…
IT1*7*1*BX*12.4**PL*7*SW*F541521/5-GRAÃ…
IT3*1*BXÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014649768Ã…
N9*VN*037205JAN220887Ã…
HL*10*2*I*0Ã…
IT1*8*1*CT*18**PL*8*SW*A78J8Ã…
IT3*1*CTÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014649768Ã…
N9*VN*037205JAN220887Ã…
HL*11*2*I*0Ã…
IT1*9*1*CT*44.48**PL*9*SW*A74338SCDXÃ…
IT3*1*CTÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014649768Ã…
N9*VN*037205JAN220887Ã…
HL*12*2*I*0Ã…
IT1*10*4*EA*7.32**PL*11*SW*K735250Ã…
IT3*4*EAÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014649768Ã…
N9*VN*037205JAN220887Ã…
SE*85*003478916Ã…
**********************************************END*****************************************
OUTPUT FILE :-
ST*857*003478874Ã…
BHT*0002*33*037159JAN220870*20080124Ã…
HL*1**S*1Ã…
G05*1*SHÃ…
DTM*011*20080124Ã…
DTM*373*20080122Ã…
N1*SF**FI*820477390Ã…
N4*PHOENIX*AZ*85043Ã…
N1*ST**10*188111Ã…
HL*2*1*O*1Ã…
TDS*3190Ã…
N9*IV*037159JAN220870Ã…
DTM*373*20080122Ã…
TXI*ZZ*1.28Ã…
N1*BT**10*188111Ã…
HL*3*2*I*0Ã…
IT1*1*1*EA*9.16**PL*1*SW*L279823Ã…
IT3*1*EAÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014621587Ã…
N9*VN*037159JAN220870Ã…
HL*4*2*I*0Ã…
IT1*2*1*EA*5.97**PL*3*SW*L279782Ã…
IT3*1*EAÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014621587Ã…
N9*VN*037159JAN220870Ã…
HL*5*2*I*0Ã…
IT1*3*1*EA*5.97**PL*4*SW*L279582Ã…
IT3*1*EAÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014621587Ã…
N9*VN*037159JAN220870Ã…
HL*6*2*I*0Ã…
IT1*4*1*EA*7.38**PL*5*SW*F2VZ01169Ã…
IT3*1*EAÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014621587Ã…
N9*VN*037159JAN220870Ã…
HL*7*2*I*0Ã…
IT1*5*1*ST*2.14**PL*7*SW*F203513Ã…
IT3*1*STÃ…
N9*CT*089480-00-B-0336Ã…
N9*C7*003Ã…
N9*PO*P00014621587Ã…
N9*VN*037159JAN220870Ã…
SE*51*003478874Ã…
Regards,
Rahul