670 pts.
 Subfile with scroll bar.
I'm creating a simple program for subfile with scroll bar. I am able to see the scroll bar in the display file but the scroll bar is not working. It isn't scrolling up or scrolling down. Please suggest what can be the solution.

Software/Hardware used:
AS400
ASKED: February 26, 2013  7:52 AM
UPDATED: February 26, 2013  12:46 PM

Answer Wiki:
0000.10 A*%%TS SD 20130225 015246 ATANEJA REL-V5R4M0 5722-WDS 0000.20 A*%%EC 0000.30 A DSPSIZ(24 80 *DS3) 0000.40 A CF03(03) 0000.50 A R SFL1 SFL 0000.60 A*%%TS SD 20130225 015246 ATANEJA REL-V5R4M0 5722-WDS 0000.70 A TEXT('y') 0000.80 A SEMP# 7A O 7 11 0000.90 A SENAME 15A O 7 22 0001.00 A SSALARY 7S 0O 7 43 0001.10 A R SFLCTL1 SFLCTL(SFL1) 0001.20 A*%%TS SD 20130225 015246 ATANEJA REL-V5R4M0 5722-WDS 0001.30 A OVERLAY 0001.40 A 27 SFLDSP 0001.50 A 28 SFLDSPCTL 0001.60 A 29 SFLCLR 0001.70 A 30 SFLEND(*SCRBAR ) 0001.80 A SFLSIZ(0012) 0001.90 A SFLPAG(0010) 0002.00 A 2 28'EMPLOYEE REPORT' 0002.10 A COLOR(PNK) 0002.20 A 6 12'Emp #' 0002.30 A 6 24'Name' 0002.40 A 6 44'Salary' 0002.50 A R FOOTER 0002.60 A*%%TS SD 20130225 015246 ATANEJA REL-V5R4M0 5722-WDS 0002.70 A 21 10'F3=EXIT'
Last Wiki Answer Submitted:  February 26, 2013  12:46 pm  by  Michael Tidmarsh   11,390 pts.
All Answer Wiki Contributors:  Michael Tidmarsh   11,390 pts. , ankit2002   670 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

What is the output device type? If it’s an emulator, what is the emulator? — Tom

 107,935 pts.

 

@Tom Sir,
It is a subfile whose code is given above. Please let me know if we require RPGILE Code or any other information.

 670 pts.

 

Are there actually more records to scroll to? 

 7,175 pts.

 

hi ankit please find the code which worked fine for me during my practice

 430 pts.

 

0001.00 A REF(LIBNAME/sallf)
0002.00 A R SFLREC SFL
0003.00 A ENO R B 6 15
0004.00 A DNO R B 6 23
0005.00 A SAL R B 6 36
0006.00 A DESG R B 6 45
0007.00 A R CTLREC SFLCTL(SFLREC)
0008.00 A SFLSIZ(0050)
0009.00 A SFLPAG(0005)
0010.00 A CF03(03)
0011.00 A OVERLAY
0012.00 A 20 SFLCLR
0013.00 A 21 SFLDSP
0014.00 A 22 SFLDSPCTL
0015.00 A 30 SFLEND(*SCRBAR)
0016.00 A 2 15′ @ EMPLOYEE DETAILS @
0017.00 A DSPATR(RI)
0018.00 A COLOR(PNK)
0019.00 A 4 15′ENO’
0020.00 A COLOR(WHT)
0021.00 A 4 23′DEPTNO’
0022.00 A COLOR(WHT)
0023.00 A 4 36′SALRY’
0024.00 A COLOR(WHT)
0025.00 A 4 45′DESG’
0026.00 A COLOR(WHT)
0027.00 A R FOOTER
0028.00 A 22 10′F3:EXIT’
0029.00 A COLOR(RED)

===================================================================
0001.00 Fdspf03 cf e workstn sfile(sflrec:rrn)
0002.00 Fsallf if e k disk
0003.00 DRRN s 4s 0 inz(0)
0004.00 C exsr clrsr
0005.00 C exsr loadsr
0006.00 C dow *in03=*off
0007.00 C exsr dspsr
0008.00 C enddo
0009.00 C eval *inlr=*on
0010.00 C clrsr begsr
0011.00 c eval *in20=*on
0012.00 C write ctlrec
0013.00 C eval *in20=*off
0014.00 C endsr
0015.00 C loadsr begsr
0016.00 C read sformat 40
0017.00 C dow *in40=*off
0018.00 C eval rrn=rrn+1
0019.00 C write sflrec
0020.00 C read sformat 40
0021.00 C enddo
0022.00 C endsr
0023.00 C dspsr begsr
0024.00 C eval *in21=*on
0025.00 C eval *in22=*on
0026.00 C eval *in30=*on
0027.00 C write footer
0028.00 C exfmt ctlrec
0029.00 C eval *in21=*off
0030.00 C eval *in22=*off
0031.00 C eval *in30=*off
0032.00 C endsr
===================================================
pf

0001.00 A R SFORMAT
0002.00 A ENO 5S 0
0003.00 A DNO 10A
0004.00 A SAL 5S 0
0005.00 A DESG 5A

 430 pts.

 

Please let me know if we require RPGILE Code or any other information.
 
ILE is not needed. ILE is not directly related to scroll bars. Scroll bars are part of DDS. The code looks fine, although I can’t test it.
 
But what is important is the device. So, I’ll ask again. What is the output device type? If it’s an emulator, what is the emulator?
 
(Of course, it’s also important that the program adds enough records to scroll, but I will assume that until finding out if the device supports scrolling with a scroll bar.)
 
Tom

 107,935 pts.

 

@BigKat: There are plenty of records.
@ravula: The problem is that I can see the scoll bar coming at right side however when I clicked on this it will neigther go up nor go down. I need to use Page Up and Page Down for this.

 670 pts.

 

@Tom: What do u mean by Output Device Type ? I dont have any idea about this.

 670 pts.

 

What do u mean by Output Device Type ?
 
Device type relates in two ways. First, some ‘types’ can’t support scroll bar functions. Second, emulators might request particular device ‘types’ that support scroll bars, but the emulator software doesn’t respond to scroll bar requests from the user. (And sometimes fix packs need to be applied to make emulators work correctly.)
 
A device type is an attribute of a device description, the *DEVD. To see what you’re using, run DSPJOB from a system command line to see the ‘Job’ name at the upper left of the display. Then use DSPDEVD [jobname] to see the device description. The ‘Device type’ (and model) should be shown on about the fifth line of data.
 
Commonly, the device type will be 3477 and model is often FC. But you might show something different.
 
After that, please tell what emulator you are using (unless you have a direct-attach terminal). The emulator might be from iSeries Access V5R4 or something like that. Or it might be a MochaSoft TN5250 emulator that you can check by clicking the [Help] menu bar item. Or it could be a number of other emulators.
 
When we know those, we’ll have a chance of asking the best questions to track down your problem. We need to know what we’re dealing with.
 
Tom

 107,935 pts.

 

@Tom:
Device Type: 3477
Device Model : FC
Emulator : TN3270 Plus

 670 pts.

 

Emulator : TN3270 Plus
 
As far as I know, no 3270 emulator is going to know anything about 5250 advanced functions. You need to use 5250 emulators in order to expect 5250 features to work.
 
Basic terminal functions can be used in almost any kind of terminal device emulator. But 3270 emulators handle advanced features of 3270 devices.
 
Tom

 107,935 pts.

 

Will this code may work in RUMBA…..

 670 pts.

 

Rumba is a non-IBM product. I don’t have it; so you need to look at Rumba documentation, ask Rumba support or test it. Or you can wait to see if some member can test it for you. It might be faster to do it yourself. — Tom

 107,935 pts.