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

Sorting multiple positions


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

New User


Joined: 17 Apr 2009
Posts: 70
Location: India

PostPosted: Fri Jul 10, 2009 9:41 pm
Reply with quote

Hi Frank/Kolusu,

Can you please help

File 1 (VB file of 4504 length key positions are 18 to 10, 31 to 10 and 44 to 10)

Code:
XXXXXXXXXXXXXXXXX1234567890XXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1234567890XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1234567890X
XXXXXXXXXXXXXXXXX1234567891XXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1234567891XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1234567891X
XXXXXXXXXXXXXXXXX1234567892XXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1234567892XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1234567899X


Fiel2 (FB file 80 length key position is 1 to 10)

Code:
1234567890
1234567891
1234567899


I need to check for the key of File2 in File1 and get the out put if match is found. if 1234567890 is present in position 18 or 31 or 44 position i need to write file1 record to out put file.

my output shuold be

Code:
XXXXXXXXXXXXXXXXX1234567890XXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1234567890XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1234567890X
XXXXXXXXXXXXXXXXX1234567891XXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1234567891XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1234567891X
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1234567899X



can you pelase help
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: Fri Jul 10, 2009 10:06 pm
Reply with quote

What is the maximum number of records you can have in file2?

Quote:
VB file of 4504 length key positions are 18 to 10, 31 to 10 and 44 to 10


For these positions, are you counting the RDW in positions 1-4 or are the positions actually 22, 35 and 48?
Back to top
View user's profile Send private message
Hima1985

New User


Joined: 17 Apr 2009
Posts: 70
Location: India

PostPosted: Fri Jul 10, 2009 10:17 pm
Reply with quote

Frank,

Quote:
What is the maximum number of records you can have in file2?


There is no such max number, it may be 1lakh

Quote:
For these positions, are you counting the RDW in positions 1-4 or are the positions actually 22, 35 and 48?


Yes, i have not added RDW, if we add RDW the actual position is 22,35,48
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: Fri Jul 10, 2009 10:29 pm
Reply with quote

We can't think of a practical way to do this with DFSORT.
Back to top
View user's profile Send private message
Hima1985

New User


Joined: 17 Apr 2009
Posts: 70
Location: India

PostPosted: Fri Jul 10, 2009 10:31 pm
Reply with quote

Frank,

Thanks a lot, i will check for the program then.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Sat Jul 11, 2009 12:31 am
Reply with quote

Quote:

Quote:
What is the maximum number of records you can have in file2?


There is no such max number, it may be 1lakh

What is the maximum number of records you can have in file1?
Is there any way of recognizing which of the three positions in a record from file 1 that the key to match to file 2 will be found?

One more question, a quick goggle tells me that lakh may mean 100 or 100,000. Which meaning are you using here?
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: Sat Jul 11, 2009 12:53 am
Reply with quote

I assumed lakh means 100000, as that's what other people on this board have said it means in the past. If it's actually 100, that's doable.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Jul 13, 2009 10:22 pm
Reply with quote

Hima1985,

Can you clarify that VB file of 4504 length key positions are 18 to 10, 31 to 10 and 44 to 10 are just a single key occurring in those multiple positions? and it is not multiple keys?

i.e
Code:

XXXXXXXXXXXXXXXXX1234567890XXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1234567890XXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1234567890X


In the above example, the same key 1234567890 occurs in 3 different positions but on a different record. can you have multiple keys on the same record like this ?

Code:

XXXXXXXXXXXXXXXXXAAAAAAAAAAXXBBBBBBBBBBXXXXCCCCCCCCCCX


These are 3 different keys(aaa,bbb,ccc) embedded in the same record. This one will be tough to achieve. If your input is the way you showed then there is a way to get the desired results.

Douglas Wilder,

1 Lakh = 100,000
Back to top
View user's profile Send private message
Hima1985

New User


Joined: 17 Apr 2009
Posts: 70
Location: India

PostPosted: Fri Jul 17, 2009 3:41 pm
Reply with quote

Skolusu,

Multiple keys on the same record might be there.

Actually i achieved this by sorting the file at 18th postion first get file1 then on 31 and get file2, then on 44 and get file3. then merge these 3 at last.
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Grouping by multiple headers DFSORT/ICETOOL 7
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
Search our Forums:

Back to Top