MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

File Position Indicator

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management
View previous topic :: View next topic  
Author Message
mf979171
Beginner


Joined: 31 Aug 2007
Posts: 4
Topics: 2

PostPosted: Sat Sep 01, 2007 1:42 am    Post subject: File Position Indicator Reply with quote

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
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sat Sep 01, 2007 1:55 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
mf979171
Beginner


Joined: 31 Aug 2007
Posts: 4
Topics: 2

PostPosted: Sat Sep 01, 2007 2:43 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sat Sep 01, 2007 9:36 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
mf979171
Beginner


Joined: 31 Aug 2007
Posts: 4
Topics: 2

PostPosted: Sat Sep 01, 2007 11:02 am    Post subject: Reply with quote

Thanks kolusu.
_________________
Thanks.
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Data Management All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group