Record Positioning
Page 1 of 1
Record Positioning
How to position the record in CL based on the key value?
Record Positioning based on Key value
POSITION parameter in OVRDBF command is used to position the record.To get a record based on key value, we must specify name of the field and any one of the following search values.
1) KEY (Key Equal)
2) KEYA (Key After)
3) KEYAE (Key After or Equal)
4) KEYB (Key Before)
5) KEYBE (Key Before or Equal)
e.g.
DCLF FILE(MYFILE)
OVRDBF FILE(MYFILE) +
POSITION(*KEY 1 MYFMT KEYFLD)
RCVF
It will retrieve a record from file MYFILE (format MYFMT), which has a key value matching the value in the field KEYFLD.
It is similar to CHAIN or SETLL operation codes in RPG.
Record Positioning based on Key value
POSITION parameter in OVRDBF command is used to position the record.To get a record based on key value, we must specify name of the field and any one of the following search values.
1) KEY (Key Equal)
2) KEYA (Key After)
3) KEYAE (Key After or Equal)
4) KEYB (Key Before)
5) KEYBE (Key Before or Equal)
e.g.
DCLF FILE(MYFILE)
OVRDBF FILE(MYFILE) +
POSITION(*KEY 1 MYFMT KEYFLD)
RCVF
It will retrieve a record from file MYFILE (format MYFMT), which has a key value matching the value in the field KEYFLD.
It is similar to CHAIN or SETLL operation codes in RPG.
kasthuri- Posts : 212
Join date : 2013-01-27
Similar topics
» How to get the record based on key
» REposition the record
» Record lock problem
» WHEN RECORD LOCK RELEASED?
» Command to search a record
» REposition the record
» Record lock problem
» WHEN RECORD LOCK RELEASED?
» Command to search a record
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|