Hi Viewers can any body explain me how to update and ahange
the already existed data in physical file using subfile ?
please explain me with the code if possible?



Hi Viewers can any body explain me how to update and ahange the already existed data in physical fi..

Answer / dx

first read all records from physical file and move to subfile
then read change records from subfile format by opcode READC
in loop it will work

eg- readc sfl 56
*in56 downe *on
move dspfile physical file
updat sfl
enddo

Is This Answer Correct ?    7 Yes 0 No

Post New Answer

More RPG400 Interview Questions

i want to retrieve record b/w 2 dates in as400

2 Answers   L&T,


When will DUMP & DEBUG be ignored?

3 Answers   IBM,


i)What is the command to lock a file in a program ii)2. Can you get a level check error in a CL program

6 Answers  


1) How to define keyed file in CL pgm. 2) How can i read particular records in CL pgm from database file.

2 Answers  


how do u find whether a record is locked or not??/

5 Answers   CTS,






When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?

0 Answers  


two types of read performed in dataqueue?????

4 Answers   CTS,


Explain mdt?

0 Answers  


RPG/400 faqs?

1 Answers   HSBC,


i'm working on progA , in that program i want to see the userids of the users who work on this program?

10 Answers   Four soft,


Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?

0 Answers  


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?

2 Answers   Cap Gemini,


Categories