Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


1) How to define keyed file in CL pgm.
2) How can i read particular records in CL pgm from
database file.

Answers were Sorted based on User's Feedback



1) How to define keyed file in CL pgm. 2) How can i read particular records in CL pgm from databa..

Answer / prabhas

1. Using DCLF command
2. OVRDBF with Position parameter
DCLF FILE(&FILENAME)

OVRDBF FILE(&FILENAME) POSITION(*KEY 1 FMT2 X'123F')

The system searches for a record from the record format
FMT2.
A single key field is used in the search (even though the
key value may have more key fields).
The record contains the hexadecimal value 123F (the
hexadecimal equivalent of packed decimal value 123.0). You
get this record when it is found.

Is This Answer Correct ?    22 Yes 0 No

1) How to define keyed file in CL pgm. 2) How can i read particular records in CL pgm from databa..

Answer / svankipu

See
1. In DCLF command u can declare a keyed-PF or an LF(having
desired keys)

2. In OVRDBF command u have an attribute called KEYFLD,
wherein u can mention the key-field of the above file.

Then you can use POSDBF command to position the PF or LF &
read it using RCVF command.
That's it!

Is This Answer Correct ?    5 Yes 4 No

Post New Answer

More RPG400 Interview Questions

Why there is invention of RPG if we can do insert update delete in CL through SQL.Why the rise of RPG?

1 Answers   Infogain,


ESCAPE message sent by child program can be handled by parent program using which keyword?

2 Answers  


can anybody help me that what is the procedure of debugging the service program?

3 Answers   CSC,


How can we access Interactive job LDA in Batch Job?. and How we can access a file in interactive QTEMP lib in Batch job?.

4 Answers   IBM,


How to find d key field of a pf that doesn’t have source physical file?

2 Answers  


am 2010 passed out . can any one tell me which course is good to put 2+fake .guide me

1 Answers  


what is the difference between SETON RT & RETURN?

5 Answers  


How can we call CL program to RPG? How many number of parameter we can pass

2 Answers   TCS,


1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?

0 Answers  


what is an online rpg?

0 Answers   IBM,


What is the OPEN and CLOSE accesspath?

3 Answers   CTS,


You have a *USE authority on a Library and *All authority on a file in that Library.Can you change the data in that file?

1 Answers  


Categories