|
From: Fred M. <fr...@mo...> - 2005-08-18 16:59:48
|
Jim Morcombe wrote:
>
> I have found a problem in my own conversion routines (not with Tiny
> Cobol) and am thinking about how to resolve it.
>
> I have a few files with strangely defined keys. Here is an example:
>
> 01 SOME-FILE-RECORD.
> 05 SOME-FILE-KEY.
> 07 SOME-FILE-KEY-NAME PIC X(5).
> 05 ANOTHER-FIELD PIC X(2).
> 05 Etc.
This data structure seems quite common to me.
> In the SELECT statement, the key name is defined as "SOME-FILE-KEY".
> However, in the START statement, the key is referred to as
> "SOME-FILE-KEY-NAME".
According to ISO/IEC FCD 1989 page 537 the START format contains :
data-name-1
START filename-1 [ FIRST | LAST | KEY relational-operator {
----------------- } etc.
record-key-name-1
So the use of SOME-FILE-KEY in your example is the use of
record-key-name-1, the use of SOME-FILE-KEY-NAME is the use of
data-name-1. Both forms are correct.
--
Fred Mobach - fr...@mo... - pos...@mo...
Systemhouse Mobach bv - The Netherlands - since 1976
website : http://fred.mobach.nl
Q: servos ad pileum vocare ?
A: servos fenestrae ad pileum rubrem vocare !
|