View previous topic :: View next topic |
Author |
Message |
Avishek Beginner
Joined: 02 Dec 2002 Posts: 3 Topics: 1 Location: Calcutta,India
|
Posted: Mon Dec 02, 2002 5:43 am Post subject: Cursor Positioning |
|
|
Hello Everyone,
Can somebody help me out with the code or explanation of Cursor Positioning? I know that we need to do so using EIBCPOSN. However, the book I am following does not go very deep into the topic.
Thanks in advance.
Regards _________________ Avishek Saha
India |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Mon Dec 02, 2002 5:51 am Post subject: |
|
|
Avishek,
Positioning the cursor
Hope this helps...
cheers
kolusu |
|
Back to top |
|
|
Avishek Beginner
Joined: 02 Dec 2002 Posts: 3 Topics: 1 Location: Calcutta,India
|
Posted: Mon Dec 02, 2002 6:21 am Post subject: |
|
|
Hello Kolusu,
Thank You for the reply but I guess I was not able to frame the question properly. What i want is to pick the current Cursor Position from the screen and not to place the Cursor in a particular field.
Thanks. _________________ Avishek Saha
India |
|
Back to top |
|
|
sujayath Beginner
Joined: 02 Dec 2002 Posts: 1 Topics: 0 Location: India
|
Posted: Mon Dec 02, 2002 7:08 am Post subject: |
|
|
Hi,
You could use EIBCPOSN to find out the latest cursor position. It returns a single number relative to position zero on the screen (row 1, column 1), in the same way that you specify the CURSOR parameter on a SEND MAP command.
Or you could use DFHCURSR Like
WHEN <FIELD1>F = DFHCURSR
PERFORM PARA-1
WHEN <FIELD2>F = DFHCURSR
PERFORM PARA-2
You can also use
WHEN <FIELD1>F = X'02'
PERFORM PARA-1
WHEN <FIELD2>F = X'02'
PERFORM PARA-2 |
|
Back to top |
|
|
Manas Biswal Intermediate
Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Mon Dec 02, 2002 8:34 am Post subject: |
|
|
Hi Avishek,
EIBCPOSN contains the cursor position in the following form:-
EIBCPOSN = (Row-1)*80 + (Column - 1)
Now, let us suppose that the cursor is present at 11th row and 10th column.
So, EIBCPOSN will contain the value 10*80+9 = 809.
Conversly, suppose you have to find out the row number from EIBCPOSN(which is usually the case), dividing it by 80 and rounding it off to the next greater integer should do the trick.
809/80 = 10.1 rounded off to 11
So, 11 is the row number on which the cursor was located prior to the RECEIVE.
Hope it makes things somewhat clearer.
Regards,
Manas |
|
Back to top |
|
|
Avishek Beginner
Joined: 02 Dec 2002 Posts: 3 Topics: 1 Location: Calcutta,India
|
Posted: Tue Dec 03, 2002 5:27 am Post subject: |
|
|
Hello,
Thank You Sujayath and Manas. Your views will surely help.
Regards _________________ Avishek Saha
India |
|
Back to top |
|
|
|
|