MULTIPLE SUBFILES on ONE SCREEN
Last Post 07 Nov 2000 12:36 PM by Anonymous. 4 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
Anonymous
Editorial Staff Member
Editorial Staff Member
Posts:81236

--
25 Oct 2000 07:37 AM
I have a program where 2 subfiles are displayed on a screen at the same time, And used for displaying only. I can roll thru either subfile by positioning the cursor in the active area of that subfile. BUT when I chg search/load criteria and try to re-load the TOP subfile, nothing happens. The bottom subfile will re-load fine. I am using *IN84 IFEQ '1' write MI35A write MI35N write MI35K read MI35SC (screen format) RECNAM ifeq 'MI35K' READ MI35N (bottom subfile) else READ MI35K (top subfile) END The top subfile is always written to the screen first, so I dont know if this is why control is always returned to bottom subfile. I think I need to use the cursor location thing, but I havent gotten that to work correctly yet. Can anyone give me some basic information, or even samp code on how to do this? This is currently written in RPG III because I am modifying the code, if the answer comes back in RPG IV that is great! Thanks!
Anonymous
Editorial Staff Member
Editorial Staff Member
Posts:81236

--
30 Oct 2000 12:25 PM Accepted Answer
Write all needed record formats to the screen followed on a read on the display file name. This is the way to do it if you have more than 1 format with input fields. It is somewhere described in the AS400 manual about display files. I do not know if every record format has to have the keyword RTNCRSLOC defined. I do it for safety with allways the same fields for format, field, cursor line and cursor pos and it works fine. Cor.
Anonymous
Editorial Staff Member
Editorial Staff Member
Posts:81236

--
03 Nov 2000 01:37 PM Accepted Answer
OK - I tried adding the RTNCSRLOC, and I am still getting the same results. Lets talk about the DSPF, my SBFCTL formats looks like this.. A R MI35N SFLCTL(MI35M) A CF12 A RTNCSRLOC(&CSRREC &CSRFLD) A BLINK A CSRLOC(CSRLIN CSRCOL) A OVERLAY A PUTOVR A 46 SFLDSP A 47 SFLDSPCTL A 48 SFLCLR A 49 SFLEND A SFLSIZ(0007) A SFLPAG(0004) A CSRREC 10A H A CSRFLD 10A H A CSRLIN 3S 0H A CSRCOL 3S 0H I also have INVITE at the FILE LEVEL. If I do not use the INVITE, I get blinking on my screen. Can you tell me if your RPG code looks like this, and what your DSPF code looks like? I should add, that my ROLLING is working fine on both subfiles, but, when I change the top subfile, the program takes responds again AFTER the SECOND time ENTER key is pressed. Sorry for bugging you a
Anonymous
Editorial Staff Member
Editorial Staff Member
Posts:81236

--
07 Nov 2000 10:51 AM Accepted Answer
If you have to press the enter key 2 times before the program takes control, search to source for two reads on a record format or the display file itself after each other. It must look like this write fmta write sfctl01 write sfctl02 read dspf You can define the roll key's at file level otherwise you have to define them in each control record.
Anonymous
Editorial Staff Member
Editorial Staff Member
Posts:81236

--
07 Nov 2000 12:36 PM Accepted Answer
This is what I did to make it work. And I let the system handle the rollup/rolldown portion...What I did wrong was I had the 'cursor checking code' BEFORE the check for the record being read, and apparently the operating system needs the READ of the DSPF and the READ of the Record name to follow each other. Thanks to all who responded! WRITEMI35A WRITEMI35N WRITEMI35K READ MI35SC 99 RECNAM IFEQ 'MI35K' READ MI35N 99 ELSE READ MI35K 99 END Z-ADD0 BIN MOVE LINEC CHAR Z-ADDBIN CSRLIN MOVE COLC CHAR Z-ADDBIN CSRCOL
You are not authorized to post a reply.

Acceptable Use Policy