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
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 |
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 |
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 |
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 |
How to update physical file in rpgle without using display file?
how do I declare a table or array in rpg iv?
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
i'm working on progA , in that program i want to see the userids of the users who work on this program?
what is decimal data error? when it will come and how to achieve(rectify) this error please give me solution as well as code
what is importance of 'MAPFLD' IN OPNQRYF FILE ?
How to declare the pull button in AS/400..
When it is desirable to describe files Internally?
how to retrieve RRN value in RPGLE program
1.find most occurrences of a character. for exm: input:aaabbbbdddddyyy output: d 5 times how can i get that?
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
What is use of IMPORT and EXPORT in RPGLE ? What is activation Group ? What is Service Program ???? How to call another program in RPGLE ?