|
Where can I find out more about that? It sounds interesting.
--
Mike Wills
Midrange Programmer/Analyst
Sick of corporate radio and hungry for something new?
http://thenextgenerationofradio.com
Stalking me? http://twitter.com/MikeWills | http://friendfeed.com/mikewills
On Mon, Jul 7, 2008 at 5:27 PM, Booth Martin <booth@xxxxxxxxxxxx> wrote:
> One day I decided to stop using READC(and all of the issues that go with
> it) and use a FOR/ENDFOR Loop. Much easier, in the end, and
> performance is not an issue with today's machines. I especially liked
> how it was able to not bother with changed records that were then
> changed back
>
> On another day someone on this list made the point that it was quite
> easy to define a data structure with all of the subfile's fields and add
> that to the subfile as a hidden field. Then, I could do F5=refresh
> really easy, I could compare screen fields with original fields, for
> changes (and to see if the data file's fields that I cared about had
> been changed at another workstation). If the data structure is empty I
> know I am adding a new record. The data structure also has the key
> fields, so if the key is changed it is easy to find the correct record
> to update, and if the screen fields have been cleared I know a deletion
> is desired.
>
> It turns out that the FOR loop and the hidden data structure field make
> handling subfiles a whole lot easier.
>
>
> Mike wrote:
>> When processing my subfile using READC it is reading all of my records
>> even with SFLNXTCHG on the subfile, what obvious thing am I missing?
>>
>> File with relevant parts
>> A R SFL01
>> A*%%TS DD 20080623 164716 ispa2 REL-V5.0.1 WDSc
>> A SFL
>> A SFLNXTCHG
>> A SEL 1 I 6 3CHECK(ER)
>> A SINVNUM 15 O 6 7
>> A SCUSTNUM 8Y 0O 6 24EDTCDE(Z)
>> A SNAME 50 O 6 33
>> A SINVDATE 10 O 6 85
>> A SINVAMT 11Y 2O 6 97EDTCDE(2 $)
>> A*%%GP MAIN 01
>> A R CTL01
>> A*%%TS DD 20080707 164225 ispa2 REL-V5.0.1 WDSc
>> A SFLCTL(SFL01)
>> A 30 SFLDSP
>> A SFLPAG(19)
>> A SFLSIZ(20)
>> A 30 SFLEND(*MORE)
>> A 31 SFLCLR
>> A OVERLAY
>> A CA04(04)
>> A CA09(09)
>> A RTNCSRLOC(*RECNAME &CSRLOCREC
+
>> A &CSRLOCFLD)
>> A SFLDSPCTL
>>
>>
>> Source with relevant parts:
>>
>> // Printer/Display Files
>> FAR90FM CF E WORKSTN sfile(SFL01:rrn01)
>>
>> P ProcessSubfile B
>> D ProcessSubfile PI
>>
>> /free
>>
>> readc SFL01;
>>
>> dow (not %eof());
>>
>> select;
>> when ((sel = '1') or (sel = 'X')) and (isPrompt);
>> SelectPrompt();
>>
>> when (sel = '5') or (sel = 'X');
>> DisplayInvoice('D':0:sInvNum);
>>
>> when (sel = 'P');
>> PrintInvoice(sInvNum:*off);
>>
>> endsl;
>>
>> readc SFL01;
>>
>> enddo;
>>
>> return;
>>
>> /end-free
>> P ProcessSubfile E
>>
>> I am sure it is a time-to-go-home bug... but I am not seeing a
>> problem. I have deleted the objects and recompiled to be sure of no
>> issues there.
>>
>> --
>> Mike Wills
>> Midrange Programmer/Analyst
>>
>> Sick of corporate radio and hungry for something new?
>> http://thenextgenerationofradio.com
>> Stalking me? http://twitter.com/MikeWills |
http://friendfeed.com/mikewills
>>
>
> --
> ---------------------------------
> Booth Martin
> http://www.Martinvt.com
> ---------------------------------
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.