|
Why not select?
select
when *INMR and FILE1DS = FILE2DS
* (do nothing)
when *INMR
write MR_Diffs
when *IN01
write NMR_01
when *IN02
write NMR_02
endsl
Isn't that about all of the choices that there are?
M. Lazarus wrote:
> Joep,
>
> You're missing another set of parentheses:
>
> if not *inmr or
> (*in02 and ((file1data1 <> file2data1) or
> (file1data2 <> file2data2) or
> (file1data3 <> file2data3) or
> (file1data4 <> file2data4)));
>
> -mark
>
> At 11/7/07 10:50 AM, you wrote:
>
>>> From: Joep Beckeringh
>>>
>>> Actually it should be:
>>>
>>> if not *inmr or
>>> (*in02 and (file1data1 <> file2data1) or
>>> (file1data2 <> file2data2) or
>>> (file1data3 <> file2data3) or
>>> (file1data4 <> file2data4));
>>>
>>> Otherwise your program will fire for every record in the primary file.
>>>
>> Yup, you're right Joep. It has been a while <sheepish grin>. At 01NMR time
>> the secondary file hasn't been read yet. I don't know what I was thinking.
>> So you can only check for differences on the secondary record.
>>
>>
>>
>>> In your example, which is very concise, I remember
>>> that you need to specify end of file processing on
>>> both the primary and secondary files or the program
>>> will end once all records are read from the primary
>>> file regardless if more records remain in the
>>> secondary file. So the file spec would be IPE for the
>>> primary and ISE for the secondary. Maybe someone else
>>> remembers this subtlety or has additional light to
>>> shine on the topic.
>>>
>> As Joep pointed out, when all the EOF fields are blank, all records are
>> processed. I tested it with my little program after adding data to the file
>> (and realizing that Joep was dead-on about adding the *IN02 qualification).
>>
>> Joe
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.