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: 2181
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm


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