View previous topic :: View next topic
|
Author |
Message |
meyyappan
New User
Joined: 09 Sep 2008 Posts: 4 Location: chennai
|
|
|
|
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 |
|
|
Krishna Velamur
New User
Joined: 22 Aug 2008 Posts: 22 Location: Hyderabad
|
|
|
|
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 |
|
|
meyyappan
New User
Joined: 09 Sep 2008 Posts: 4 Location: chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
W-KEY is user-defined. It is not a reserved/key word. |
|
Back to top |
|
|
meyyappan
New User
Joined: 09 Sep 2008 Posts: 4 Location: chennai
|
|
|
|
thanks to all guys who replied to my query. |
|
Back to top |
|
|
|