× 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.



  Never mind, I found my error.  I had a previous CHAIN to the subfile
  before the save routine executed.  Thanks anyway though!!

>From: "Bob O." <otis_the_cat@xxxxxxxxxxx>
>Reply-To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
>To: rpg400-l@xxxxxxxxxxxx
>Subject: CF10 and Subfile
>Date: Tue, 19 Apr 2005 09:08:29 -0500
>
> I can't figure out why this is happening...
> I have a subfile with CF10 defined in the control record format. >When the
> user presses F10, the program does a save of any changes to the
>subfile
> and displays a window to print a report.
>
> The problem is when the F10 key is pressed as opposed to the
>Enter
> key. If the Enter key is pressed, the save is performed
>beautifully. If
> the CF10 key is pressed, the subroutine to do the save is
>executed, but
> once the first READC is performed, it doesn't see that any
>records in the
> subfile have been changed and just exits the readc loop. I've
>never had
> this happen before and its freaking me out. Am I missing
>something
> obvious??? The ReadC loop is below. Thanks for any help in
>advance.
>
> c SaveSfl2 BegSr
> *
> * Read the subfile for selected
> * records to delete from the file
> * ApWork.
> *
> c ReadC Sfl2
> *
> c Dow Not %Eof
> *
> C Select
> *
> * Invalid Entry (Not "X")
> *
> c When S2Del <> ' ' and S2Del <> 'X'
> c Eval *In64 = *On
> c Eval *In46 = *On
> c UpDate Sfl2
> c Write Foot2
> c ExFmt Ctl2
> c Readc Sfl2
> c Iter
> *
> * Check is marked for removal
> *
> C When S2Del = 'X'
> c Eval ##Vend = S2Vend
> c Eval ##Invc = S2Invc
> c Eval ##Seq = S2Seq
> *
> c PtKey Chain ApWork
> c If %Found
> c Eval WkApCd = 'X'
> c UpDate RApwork
> c End
> *
> * Change from Deleted
> c When S2Del = ' ' and S2Del <>
>S2DelH
> c Eval ##Vend = S2Vend
> c Eval ##Invc = S2Invc
> c Eval ##Seq = S2Seq
> *
> c PtKey Chain ApWork
> c If %Found
> c Eval WkApCd = ' '
> c UpDate RApwork
> c End
> c EndSL
> *
> c ReadC Sfl2
> c EndDo
> *
> c EndSr
>--
>This is the RPG programming on the AS400 / iSeries (RPG400-L)
>mailing list
>To post a message email: RPG400-L@xxxxxxxxxxxx
>To subscribe, unsubscribe, or change list options,
>visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
>or email: RPG400-L-request@xxxxxxxxxxxx
>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 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.