IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Reading next record for the matched prev record in a file.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Hritam

New User


Joined: 27 Jun 2005
Posts: 36
Location: India

PostPosted: Mon Apr 20, 2009 1:09 pm
Reply with quote

Hi,
We have a scenario here to get al records from a file having the previous line matched to a condition. here is an example.
Record Length = 250
Match condition position is 4 of length 8
I/P File Format
=============
TBH324567890
TAB6578123648924852305890
TAA6578123648924852305890
TAB6578123648924852305890
TAA6578123648924852305890
TBH235476253
TAB7612341378460357345684
TAA7612341378460357345684
TAB7249857350565865606956
TBH123456734
TAB7612341378460357345684
TAA7612341378460357345684
TAB7249857350565865606956
=============

Expected o/p file for TBH=324567890 and 123456734
==============
TAB6578123648924852305890
TAB6578123648924852305890
TAB7612341378460357345684
TAB7249857350565865606956

Please let me know if you have the solution for this requirement.

Also it would be helfull if you point out any topics which says to read next record based on the previous record in a file.

Thanks,
Ritam Dutta
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Apr 20, 2009 9:22 pm
Reply with quote

Ritam,

Your requirement is not clear.

Quote:
Expected o/p file for TBH=324567890 and 123456734


This group of records seems to match your first condition:

TBH324567890
TAB6578123648924852305890
TAA6578123648924852305890
TAB6578123648924852305890
TAA6578123648924852305890

But what is the rule for getting these two records in the output file from this group of four records:

TAB6578123648924852305890
TAB6578123648924852305890

Likewise for the other group of records.

Do you only want records from the group that have 'TAB' in positions 1-3 or what?

Please explain the "rules" for getting from input to output more clearly.

Also, what is the maximum number of conditions you will want to match and where will these conditions be specified (hardcoded? in another file? some other way?).
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top