× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I think your problem is to turn off *IN31(SFLDSP), before youe have written a 
record to the SFL. You should test RRN1 after the fill loop, if it is greater 
than 0.

Then you use the same field RRN1 on the SFLRCDNBR keyword in the DDS. I would 
take another field for that. Give it the same value as the the variable LSTRRN 
and after the fill loop, test if RRN! is greater than LSTRRN: if so, add 1 in 
the new variable. Something like this:

>C     sflbld        begsr
> C                   eval      rrn1 = lstrrn
> C                   eval      pagrrn = lstrrn
>  * Load the subfile with one page of data or until end-of-file
> C                   do        sflpag
> C                   read      sfl001lf                               90
> C                   if        *in90
> C                   leave
> C                   endif
> C                   eval      rrn1 = rrn1 + 1
> C                   enddo
> C                   If          rrn1 > lstrrn
> C                   Eval      pagrrn = pagrrn + 1
> C                   Eval      *IN31 = *OFF
> C                   EndIf
> C                   Eval      lstrrn = rrn1
> C                   endsr

(Personally I would put *IN31 *OFF for the SFLCLR and the *IN31 *ON for the 
SFLDSP; you can treat them as mutually exclusive).

Regards,
Carel Teijgeler

*********** REPLY SEPARATOR  ***********

On 29-8-05 at 14:20 steema@xxxxxxxxxxxxx wrote:

>C                   exsr      clrsfl
>C                   exsr      sflbld
> * Do loop to process the subfile until F3 or F12 is pressed
>C                   dou       (cfkey = exit) or (cfkey = cancel
>C                   write     fkey1
>C                   exfmt     sf1ctl
> *
>C                   select
>C                   when      (cfkey = enter) and (ptname <> *blanks)
>C     ptname        setll     sfl001lf
>C                   exsr      clrsfl
>C                   exsr      sflbld
>C                   clear                   ptname
> * Add more records to the subfile if user is at the bottom
>C                   when      (cfkey = rollup) and (not *in32)
>C                   exsr      sflbld
>C                   endsl
>C                   enddo
>C                   eval      *inlr = *on
>C     clrsfl        begsr
> * Clear relative record numbers and subfile
>C                   eval      rrn1 = *zero
>C                   eval      lstrrn = *zero
>C                   eval      *in31 = *on
>C                   write     sf1ctl
>C                   eval      *in31 = *off
>C                   eval      *in32 = *off
>c                   endsr
>C     sflbld        begsr
> C                   eval      rrn1 = lstrrn
>  * Load the subfile with one page of data or until end-of-file
> C                   do        sflpag
> C                   read      sfl001lf                               90
> C                   if        *in90
> C                   leave
> C                   endif
> C                   eval      rrn1 = rrn1 + 1
> C                   enddo
> C                   endsr

>> Some possibilities:
>>
>> 1) The SFL is empty and SFLDSP indicator is on.
>> 2) You want to position the cursor on a non-existant SFL record
>> 3) SFLDSPCTL indicator is off and you do a write to the SFLCTL.
>>




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.