View previous topic :: View next topic
|
Author |
Message |
surya
New User
Joined: 19 Feb 2005 Posts: 13
|
|
|
|
hi all,
how to do page-up and page-down in cics screens. if anybody know the answer please let me know. |
|
Back to top |
|
|
arasu1982
New User
Joined: 05 Mar 2005 Posts: 7 Location: Bangalore
|
|
|
|
[quote="surya"]hi all,
how to do page-up and page-down in cics screens. if anybody know the answer please let me know.[/quote]
Hi all,
U mean browsing the data,ie.,Scrolling the data.
For scrolling data u may use TSQ's.
Fetch needed records from database/file and store it in TSQ.
using item number read the records in the TSQ one by one.
By,
R.Arasu |
|
Back to top |
|
|
ashis
New User
Joined: 24 Mar 2005 Posts: 11 Location: mumbai
|
|
|
|
hi,
with the help of tsq we can pass data to screen as per the ITEMNUM.
we can set the counter to watch the no. of itteration from there we can manupulate the page no., as per page no. we can calculate ITEMNUMBER to be passed to the map.
[b]ws-itemnumber = (page-no - 1) * 10 +1
here only 10 pages at a time u can see.
before that u also have to check the status of the flag- setup if it is last -page then it will popup the message " u r on last page" .
for PF7 reverse it. |
|
Back to top |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
I guess the following will give you a clear idea abt paging.There are many ways of paging.The example below shows you abt paging in CICS thru COBOL.
| I Scr | II Scr | III Scr |
-------------------------------------
A B C |C D E |F G H |
-------------------------------------
........ |........ |..........|.................................
........ |........ |..........|.................................
........ |........ |..........|.................................
........ |........ |..........|.................................
........ |........ |..........|.................................
........ |.........|..........|.................................
Let us consider 4 screens.You can assign any of the funtional keys to browse thru the number of screens using DFH parameter in CICS.
The following code in COBOL can be used for paging.
IF AID-VE = DFHPF11
ADD +1 TO SWAP-KEY
IF AID-VE = DFHPF10
SUBTRACT +1 FROM SWAP-KEY.
IF SWAP-KEY > +4
MOVE +1 TO SWAP-KEY
IF SWAP-KEY < +1
MOVE +4 TO SWAP-KEY
following the above:
If swap-Key = 1 then you need to move the fields to the corresponding positions in the screens.
eg:In the I scr the fields are A, B, C..Move A to the corresponding position in the screen.
Populate the field values accordingly.
By doing the above way,it is easier to do paging and to change the number of screens with slight changes in the code in cobol,whenever needed.
Pleasure to answer further queries,if any. |
|
Back to top |
|
|
remargorp loboc
New User
Joined: 02 Apr 2005 Posts: 3
|
|
|
|
you can also use CSPG and the options [b]PAGING ACCUM [/b]in SEND MAP, and a final SEND PAGE. This will start CSPG Trans.
In CSPG, you use fkeys to page. you can customize keys for your site.
Pros/Cons.
Pros - Is easy and fast.
Cons - your program lose control between paging.
You can find more information in CICS programming guide.
There are litle tricks in using it.
Remargorp Loboc |
|
Back to top |
|
|
badal
New User
Joined: 05 Sep 2004 Posts: 21
|
|
|
|
Hi,
I am not able to understand the logic behind this one.
can u getme a clear cut code so that we can understand.
thanks in advance.
badal. |
|
Back to top |
|
|
badal
New User
Joined: 05 Sep 2004 Posts: 21
|
|
|
|
Hi,
try to get me some sort of pseudo code so that we can understand properly.
hope i will get this code from u.
thanks.
badal. |
|
Back to top |
|
|
|