How to update physical file in rpgle without using display
file?
Answer Posted / anurudh dwivedi
this can be done wid 2 methods
1.Interactive SQL
2.Embedded Sql
1. In interactive Sql
Strsql(Command line)
update pf001
set sal=sal+30
where id=1
2. same in embedded sql but save your object of type SQLRPGLE
c/exec sql
c+ update LIB1/pf001 set sal = sal + 30 where id=1
c/end-exec
save and compile(when u will compile,,,, u would be shock!!! update will not work)
but after following steps:
journaling it will work.
| Is This Answer Correct ? | 13 Yes | 0 No |
Post New Answer View All Answers
We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?
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?
Interviewer asked me write down DDS for load all subfile .can anybody write dds
what do you mean by an input subfile, what are the keywords required?
which program rpg or cl is efficent to update a transaction onto a database file and why ?
How many program bind in one module....
how does the rpg element work?
How to call one program from another program in RPG? please help me with the code
Explain mdt?
How would display prime numbers using CL program?
how do I preserve and clean the array?
How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique
what is kids-rpg?
can I touch the array during treatments?
can anybody help me to solve this problem. the program that i m checking display error message saying "Record format for file AJDSPFFD does not match model file and decimal error. how to solve this problem. The AJDSPFFD is snapshot the AJTLOG that is the audit trail list.