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



If I am understanding you correctly, in scenario number 2 you are inserting a new line into the subfile, which really means you are updating the subfile from the insertion point to (the end of the subfile plus 1). There are several ways that come to mind about solving that but I am thinking you probably will choose to use an array to keep the data for your subfile, and adjust the array instead of adjusting the subfile. In that case reloading the subfile is a good choice, since it will be lightening fast, and saves a whole lot of programming issues.

Adding a hidden field to the subfile record with the RRN in it might be useful in that you can choose to save that number as a SFLRCDNBR.

I keep coming back to the scroll bar. Are there really any 5250 clients in use that do not support the scroll bar? That just solves so many programming problems (like setting at the top and moving the subfile up or down one-line-at-a-time) with a hassle-free solution that your users already understand.

These may be of interest to you.
http://www.martinvt.com/Code_Samples/Data_Editor/data_editor.html

http://www.martinvt.com/Code_Samples/FAQ/faq.html

Notice there are three extra toolbar buttons: Cut, Append, Next. Those may also be of interest to you if you are doing full screen editing.







On 2/13/2011 2:08 PM, M. Lazarus wrote:
Joe,

The behaviors are for two distinct functions. Think of the
application as SEU editing a member.

Function 1: Position the first line of a subroutine to the
top. Tripping the MDT on the line number and pressing enter will do
that. That's by user request - to position that line to the top only
when it's called for.

Function 2: Let's say I want the behavior when copying a line to
automatically display the page containing the target line (I know SEU
currently doesn't work like that.) Since the target line position
may not be on the current page, default SFLRCDNBR behavior
accomplishes that goal beautifully.

Both are legitimate and separate functions.

-mark

At 2/13/2011 01:54 PM, you wrote:
On 2/13/2011 12:37 PM, M. Lazarus wrote:
Joe,

Here's my dilemma. I basically have 2 requirements:

1) As described, the movement of the selected record to the top of
the page, essentially a position-to.

2) The default type of behavior from SFLRCDNBR, namely the display of
the proper page with the cursor positioned at that record.

Is it possible to have both behaviors using the SFL keywords or do
I have to pick one and program around the other?

-mark

As far as I know the answer is, unfortunately, "yes". But understand
that you're asking the system to do two different things: put the record
you want at the top, and put some other record on the top. Why do you
want two different behaviors?

But assuming you do want two different behaviors, you'll have to program
the latter. You'll have to figure out which record "should" be on top,
and then either use a DSPATR(PC) on a subfile field and condition it
with an indicator, or use absolute row and column positioning of the
cursor and calculate it yourself. To me, it's more trouble than it's
worth, but it can be done.

Joe



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.