how to update physical files using normal logical file

Answers were Sorted based on User's Feedback



how to update physical files using normal logical file..

Answer / anand

in the above code file should be in update mode or file
addition mode

Is This Answer Correct ?    8 Yes 0 No

how to update physical files using normal logical file..

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

how to update physical files using normal logical file..

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

how to update physical files using normal logical file..

Answer / abhishek agrawal

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

Post New Answer

More DB400 Interview Questions

I had created one physical file tell me command to enter data in to?

1 Answers  


what is exception and how many types of exception

1 Answers   Active Brains,


How many libraries can be there in a library list?

2 Answers  


How to know logical file belongs to which physical file without source?

1 Answers  


How to know the particular record in pf with out reading?

0 Answers  


How to retrieve a physical file after deleting that?

0 Answers  


How many maximum record format a logical file have?

0 Answers  


how to restrict upon adding the data for field reference file in DB400

1 Answers  


Why we create the Physical File Member?

5 Answers  


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?

2 Answers   IBM,


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?

2 Answers  


How to index LF by relative record no (RRN)

0 Answers  


Categories