Operating System - OpenVMS
1748185 Members
3954 Online
108759 Solutions
New Discussion юеВ

need help with dispaying the lines on screen

 
shaily
Occasional Contributor

need help with dispaying the lines on screen

I have a form in FMS display 13 lines on screen. I have to give a function to user so that if they press "DEL" it will delete that particular line and move below lines of data up. I wrote the code as below but is it not working.. please help..

When user press "DELETE KEY" So

WHEN FDV$K_FK_E3 ANY
perform until ( current_line) > 12
move CP_INT_DATA(CURRENT_LINE + 1) to
CP_INT_DATA(CURRENT_LINE)
add 1 to current_line
end-perform

Current_line is the line user want to delete so i am taking current_line+1 data and moving it to current_line data this is keep doing until total 12 lines done then on last line i am moving zeroes.

When i run in Debug and see it has correct value but on the screen it does not work the way I am expecting. Do i need to put some thing to refresh the screen or reload the screen after these steps...
4 REPLIES 4
Hein van den Heuvel
Honored Contributor

Re: need help with dispaying the lines on screen



May we assume this is a 'scrolled array' on the form?

We see the Cobol code to manage the array, but that's just memory. The program will also need to push the change to the screen through calls to FDV$PUTSC and FDL$PFT, probably within the same perform.

In the FDV Ref Manual, check out the beginning of chapter 3, 'scrolling'. Be sure to peruse the FMS$EXAMPLES for suggestions, and read FDV$PFT attentively.

Good luck!
Hein


shaily
Occasional Contributor

Re: need help with dispaying the lines on screen

Thanks for reply.

I modified mycode and added below lines:
CALL "FDV$PUTSC"
USING
BY DESCRIPTOR "INT_BEGIN_DATE"
BY DESCRIPTOR CP_INT_DATA(CURRENT_LINE)
GIVING STATUS_RESULT


This started display data on the screen. It took next line of data and put on the line i deleted so that is correct. But i want below lines to adjust it self one line up. Right now if i delete one line below line comes on place of deleted line and now there are duplicate.
Please help..

I think i need to put FDV$PFT as you said by do not know where. I read into the manual and it says this will move the cursor to the next line...
Hein van den Heuvel
Honored Contributor

Re: need help with dispaying the lines on screen

It's been too long for me to remember exactly what to do, but you probably simply need to call FDV$PFT with the down terminator after each FDV$PUTSC.

You call FDV$PFT as if the end user is hitting the up, or down, arrow.

Be sure to carefully check the manual, the examples, and perhaps other parts of your own application.
Create yourself a minimalistic example with the a few fields and a few lines with simple recognizable initial contents like "one", "two", ... "ten" and a 5 line window.

If you can not get that to work, then maybe you can post the entire attempt here for someone to try to help (probably not me... too busy and some vacation coming up :-).
Be sure to describe the form to us in simple terms.
Hein


shaily
Occasional Contributor

Re: need help with dispaying the lines on screen

Thankyou So much for your time.. I will try that and will post.