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 |
What hapens when we use CPYF command to copy a LF? On which PF will it be dependent???
why subproc not run in dftactgrp?????/plz explain
How can we read a particular record from the database file which is not having DDS (Flat File). For example, there are 100 records in the flat file. How can we retrive 15th record in RPG/400 program (Without using CL)
Hi, I am getting the error in RPG (All Record Formats for externally-described file ABCD ignored or dropped due to error; file ignored.) Please suggest any
HOW DO YOU DISPLAY A DISPLAYFILE AT OTHER WORKSTATION? CAN WE MOVE A PHYSICAL FILE? WITHOUT MOVING A FILE?
I know chain keyword retreive records randomly but how chain keyword exactly works internally????
How to code Page up and Page down in RPG for Single page subfile without using ROLLUP/ROLLDOWN in DSPF ?
what are the array operations?
If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?
How can i keyed a flat file in RPGLE
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?
Hi, can any one tell me :IN CASE OF SINGLE PAGE FILE HOW WILL I LOAD THE PREVIOUS PAGE WITHOUT THE USE OF SFLCLR INDICATOR ?