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
 

 

Need to check file accounts with the database accounts

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Need to check file accounts with the database accounts
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    Post subject: Reply to: Db2
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: 1013
Location: India

PostPosted: Fri Dec 12, 2008 6:27 pm    Post subject:
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: 2275
Location: @my desk

PostPosted: Fri Dec 12, 2008 7:16 pm    Post subject:
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

Site Director


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

PostPosted: Fri Dec 12, 2008 10:26 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 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 Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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