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 |
can anybody explain significance of *loval setll with example code????
can I touch the array during treatments?
Need a sql query: retrieve all duplicate records in table?
what was the robotech rpg?
why we do STRSRVJOB in batch debugging in as400
How do you proceed in case your active AS400 session has got disconnected suddenly, how can you get back to your session ? Is it possible??
ESCAPE message sent by child program can be handled by parent program using which keyword?
1.I Have a physical file , i want to read the data from the each and every member of the File in the CL Program.How do you achieve this. 2.How do you do the same in RPG?. do think is it possible to read data from all the members in the RPG?
i have 6 char field in program, but this field is using in all files i want to chage field size as 10 char , how can i do this except using *like defn...?
Difference between creating a report using Printer file and WRKQRY(Query Report) ?
while i am using the dspmsg command on comman line in Mocha am getting error like Not authorized to message queue message my messagequeue Name? can anybody help me how to change my message queue Am anable to see my messages in message queue
how to display all the members records in a physical file without using ovrdbf?