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

dispaly db2 table on map ?


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
meyyappan

New User


Joined: 09 Sep 2008
Posts: 4
Location: chennai

PostPosted: Thu Sep 11, 2008 8:43 am
Reply with quote

Hi friends , i'm meyyappan .I'm a begineer in cics and need your help.
i want to display the db2 table on my map.
i know how to display one record from db2 table on a map.for this how many symbolic parameters i need to have on map ?
i need to scroll down and up the table in map.
is this like having around 20 symbolic parameters and getting 20 records from db2 table and then while scrolling display next 20 ?
will this idea work or else is there any simple way to do this task .
help is appreciated.
thanks in advance friends.
Back to top
View user's profile Send private message
Krishna Velamur

New User


Joined: 22 Aug 2008
Posts: 22
Location: Hyderabad

PostPosted: Thu Sep 11, 2008 11:05 am
Reply with quote

Hi Meyappan,
You need to define repeated lines in the map (an array of line fields).

In the below example the detail line repeats 5 times. So you need to define the detail line as an array which occurs 5 times in the map.

Filed-1 Field-2 Field-3
------- -------- --------
------- -------- --------
------- -------- --------
------- -------- --------
------- -------- --------

You need to use cursors to fetch data from tables and populate in the screen variables. Please check below the three cases.

->Initially when you have given some input on the screen, you fetch the first 5 rows. Here W-KEY value will hold the value based on your input.

Declare cursor C1 for
Select Row-1, Row-2, Row-3
from TABLE1
where INPVALUE = W-KEY

-> When we navigate to the next page. Here W-KEY will be the key value of the last row of the current page.

Declare cursor C1 for
Select Row-1, Row-2, Row-3
from TABLE1
where INPVALUE > W-KEY

-> When we navigate to the previous page. Here W-KEY will be the key value of the first row of the current page.

Declare cursor C1 for
Select Row-1, Row-2, Row-3
from TABLE1
where INPVALUE < W-KEY

Note that the query needs to be modified based on your requirement. Hope this helps.
Back to top
View user's profile Send private message
meyyappan

New User


Joined: 09 Sep 2008
Posts: 4
Location: chennai

PostPosted: Thu Sep 11, 2008 10:21 pm
Reply with quote

thanks a lot Krishna Velamur.but w-key here you are using is a key word or user defines name ?i'm hearing about w-key fro 1st time .
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: Thu Sep 11, 2008 11:23 pm
Reply with quote

Hello,

W-KEY is user-defined. It is not a reserved/key word.
Back to top
View user's profile Send private message
meyyappan

New User


Joined: 09 Sep 2008
Posts: 4
Location: chennai

PostPosted: Mon Sep 15, 2008 6:56 am
Reply with quote

thanks to all guys who replied to my query.
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 -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top