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

CURSOR is required or not for this requirement


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

New User


Joined: 23 May 2005
Posts: 27

PostPosted: Wed Jun 08, 2005 11:59 am
Reply with quote

hi guys plse go thru this requirement i am expecting cursor is needed for this one plse suggest me

Write a new batch program NSRMB08:

1. Read Consumer Credit input file. In case input has no records, stop processing.

2. Using input account number access Account Table (VS1ACT) to obtain household number for the account. Accept only those accounts that have only one unique associated household.

3. Select all rows in VS1ACL Table (ACL) using the above household number to obtain all unique telephone numbers. For each unique telephone number set home/business flag and populate the output record fields.

4. If the input account number does not match to a household, or if it matches to more than one unique household, then access ACL Table using Primary SSN to obtain household number. Accept only those primary SSN that have only one unique associated household. Then proceed as in 3 above.

5. If the input primary SSN does not match to a household, or if it matches to more than one unique household, then access ACL Table using secondary SSN to obtain household number. Accept only those secondary SSN that have only one unique associated household. Then proceed as in 3. above.


6. Write the output record. Include all necessary accumulations. Include error handling in accordance with the existing structure of NCIS (see any NCIS batch COBOL/DB2 program as an example).
Back to top
View user's profile Send private message
rameshbabu
Warnings : 1

New User


Joined: 23 May 2005
Posts: 27

PostPosted: Fri Jun 10, 2005 11:09 am
Reply with quote

[quote="rameshbabu"]hi guys plse go thru this requirement i am expecting cursor is needed for this one plse suggest me

Write a new batch program
1. Read Consumer Credit input file. In case input has no records, stop processing.

2. Using input account number access Account Table to obtain household number for the account. Accept only those accounts that have only one unique associated household.

3. Select all rows in Table (ACL) using the above household number to obtain all unique telephone numbers. For each unique telephone number set home/business flag and populate the output record fields.

4. If the input account number does not match to a household, or if it matches to more than one unique household, then access ACL Table using Primary SSN to obtain household number. Accept only those primary SSN that have only one unique associated household. Then proceed as in 3 above.

5. If the input primary SSN does not match to a household, or if it matches to more than one unique household, then access ACL Table using secondary SSN to obtain household number. Accept only those secondary SSN that have only one unique associated household. Then proceed as in 3. above.


6. Write the output record. Include all necessary accumulations. Include error handling in accordance with the existing structure of NCIS (see any NCIS batch COBOL/DB2 program as an example).[/quote]
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Thu Nov 03, 2005 2:51 pm
Reply with quote

hi frnd,
why do u confuse urself. simple concept if you r in need to retrive more than one row at-a-time then use cursor. if retriving only single row dont use the cursor. simple ha..
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 Urgent requirement for MF (Exp - 4 to... Mainframe Jobs 0
No new posts Is SQLCODE -811 possible while fetchi... DB2 1
No new posts Required Date Format in Include Sort ... DFSORT/ICETOOL 6
No new posts Restart logic by using cursor name in... DB2 1
No new posts Seeking Resolution for SQKCODE -991 o... DB2 2
Search our Forums:

Back to Top