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




> -----Original Message-----
> From:  G Armour

> Just so I can be sure I haven't missed some obscure DDS 
> function...  I had a question posed to me today asking if it 
> were possible to have a 5250 green screen with a horizontal 
> scroll bar.  Without even thinking about it for two seconds, 
> I said no.

There is no magic DDS function, but you can do this within your program
using a simple technique.

1) In your SFL detail record, define a single character output field
(assume it's called "myOutFld"):

Opt   OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO  <- SFLCTL (header)
99      OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO  <- SFLREC (detail)
99    OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

2) In the same record, define another character field ("myBuffer") long
enough to contain all the data which you want to scroll horizontally.
Create this as a HIDDEN field. This is your buffer area.

3) Within your program, define a data structure over your buffer area:

D myBuffer              ds
D  myField1                        10a
D  myField2                       5i 0 
D ...etc

4) Eval your data into this data structure as required.

5) On first display, start displaying data from left-most position:

C       eval    myOutFld = %subst(myBuffer: 1: %size(myOutFld))

6) When user presses a function key to scroll right, loop through each
SFLREC, updating the output field:

C               eval      leftPos = leftPos + scrollChars
C             for     x = 1 to sflRecCnt
C       X       chain   sflrec
C           if      (leftPos + %size(myOutFld)) <= %size(myBuffer)
C             eval        myOutFld = %subst(myBuffer: leftPos:
%size(myOutFld))
C               else    
C               eval    myOutFld = %subst(myBuffer: leftPos:
%size(myBuffer)-leftPos)
C               endif
C               endfor

7) When user presses a function key to scroll left, reverse the process.


That's the basic technique in a "stream of consciousness" format. Sorry
that I don't have time to be more thorough, but I think it's enough to
get the idea across.

Regards,

John Taylor



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.