MITHARG
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Record Positioning

Go down

Record Positioning Empty Record Positioning

Post  kasthuri Sun Jan 27, 2013 2:55 pm

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.

kasthuri

Posts : 212
Join date : 2013-01-27

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum