PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

Record Positioning

View previous topic View next topic Go down

Record Positioning

Post  maran on Mon Sep 07, 2009 6:24 pm

How to position the record in CL based on the key value?
avatar
maran
Admin

Posts : 442
Join date : 2009-07-24

View user profile http://pmsinformationsystem.forumotion.net

Back to top Go down

Record Positioning based on Key value

Post  Vanithadevi on Wed Sep 09, 2009 5:23 pm

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.

Vanithadevi

Posts : 14
Join date : 2009-07-29
Age : 32
Location : Chennai

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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