× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Yup.

I thought I just copied the data from an earlier posting but yes you are correct.


Jon P.

On Nov 1, 2023, at 1:07 PM, VERNON HAMBERG Owner via RPG400-L <rpg400-l@xxxxxxxxxxxxxxxxxx> wrote:

Hi Jon


Did I miss something? row and col are each 1 byte, right? So should col be at Pos(371)?


Cheers
Vern


On Wed, 1 Nov, 2023 at 10:41 AM, Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:


To: rpg programming on ibm i

Or one could avoid from/to notation and use POS instead which I personally find preferable simply because no "to" calculation is required. In this case of course there should be no danger of screwing up the "to" position but I like consistency.

D INFDS DS
D row 3I 0 Pos(370)
D col 3I 0 Pos(372)

Dcl-DS INFDS;
row Int(3) Pos(370);
col Int(3) Pos(372);
End-DS;

Jon P




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.


--
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.

.
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: 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
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.