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
How Chain operation copies the record's data to the input buffer for the program?
How can we override a file during runtime in rpg?
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?
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?
How can we know running job is batch or interactive?
how do you use commitment control in rpg?
how do I declare a table or array in rpg iv?
What is the difference between copybooks and subprocedures in as400?
how do I play {insert rpg system here}?
what is the use of sflnxtchg?
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.
Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?
what is the necessary keyword needed to scroll subfile records?
is this a rpg channel?