I have an order entry program where the detail is entered at the bottom of the subfile and the More... stays on all the time even when the indicator is on or off. If the file I am reading only has one record in it and my subfile page is 8 and subfile size is 9 the More... still shows. Can anyone shed some light on this problem I am having?
Thanks.
Software/Hardware used:
ASKED:
June 25, 2009 4:41 PM
UPDATED:
May 17, 2011 9:06 AM
That is my problem. I have
90 SFLEND(*MORE)
in my dds which is the indicator used for the file read. Even if *IN90 is on or off the word More… shows on the screen on the first page (which it should as *IN90 is off as there are more records) and on the last page even though *IN90 is on.
Yes I want the words MORE… or BOTTOM to show but BOTTOM never does. I have debugged the program and before i write the CTL indicator 90 is on as I am at the end of the file and the word MORE… still shows on the screen. I can keep pressing page down and recheck the indicator during debug and there are no more records to be read and indicator 90 is on and therefore MORE… keeps showing. I cannot get BOTTOM to show.
I just tried using the PAGEDOWN with N90. No change. You mentioned wrong version. I am using V4R4M0. Do you think that has something to do with it. I have other similar programs and the MORE… BOTTOM works ok. I am at a loss. I am not using any other indicator 90 except for the SFLEND(*MORE) and on the reade for my data file. If I change the SFLEND to N90 then initially the screen reads BOTTOM and I pagedown and it still reads BOTTOM which it should as I am at the end on page 2 but when I pageup the BOTTOM switches to MORE… and everthing works correctly until I exit the program and go back in.
This would be much easier to diagnose if you could post your code. In the mean time, it sounds like the indicator is not being set to on. Make sure that:
1.) You are using the same indicator for end of file as you are for SFLEND.
2.) The resulting indicator is in the EQ column (position 76 – 76).
Example:
Sorry, the spacing did not come out right.
Lets try that again.
Example:
CL0N01Factor1+++++++Opcode&ExtFactor2+++++++Result++++++++Len++D+HiLoEq
C READ ADCPTIL1 40
Sorry again for the typo and spacing. It should read positions 75 – 76.
F***********************************************************************
Fford0090 cf e workstn
F sfile(sfl1:rrn1)
F infds(info)
F indds(indicators)
Ffrorhd uf a e k disk
Ffrordt uf a e k disk
Ffrordn uf a e k disk
Finvtry if e k disk
Fcustmr if e k disk
Ffrcsfr if e k disk
Ffrbcit if e k disk
Ffrcspc if e k disk
D*
D psds sds
D #pgnam *proc
D #user 254 263
D*
Dinfo ds
D cfkey 369 369
D*
D Indicators DS
D SFL_Clr 31 31N
D SFL_Dsp 32 32N
D Pos_Cursr 60 60N
D Pos_Qtyor 61 61N
D Broch_Err 70 70N
D Item_Err 71 71N
D Nxtchg 74 74N
D SFL_End 90 90N
D*
D System_Date s d datfmt(*iso)
D inz(*sys)
D Today s d
D*
Dexit c const(X’33′)
Dcancel c const(X’3C’)
Dprompt c const(X’34′)
Dadd c const(X’36′)
Denter c const(X’F1′)
Drollup c const(X’F5′)
Dsflpag c const(8)
Ddisplay c const(’5′)
Dchange c const(’2′)
Ddelete c const(’4′)
D*
Dlstrrn s 4 0 inz(0)
Dselrrn s 4 0 inz(0)
Dcount s 4 0 inz(0)
D*
C*****************************************************************
C* Main Routine
C*****************************************************************
C*
C* Clear then build the initial subfile
C*
C exsr clrsf1
C odtk01 setll frordt
C exsr sflbld
C*
C* Do loop to process the subfile until F3 is pressed.
C*
C dou cfkey = exit or cfkey = cancel
C*
C write fkey1
C write sf1ctl
C exfmt detail
C if cfkey=exit
C or cfkey=cancel
C iter
C endif
*
C*****************************************************************
C* CLRSF1 – Clear the subfile
C*****************************************************************
C*
C clrsf1 begsr
C*
C* Clear relative record numbers and subfile
C*
C eval rrn1 = *zero
C eval lstrrn = *zero
C eval SFL_Clr = *on
C write sf1ctl
C eval SFL_Clr = *off
C eval SFL_Dsp= *on
C*
C endsr
C*****************************************************************
C* SFLBLD – Build the List
C*****************************************************************
C*
C sflbld begsr
C*
C* Make RRN1 = to the last relative record number of the subfile
C* so that the load process will correctly add records to the bottom
C*
C eval rrn1 = lstrrn
C*
C* Load the subfile with one page of data or until end-of-file
C*
C do sflpag
C odtk01 reade frordt 90
C if *in90
C leave
C endif
C eval rrn1 = rrn1 + 1
C eval option = *blank
C eval brochr = ffbccd
C invk01 chain invtry
C write sfl1
C enddo
C*
“C* If no records are loaded to subfile, don’t display it”
C*
C if rrn1 = *zero
C eval SFL_Dsp = *off
C eval Pos_Cursr = *off
C eval Pos_Qtyor = *off
C endif
C*
C eval lstrrn = rrn1
C*
C endsr
C*
C*****************************************************************
A R SFL1 SFL A* A 74 SFLNXTCHG A FFLIN# R H REFFLD(FRORDTR/FFLIN# *LIBL/FRORDT) A OPTION 1A B 11 3VALUES(' ' '2' '4') A FFBCCD R O 11 8REFFLD(FRORDTR/FFBCCD *LIBL/FRORDT) A FFITM# R O 11 17REFFLD(FRORDTR/FFITM# *LIBL/FRORDT) A INDESC R O 11 26REFFLD(INVTRYR/INDESC *LIBL/INVTRY) A FFQTOR R O 11 62REFFLD(FRORDTR/FFQTOR *LIBL/FRORDT) A EDTCDE(4) A* A R SF1CTL SFLCTL(SFL1) A* A SFLSIZ(0025) A SFLPAG(0008) A OVERLAY A 32 SFLDSP A SFLDSPCTL A 31 SFLCLR A 90 SFLEND(*MORE) A RRN1 4S 0H SFLRCDNBR A ORMODE 6A O 1 2DSPATR(HI) A 1 28'Fundraiser Order Entry' A DSPATR(HI) A gADD Fundraiser Order Entry 6/25/09 14:58:16 COMPANY/LOCATION . . . . . . 04 04 CUSTOMER NUMBER . . . . . . 44073 STACIA - BROCHURE ACCT FUNDRAISER CODE . . . . . . BA1 BROCHURE ACCT 1 SELLER NAME . . . . . . . . JOHN BROWN Type options, press Enter. 2=Change 4=Delete Brochure Opt Code Item # Item Description Qty Ord B1 400900 SID ICE AGE PLUSH 5.00 B2 400092 LIGHT UP MOTION DECTECTOR AD 105 3.00 B2 400092 LIGHT UP MOTION DECTECTOR AD 105 4.00 B2 400092 LIGHT UP MOTION DECTECTOR AD 105 5.00 B2 400092 LIGHT UP MOTION DECTECTOR AD 105 2.00 B2 400092 LIGHT UP MOTION DECTECTOR AD 105 1.00 B2 400092 LIGHT UP MOTION DECTECTOR AD 105 4.00 B2 400092 LIGHT UP MOTION DECTECTOR AD 105 3.00 More... Broch Item # Qty Ord B2 * * F3=Exit F4=Prompt F12=Cancel After I page down: ADD Fundraiser Order Entry 6/25/09 15:01:16 COMPANY/LOCATION . . . . . . 04 04 CUSTOMER NUMBER . . . . . . 44073 STACIA - BROCHURE ACCT FUNDRAISER CODE . . . . . . BA1 BROCHURE ACCT 1 SELLER NAME . . . . . . . . JOHN BROWN Type options, press Enter. 2=Change 4=Delete Brochure Opt Code Item # Item Description Qty Ord B2 400092 LIGHT UP MOTION DECTECTOR AD 105 5.00 B2 400092 LIGHT UP MOTION DECTECTOR AD 105 8.00 B2 400092 LIGHT UP MOTION DECTECTOR AD 105 6.00 B1 400900 SID ICE AGE PLUSH 6.00 More... Broch Item # Qty Ord B1 * * F3=Exit F4=Prompt F12=CancelOMG!! During my SFLBLD routine when 90 comes on at the end of file, I moved ’1′ to SFL_End and that worked!! I guess the *in90 on my file read does not coincide with the definition. I don’t know why but it works now. Thank you Philpl1jb. Your last comment did the trick. I am glad you stuck with me. sometimes someone else comes up with the obvious answer. i am never too old to learn something.
It works because you have set up *in90 as a named indicator in your D specs (SFL_End 90 90N) and are using an indicator data structure to communicate with the screen.
In other words, you set up an indicator DS called Indicators. In your F specs you told the screen to use this DS to communicate indicator status between the program and the screen (F indds(indicators)). When *IN90 came on at EOF the screen ignore it because you told it to use the name SFL_End instead. When you set SFL_End on at EOF, the screen “saw” it and changed from MORE to BOTTOM.
Thank you both for all your help. It all makes sense now. That’s what I get for trying something new like defining the Indicators in my program instead of the old way of using *in##. I appreciate your patience.