|
Watson crack in jest only. If I added code to check SFLRRN > 0 to set SFLPSD what do I set SFLPSD to when no records, Thought there be error if SFLRCDNBR < 1 or SFLPSD > sflrrn??? "If a value less than 1 or a value greater than the number of records in the subfile is contained in this field on an output operation to the subfile control record format, an error is returned to your program." At exfmt value of sflpsd = 1 and 5 records in subfile,when looking in STRDBG F11 at EXFMT KABOOM. Thanks goes to you Carel for your time. Bill Hopkins -----Original Message----- From: Carel Teijgeler [mailto:coteijgeler@chello.nl] Sent: Friday, August 30, 2002 12:22 PM To: rpg400-l@midrange.com Subject: Re: Display problems CPF5192 with mouse clicks Bill, "It is elementary," to quote a famous detective. In the programmes with a single-page SFL (the first and the third) you set SFLPSD to 1 in the *INZSR subroutine. But unfortunately when the SFL is empty, because there are obviously no records, the system tries to position the cursor on an nonexistant SFL record. Test to see if the SFLrrn is greater than 0 before putting a value in SFLPDS. Regards, Carel Teijgeler. *********** REPLY SEPARATOR *********** On 30-8-02 at 8:24 Hopkins, Bill wrote: > > A* Display Name: VNDR00W >* > A SFLPSD 4S 0H SFLRCDNBR(CURSOR) > FVNDR00W CF E WORKSTN INFDS(WSDS) > F SFILE(DFTSFL:SFLrnd) > > CSR *INZSR BEGSR > C Eval @Exit = @False > C Eval SFLpsd = 1 > C Clear Srrn > C Clear Sflrnd > C Clear Endrn > CSR ENDSR > CSR @LOAD BEGSR > C Eval EOFoffset = *zeros > C Do 5 > C SELECT > C WHEN P$VNDR > *zeros > C Eval Sflrnd = (Sflrnd + 1) > C Write Dftsfl > C WHEN P$VNAM > *blanks and > C VXACOD <>'D' > C Eval Sflrnd = (Sflrnd + 1) > C Write Dftsfl > C OTHER > C Eval Sflrnd = (Sflrnd + 1) > C Write Dftsfl > C ENDSL > C Enddo > C If Sflrnd = *Zeros > C Eval *in32 = *Off > C Else > C Eval *in32 = *On > C Eval Endrn = (Sflrnd + EOFoffset) > C Endif > CSR ENDSR _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.