Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Reading next record for the matched prev record in a file.
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 Moderator


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

PostPosted: Mon Apr 20, 2009 9:22 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us