add 2 to m
add 1 to n
*> Rule 7
when 2 also any also quote also ","
In March 2017, there was a discussion relating to decision
tables and EVALUATE. It got me thinking. I searched for
references and located a document at Object Management
Group (OMG) titled Decision Model and Notation (DMN).
< http://www.omg.org/spec/DMN/1.1/PDF > [a PS version is
available]. The PDF is 182 pages. Section 8 discusses
decision tables.
evaluate state also m = fld-start also csv-rec (m:1)...
when 1 also TRUE also quote also any...
when 1 also TRUE also space also "'"...
when 1 also any also not "," also any...
when 1 also any also "," also any...
when 2 also any also not quote also any...
when 2 also any also quote also quote...
when 2 also any also quote also ","...
when 2 also any also quote also " "...
end-evaluate
.
In article <5b96207f-3d07-4d9f-9c5d-429da6026664@googlegroups.com>,
Rick Smith <rs84...@gmail.com> wrote:
[snip and a condensing... my apologies]
evaluate state also m = fld-start also csv-rec (m:1)...
when 1 also TRUE also quote also any...
when 1 also TRUE also space also "'"...
when 1 also any also not "," also any...
when 1 also any also "," also any...
when 2 also any also not quote also any...
when 2 also any also quote also quote...
when 2 also any also quote also ","...
when 2 also any also quote also " "...
end-evaluate
.
A lovely bit of code, Mr Smith. It reminded me of a long-term disability insurance system I worked on a few years back, a textbook example of hairsplitting legalisms implemented in COBOL '74.
Hello Rick!
If interested there is a decision table processor to include such into a Cobol program written heck forgotten - around 19070's anyway you can find
the source at https://sourceforge.net/p/open-cobol/contrib/HEAD/tree/trunk/tools/dectrans
/
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,004 |
Nodes: | 10 (0 / 10) |
Uptime: | 221:29:29 |
Calls: | 13,080 |
Calls today: | 1 |
Files: | 186,574 |
Messages: | 3,300,359 |