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



I've never understood why the cursor position should be defined as a 2 Position Value.
Position 370 represents the row in Hex Format and Position 371 the column also in Hex format. So when defining Position 370 as Uns(3) and and 371 also as Uns(3). It is easy to check and set the cursor position row and column easily. Without any strange values and also without any complex calculations such as dividing through 256 and then taking the remaining.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser
Modernization – Education – Consulting on IBM i

IBM Champion since 2020

"Shoot for the moon, even if you miss, you'll land among the stars." (Les Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them and keeping them!"
"Train people well enough so they can leave, treat them well enough so they don't want to. " (Richard Branson)
"Learning is experience … everything else is only information!" (Albert Einstein)

-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Mark Waterbury
Sent: Wednesday, 1 November 2023 15:50
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: INFDS()

It may help (someone) to know that this is how the cursor location works in the 5250 data streams. It's all EBCDIC, all hexadecimal ... :-)

On Wednesday, November 1, 2023 at 10:43:01 AM EDT, Daniel Gross <daniel@xxxxxxxx> 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

HTH
Daniel


Am 01.11.2023 um 14:52 schrieb DEnglander--- via RPG400-L <rpg400-l@xxxxxxxxxxxxxxxxxx>:

I have an RPG program that has a WORKSTN file defined with keyword
INFDS(DSPDS)

Here is that DS:

ddspds dS
dcursorloc 370 371b 0

Here is one example of where CURSORLOC is referenced:

c when CsrLoc = 'S1NUMBER' or c
cursorloc > 1282 and cursorloc < 1290

Is this code saying "If the cursor is on field S1NUMBER or it is on
row 12, positions 83 through 89 then....

If not, what does the number range of CURSORLOC represent? I can't
seem to find anywhere online where this field is defined as a numeric range.
Normally it shows as position 370 is the Hex of the cursor row
location and 371 is the Hex value of the cursor column location.

Any idea what is range represents? There other ranges within this
SELECT block, but CURSORLOC is only referenced in this SELECT block.


Douglas Englander
Senior Programmer/Analyst
The C. D. Hartnett Company ? Corporate Offices
1-817-594-3813 ext. 1636

"CONFIDENTIALITY NOTICE: This e-mail transmission (and/or the attachments accompanying it) contain confidential information belonging to the sender. The information is intended only for the use of the intended recipient. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of the information is strictly prohibited. Any unauthorized interception of this transmission is illegal under the law. If you have received this transmission in error, please promptly notify the sender by reply e-mail, and then destroy all copies of the transmission."
--
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.

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


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

Follow-Ups:
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.