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

How to update physical file in rpgle without using display file?

4 Answers   GalaxE, IBM, TCS,


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

0 Answers   IBM,


What are the values of NUM1 and NUM2 after executing the following code? CLONO1NO2NO3 Factorl÷÷+OpcdeFactor2+÷+ResultLenDHHiLoEq C MOVE *LOVAL NUM1 50 C MOVE *J-fIVAL NtJM2 52

2 Answers   Fiserv, IBM,


i'm working on progA , in that program i want to see the userids of the users who work on this program?

10 Answers   Four soft,


what is decimal data error? when it will come and how to achieve(rectify) this error please give me solution as well as code

2 Answers   IBM,






what is importance of 'MAPFLD' IN OPNQRYF FILE ?

2 Answers  


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

0 Answers  


When it is desirable to describe files Internally?

0 Answers  


how to retrieve RRN value in RPGLE program

3 Answers  


1.find most occurrences of a character. for exm: input:aaabbbbdddddyyy output: d 5 times how can i get that?

13 Answers   HCL,


2. Which of the following statement(s) explains the difference(s) between the /INCLUDE and ICOPY directives? a.) No difference, they function the same b.) ACOPY cannot be used as a conditional directive c.) IINCLUDE files cannot contain embedded SQL d.) Nesting /TNCLUDE directives is not allowed

2 Answers   IBM,


What is use of IMPORT and EXPORT in RPGLE ? What is activation Group ? What is Service Program ???? How to call another program in RPGLE ?

1 Answers  


Categories