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
 

 

Sorting multiple positions

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Sorting multiple positions
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 Moderator


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

PostPosted: Fri Jul 10, 2009 10:06 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Fri Jul 10, 2009 10:29 pm    Post subject:
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    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Sat Jul 11, 2009 12:53 am    Post subject:
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    Post subject:
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    Post subject:
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    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 To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm
No new posts Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts Efficient sorting chandracdac DFSORT/ICETOOL 5 Sat Oct 22, 2016 3:23 am
No new posts Stripping and Sorting of VB file G SRINIVASA RAO SYNCSORT 5 Wed Sep 14, 2016 1:34 pm


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