View previous topic :: View next topic
|
Author |
Message |
senthildots
New User
Joined: 23 Nov 2005 Posts: 6 Location: Chennai
|
|
|
|
Hi,
While creating AIX i gave NONUNIQUE option as well as in file declaration in cobol i gave WITH DUPLICATES for alternate key. but while reading the file with alternate key its showing file status is 02... (Duplicate Key)
am i missed any option to give... or
thanx in advance
Regards,
senthil.s. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
The 02 is explained in the reference manual as:
This file status value applies only to indexed files with alternate keys that allow duplicates.
The input-output statement was successfully executed, but a duplicate key was detected. For a READ statement, the key value for the current key of reference was equal to the value of the same key in the next record within the current key of reference. For a REWRITE or WRITE statement, the record just written created a duplicate key value for at least one alternate record key for which duplicates are allowed. |
|
Back to top |
|
|
senthildots
New User
Joined: 23 Nov 2005 Posts: 6 Location: Chennai
|
|
|
|
Hi...
I cleared this issuee
actually 02 is a warning not a error... so i checked after read statement
if file-status = 00 or 02
so now its working
thank you..williams
regards
senthil.s. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
You are welcome senthil.s., glad we could help.. |
|
Back to top |
|
|
|