Page 1 of 1

copy matching and its next record

PostPosted: Fri Jan 16, 2009 9:32 pm
by ranga_subham
Hi,

My input data (LRECL=80 and RECFM=FB) looks like this...

----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
0000016138800000NA132009          000002303070000100000230307000013ZX62   000100
0000016138800000NB11+C1U +LE5 +MN5 +NE1 +UE0 +U2J +VQ2 +VX7 +1FL +75U +83B     
0000016138800000NA162009          000001896240000100000189624000018SL28   000100
0000016138800000NB11+C1U +C60 +LAX +MX0 +NE1 +PCM +VQ2 +VX7 +1SB +14C +20U     
0000016138800000NA162009          000001896240000100000189624000018SL28   000100
0000016138800000NB11+C1U +C60 +LAX +MX0 +NE1 +PCM +VQ2 +VX7 +1SB +14C +70U     
0000016138800000NA132009          000002303070000100000230307000019ZG61   000100
0000016138800000NB11+C1U +LE5 +MN5 +NE1 +UE0 +U2J +VQ2 +VX7 +1FL +75U +83B     
0000016138800000NA162009          000001896240000100000189624000018SL28   000100
0000016138800000NB11+C1U +C60 +LAX +MX0 +NE1 +PCM +VQ2 +VX7 +1SB +14C +71U     


I want the outupt data as given below: Copy all the records that have "8SL28" starting at 67th column and its next 1 record.

0000016138800000NA162009          000001896240000100000189624000018SL28   000100
0000016138800000NB11+C1U +C60 +LAX +MX0 +NE1 +PCM +VQ2 +VX7 +1SB +14C +20U     
0000016138800000NA162009          000001896240000100000189624000018SL28   000100
0000016138800000NB11+C1U +C60 +LAX +MX0 +NE1 +PCM +VQ2 +VX7 +1SB +14C +70U     
0000016138800000NA162009          000001896240000100000189624000018SL28   000100
0000016138800000NB11+C1U +C60 +LAX +MX0 +NE1 +PCM +VQ2 +VX7 +1SB +14C +71U     


Please let me know how to get it. We are using SYNCSORT FOR Z/OS 1.2.3.1R.

Please help.

Thanks.

Re: copy matching and its next record

PostPosted: Fri Jan 16, 2009 10:08 pm
by Alissa Margulies
This can be easily accomplished in SyncSort for z/OS 1.3.2 with the WHEN=GROUP feature. Please contact the system programmers at your site who support SyncSort and request that they upgrade to the current release. This is a free upgrade.

Re: copy matching and its next record

PostPosted: Fri Jan 16, 2009 10:11 pm
by ranga_subham
Alissa, thanks for the suggestion. Our recommendations are not considered :( Any workaround?

Re: copy matching and its next record

PostPosted: Sat Jan 17, 2009 2:28 am
by dick scherrer
Hello,

Suggest you tell your manager that "they" (system support) can upgrade the product or you (and probably others) will spend additional time writing code for what could be a utility function.

Keep in mind that if the only function this process needs to do is copy the required records, a utility approach is fine. If there are also lots of business requirements that need to be met, using code is a better choice anyway.