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 |
If the last record of a file has been read, and the next operation on that file is a READ operation, what will be the values of the input fields for that file? A. They will be blank and/or zero. B. They will be null. C. They will equal the values of the first record in the file. D. They will equal the values of the last record read.
How can we override a file during runtime in RPG? Without using OVRDBF or calling a CL program
The RP program is displaying records 11 times .But there are 10 records in a pf.(ie last record is displayed twice).How to display records only 10 times?
As400 Command to find the Name of the Program to which a Particular Module is Bound..? Ex: IC210AMR (*MODULE) is bound with Other Modules which Forms Program Object as IC210ABP(*PGM) . As400 Command to find the IC210ABP Using IC210AMR..? Thanks
How do you call procedures in ILE?
1.CA(command Atention key)& CF(command Function key) difference with example?Please can any body tell me in real time exp? 2.Can any body tell me some mandatery function keys using while creating any screen with use of SDA-FUNCTION kEYS?
What is the length of Signature?
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?
what built in function can be used with SETLL.If you want to check whether the search argument is successful or not? Please give me answer with example?
I have a RPG program of 100 Lines and first line is to SETON indicator LR. Will the program execute rest of the 99 Lines?
What are the types of identifiers?
Hi friends, Can you give the solution for the below mention simple code.and explain.what is output D CHR1 S 4A INZ('PEN') D CHR2 S 10A INZ('MYGET') D CHR3 S 8A INZ('GOOD') D CHR4 S 22A INZ C MOVEL CHR1 CHR4 C MOVE CHR2 CHR4 C EVAL CHR4=CHR3 C MOVE CHR1 CHR4