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

IMS DC online using Db2 as database


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chandru1980

New User


Joined: 01 Feb 2006
Posts: 4
Location: Bangalore, chennai

PostPosted: Sun Jan 13, 2013 2:46 pm
Reply with quote

Requirment: we have 2 tables need to select the data from both tables using same key which is entered by user and display the retrieved columns on top from one table with five rows and from second table at the bottom five rows. if dont entered and selected the indicator Y fetch all the records and display. PF7 and PF8 for scroll.
one table has the key 8 bytes and other one splitted as 5 and 3.
showing the exampple for splitted one and second table records.
Table 1 Table 2
00012 001 00012001
00012 002 <---- no record leave as blank in the screen
00012 003 00012003
To select one record using one select statement for each table.
To select more records one select with cursor statement for each table.
to select all records one select with cursor statement for each table.

My question is fetching records with seperate select cursor for each table.
Is it possible to match the fetched records while scrolling them.
I need a piece of code for matching the records while scrolling if no match I have to keep it blank like as mentioned above example table data.

Any suggestion pls.

Thanks,
Hari
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sun Jan 13, 2013 4:54 pm
Reply with quote

Quote:
I need a piece of code for matching the records while scrolling if no match I have to keep it blank like as mentioned above example table data.


Unfortunately the chances of getting it are pretty slim
but ... where do You face problems the logic or the code ???
Back to top
View user's profile Send private message
chandru1980

New User


Joined: 01 Feb 2006
Posts: 4
Location: Bangalore, chennai

PostPosted: Sun Jan 13, 2013 7:23 pm
Reply with quote

I have a sample program but its scroll logic bit not understandable. Also it hard to explain the existing one. If you have any scroll logic I can use it. Please let me know If you have any idea.

Thanks,
Hari
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: Mon Jan 14, 2013 8:17 am
Reply with quote

Hello and welcome to the forum,

I suspect there is code already running on your system that could be cloned and modified for your requirement. If the code is used for production on your system, someone there understanda how it works . . .
Back to top
View user's profile Send private message
chandru1980

New User


Joined: 01 Feb 2006
Posts: 4
Location: Bangalore, chennai

PostPosted: Thu Jan 17, 2013 7:54 am
Reply with quote

Thanks for the replies.

I am using the existing logic and introducing only the matching logic for 2 tables before displaying the screen. hope it will work. thanks for your support.

Cheers,
Hari
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Thu Jan 17, 2013 8:08 pm
Reply with quote

Two things:

1) Your post says "top" and "bottom" like you are putting
table1 row1
table1 row2
table1 row3
table1 row4
table1 row5
table2 row1
table2 row2
table2 row3
table2 row4
table2 row5

on the screen, but your example shows a join between them.


2) What you show in your example sure looks a lot like a LEFT OUTER JOIN. You may be able to code that and have it put the blanks in there for you.
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 -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts What database does Jobtrac use CA Products 4
No new posts Underscore was not populated to onlin... CICS 1
No new posts Trying to change copybook in online c... CICS 4
No new posts Batch call online program, EXCI task ... CICS 3
No new posts Capturing COBOL job and program names... All Other Mainframe Topics 2
Search our Forums:

Back to Top