how to update physical files using normal logical file
Answers were Sorted based on User's Feedback
Answer / anand
in the above code file should be in update mode or file
addition mode
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / keshar jain
HI,
To Update physical file in RPG use opcode UPDATE.
example
FLF1 IF E k DISK
key1 Setll LF1
READ LF1
UPDATE LF1
Note: Logical file should be simeple logical file. We can't
update physical file with help of Join logical file.
Is This Answer Correct ? | 9 Yes | 5 No |
Answer / anand
what Keshar Jain is saying is correct but open the logical file in update mode i.e FLF1 UF E k DISK
Is This Answer Correct ? | 2 Yes | 0 No |
Hi,,Whatever code written above is right...but opcode for
update in rpg is 'updat'...so the right statement will be
Updat flf1
Is This Answer Correct ? | 0 Yes | 5 No |
I had created one physical file tell me command to enter data in to?
what is exception and how many types of exception
How many libraries can be there in a library list?
How to know logical file belongs to which physical file without source?
How to know the particular record in pf with out reading?
How to retrieve a physical file after deleting that?
How many maximum record format a logical file have?
how to restrict upon adding the data for field reference file in DB400
Why we create the Physical File Member?
1. How can I create a LF using crtlf command based on a particular member in a multimember PF? Where I have to specify the member name? 2. How to differentiate between the types of join from a Join logical file DDS. Is it possible to have different types of Join Logical files? 3.Any performance difference between Opnqrf and Embedded SQL? When I should prefer Opnqryf and when SQL? 4. I know access path is the path chosen by the program to retrieve data. It can be of keyed access path or arrival sequence. *IMMED- *IMMED description says access path is updated each time record is added or deleted from a member. - What is updating here? *REBLD - The access path is completely rebuilt each time a file member is opened. The access path is maintained until the member is closed, then the access path is deleted. - I am not able to understand this completely. Could anyone explain these more clearly? 5.What is the purpose of using activation group. I know it is a resource allocator, but other than this any other benefits of using an activation group?
Where the QTEMP library will get created? if the the answer is QSYS, then howcome more than one job can create same library name(QTEMP) in QSYS? what is the uniqueness of QTEMP? For example, run the below command in different workstation WRKOBJ QSYS/QTEMP And take 8 in the option to check the description. both will have different info. so where(which LIB) exactly the QTEMP is stored?
How to index LF by relative record no (RRN)