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
What is the output device type? If it’s an emulator, what is the emulator? — Tom
@Tom Sir,
It is a subfile whose code is given above. Please let me know if we require RPGILE Code or any other information.
Are there actually more records to scroll to?
hi ankit please find the code which worked fine for me during my practice
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
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
@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.
@Tom: What do u mean by Output Device Type ? I dont have any idea about this.
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
@Tom:
Device Type: 3477
Device Model : FC
Emulator : TN3270 Plus
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
Will this code may work in RUMBA…..
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