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 call one program from another program in RPG? please help me with the code
give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........
what was the robotech rpg?
what is the rpg system?
Can more than one subfile record be displayed on one line?
Can we used ovrdbf command after the opnqry file if yes then What will be out put of your program?
is this a rpg channel?
Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?
How to index LF by relative record no (RRN)
how to check on which PF , the LF is dependant ?
In RPG program one file using as a PRIMARY file while running program some of the records reading twice any body know why its happening
can anyone explain aboutovrOVRDBF,OPNQRYF, OVRSCOPE and OPNSCOPE?