i hav 2 logical files(L1,L2) both r derived from one physical
file(P1). how can i use both the logical files in one RPG
program? if yes what i have to d.

Answers were Sorted based on User's Feedback



i hav 2 logical files(L1,L2) both r derived from one physical file(P1). how can i use both the lo..

Answer / henry

Yes you can use both L1 and L2 in teh same pgm by renaming
the record format of one of the LF (Either L1 or L2)

Is This Answer Correct ?    15 Yes 1 No

i hav 2 logical files(L1,L2) both r derived from one physical file(P1). how can i use both the lo..

Answer / sriaknth

If two logical files are using same record format, RENAME keyword should be used on F spec, also if similar fields are used we should use PREFIX keyword.

Is This Answer Correct ?    12 Yes 0 No

i hav 2 logical files(L1,L2) both r derived from one physical file(P1). how can i use both the lo..

Answer / ramrdy

hi henry, i used diffrent rec-formats in L1 &L2. but i want more clearly.

Is This Answer Correct ?    1 Yes 0 No

i hav 2 logical files(L1,L2) both r derived from one physical file(P1). how can i use both the lo..

Answer / alok.yee001

We need to rename the rocord format of atleast one logical file so that program will recognize the both files.

Prefix the fields is not really required (program will be compiled without prefix).

Is This Answer Correct ?    1 Yes 0 No

i hav 2 logical files(L1,L2) both r derived from one physical file(P1). how can i use both the lo..

Answer / ravikumar895

Hi,

copy those two logical files data into a physical file using CPYF command. Then, use that physical file in RPG program in F-spec...

CPYF FROMFILE(LIBRARY NAME/FILE NAME) TOFILE(LIBRARY NAME/FILE NAMECPY) FROMMBR(MBR NAME) TOMBR(MBR2CPY) MBROPT(*REPLACE) CRTFILE(*YES) FROMRCD(*START) INCREL((*IF field name *EQ 'R') (*AND field number *GT 99999999))

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More RPG400 Interview Questions

What would be the effect on the field where reverse image, underline and high intensity?

7 Answers   IBM,


How can we receive values from a called procedure in CL?

1 Answers   IBM, NTT Data,


how to display all the members records in a physical file without using ovrdbf?

9 Answers  


Can somebody tell me that, Is it possible to read all the member of PF without OVRDBF?

6 Answers  


RPG/400 number of Records present in a physical file using file information data structure FPF001 IP E DISK F KINFDS INFDS1 IINFDS1 DS I *RECORD RECORD Is this coding correct sir,i have given I P E that is I- input,P-primary file,E-externally described. Primary to use RPG logic cycle,is this the correct method because we have to find number of records present using file information data structure in RPG/400 without doing any input/output operations on the file and also without using DSPFD,SQL. If the above coding is correct means,when i compile the program it gets compiled,but if i call the program it does not return anything,i need number of records,please complete the coding sir.

1 Answers   IBM,






HI,1: What is the function of 'SETON LR' AND '*INLR=*ON ? 2:Can we used "seton lr" OR "*INLR = *ON" in between the program code ? 3:if yes then according to there function the code which is written acter seton lr/ *inlr should not be execute . Can any one tell me why those code get executed ?

2 Answers  


What is the length of Signature?

3 Answers   UST,


how do u find whether a record is locked or not??

4 Answers   CTS,


I have 1000 records in a file. I would like to generate 10 identical reports from this record with same format (structure of records) how do I do this?

1 Answers   IBM,


What is the purpose of PUTOVR keyword?

2 Answers  


write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen

0 Answers  


Hi friends, I am using a load all subfile , and currently i am in in the third page of the subfile , from third page i have selected a record and called some other program .on returning, subfile is being loaded from the frist page. so can any one kindly suggest me in retaining my third page after returning. i.e loading from third page.

7 Answers  


Categories