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...

how we retrieve records without using key field (ex:name)
from Physical File through RPG in as/400?

Answer Posted / syam

Yes, You can retrieve records from External Physical File
with key.

1.Specify PF as a program described file in RPG Program.
FFilNam IF F 80 6AIDISK KEYLOC(7)

(80=Record Lenght, 6=Key Lenght, (7)=Key starting
position)
2. IFilNam KD 01 1 C0 2 C1
I 7 12 NAME
(KD=Sequence,01=Record Id,1&2=Starting position,C=Any
Character,0=Value. Means In my file each record is having 1
and 2 posion = 01 to identify record, 7 to 12 =Name)
3.C MOVE 'SYAM' NAME
C 'SYAM' CHAIN FilNam
C N41 MOVEL NAME CUSNME
C 41 MOVEL *BLANK CUSNME

Try this code.

Is This Answer Correct ?    4 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do I declare a table or array in rpg iv?

1134


can any one help in hawkeye and turnover or any change management system plzzzzz or send the documents to my mail id :gvsp.as4@gmail.com

2361


How to write record if no field or the field are different in physical file in rpgle ?

918


How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...

1830


How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?

1965


how do I play {insert rpg system here}?

994


How to declare the pull button in AS/400..

2298


What is the difference between iter and do?

1158


what is an online rpg?

1206


how does the rpg element work?

1157


What is ment by record level identifier?

1095


What is a record lock error?

1711


How many program bind in one module....

2616


How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique

966


What is difference between bind by copy and bind by reference?

2416