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

Need to check file accounts with the database accounts


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
levaku
Warnings : 1

New User


Joined: 03 Jul 2008
Posts: 5
Location: chennai

PostPosted: Fri Dec 12, 2008 1:07 pm
Reply with quote

Hi,
i have a file of record layout contains:
group number
account number

scenario:i needs to check file accounts with the database accounts.

Expalnation:
For the same group number in the file, first i needs to get the first
account number from file. using the account number i will fetch the table
to get the group number, using the same i will get the
bunch of account numbers from table for the particular group number.

so now i needs to compare both the file account numbers and table account numbers, if there is any mismatching i needs to write it to a output file.

if there is one mismatch for the particular group number from both
file and table or additional accounts present in the table also those bunch
of records from file and table i needs to write.

suggest me a logic that writes the records to file for mismatches in file
and table account numbers.

Warning: Do not Double Post. Duplicate deleted.
Back to top
View user's profile Send private message
levaku
Warnings : 1

New User


Joined: 03 Jul 2008
Posts: 5
Location: chennai

PostPosted: Fri Dec 12, 2008 1:15 pm
Reply with quote

hi,
i forgot to mention the input file is been soretd by group number and also while comparing in the program i am validating so many conditions. so i can't use search all.

suggest me on the same.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Fri Dec 12, 2008 6:27 pm
Reply with quote

Hi Kavitha,

You have a INPUT FILE which contains GROUP & ACCOUNT numbers.
You need to find only the mis-match.

You will get the ACCOUNT number from the file and search it in the table.
And compare the GROUP number from the table with the GROUP number in the file.
If they match you will do some process.
If they don't match you will do some other process.

If this is the case.

READ the file. get the account number & group number
Do a fetch for that account number,

compare the file-group-number & table-group-number
if they match
do the process
else
do the process
write it to a output-file

perform read again till end-of-file.
END-READ.

Sushanth
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Fri Dec 12, 2008 7:16 pm
Reply with quote

levaku,

I guess you need the mismatched 'groups' along with the corresponding 'accounts' from both the table as well as the file. But I am still not clear what exactly you want in output.

What do you expect in output for the below cases.
1. For a particular group-all accounts in the table are matching with that in the input file.
2. For a particular group-table has some additional accounts.
3. For a particular group-file has some additional accounts.
4. Entire group is missing-either in file or table.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Dec 12, 2008 10:26 pm
Reply with quote

Hello,

For people here to be better able to help you need to post some sample input from all of the input sources and the output you want when the process is run on that sample input. Your sample input needs to show all combinations that the process needs to handle and the output needs to show how it was handled.

The single biggest factor in getting help here is how well you present the requirement.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top