View previous topic :: View next topic |
Author |
Message |
mf979171 Beginner
Joined: 31 Aug 2007 Posts: 4 Topics: 2
|
Posted: Sat Sep 01, 2007 1:42 am Post subject: File Position Indicator |
|
|
Hi All,
Please can you let me know where the FPI(File Position Indicator) be when you get a file status of 23 during KSDS operation. Also, when we move high-values to the KEY of a KSDS dataset, where is the FPI ?
May be the answer to one will give me answer to second question.
Thanks. _________________ Thanks. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Sat Sep 01, 2007 1:55 am Post subject: |
|
|
mf979171,
A file status code of 23 indicates that no record is found. An attempt has been made to access a record, identified by a key, and that record does not exist in the file. Alternatively a START or READ operation has been tried on an optional input file that is not present.
The file position indicator marks the next record to be accessed for sequential COBOL requests. You do not set the file position indicator anywhere in your program; it is set by successful OPEN, START, READ, and READ NEXT statements. Subsequent READ or READ NEXT requests use the established file position indicator location and update it. The file position indicator has no meaning for random processing.
Quote: |
Also, when we move high-values to the KEY of a KSDS dataset, where is the FPI ?
|
If you moved high-values to the key and issued a START verb then your FPI is at the last record. And now if you do a READ NEXT you would encounter a status code of 23.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
mf979171 Beginner
Joined: 31 Aug 2007 Posts: 4 Topics: 2
|
Posted: Sat Sep 01, 2007 2:43 am Post subject: |
|
|
Thanks Kolusu,
When high-Values are moved for START processing, isn't it that I will get file status of 23? And is the record at the last KEY or at the End of last record?
Talking about FPI lets say, I have a file having 5 records with KEY as 1,2,4,5,6
I did START the KSDS file having KEY = 3, where the FPI will be and will it not throw Fie status = 23? as KEY=3 is not found? _________________ Thanks. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Sat Sep 01, 2007 9:36 am Post subject: |
|
|
Quote: |
Talking about FPI lets say, I have a file having 5 records with KEY as 1,2,4,5,6
I did START the KSDS file having KEY = 3, where the FPI will be and will it not throw Fie status = 23? as KEY=3 is not found?
|
mf979171,
Yes you would get a status of 23 when you don't have the key 3. usually the start command is issued with GT or LT so that it will fetch the next value
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
mf979171 Beginner
Joined: 31 Aug 2007 Posts: 4 Topics: 2
|
Posted: Sat Sep 01, 2007 11:02 am Post subject: |
|
|
Thanks kolusu. _________________ Thanks. |
|
Back to top |
|
 |
|
|