We're programming with Cobol on an AS/400 machine, using DDS files for interface.
I have a screen which has a calander on it. When the cursor is positioned on a day and the uses presses enter, it shows details for that day. When the user then presses F12, it goes back to the calander, but the cursor is in position 1,1 of the screen. We'd like to keep it where it was enter was pressed.
Now, in the input record, there's a field PSRF, which tells us in which field the cursor is, and a field PRSN, which tells us what position of the field it is in. The key to put the cursor back where it was when the screen is rewritten, would be to move those fields of the input record, to those fields in the output record, and then do a write of the screen. But, alas, no luck.
Does anyone have any thoughts on this?
The calander is not a subfile, it's just a screen with 12 strings (outjan, outfeb, and so on)
An example, if I'd press enter on january the 8th, PSRF of DRS002-I would be "OUTJAN" and PSRN of DRS002-I would be 16. When I move there values to those fields in DRS002-O and do a write however, the cursor is still on position 1/1 of the screen.
Thanks in advance.
Niki --------------------------------------
It's not the monsters under your bed, it is the men next door.
That make you fear, make you cry. Make you cry for the Child.
All the wars are fought amongst those lonely men. Unharmed, unscarred.
I have a screen which has a calander on it. When the cursor is positioned on a day and the uses presses enter, it shows details for that day. When the user then presses F12, it goes back to the calander, but the cursor is in position 1,1 of the screen. We'd like to keep it where it was enter was pressed.
Now, in the input record, there's a field PSRF, which tells us in which field the cursor is, and a field PRSN, which tells us what position of the field it is in. The key to put the cursor back where it was when the screen is rewritten, would be to move those fields of the input record, to those fields in the output record, and then do a write of the screen. But, alas, no luck.
Does anyone have any thoughts on this?
The calander is not a subfile, it's just a screen with 12 strings (outjan, outfeb, and so on)
An example, if I'd press enter on january the 8th, PSRF of DRS002-I would be "OUTJAN" and PSRN of DRS002-I would be 16. When I move there values to those fields in DRS002-O and do a write however, the cursor is still on position 1/1 of the screen.
Thanks in advance.
Niki --------------------------------------
It's not the monsters under your bed, it is the men next door.
That make you fear, make you cry. Make you cry for the Child.
All the wars are fought amongst those lonely men. Unharmed, unscarred.