|
On Nov 1, 2023, at 11:29 AM, Buck Calabro <kc2hiz@xxxxxxxxx<mailto:kc2hiz@xxxxxxxxx>> wrote:
On 11/1/2023 10:42 AM, Daniel Gross wrote:
Hi Douglas,
your are right - but you have to think in hexadecimal. 2 bytes in hex are like 0x0000 to 0xFFFF. So you have to convert the decimal values to hex:
1282 => 0x0502 => 0x05 / 0x02 => Line 5 Column 2
1290 => 0x050A => 0x05 / 0x0A => Line 5 Column 10
Well said.
The manual reference is somewhat obscure.
Files and file systems > Database file management > Reference > Feedback area layouts > I/O feedback area > I/O feedback area for ICF and display files.
The text there reads: 'Character 2 Cursor location (line and position). Updated on input operations that are not subfile operations that return data to the program. For example, hex 0102 means line 1, position 2. Line 10, position 33 would be hex 0A21.'
One could also define the DS like this:
D INFDS DS
D row 370 370I 0
D col 371 371I 0
...and then test the row/column values in a way that's easier to compare vs the DDS for the desired field/area on the display file.
--
--buck
http://wiki.midrange.com
Your updates make it better!
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription related questions.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.