How to update physical file in rpgle without using display
file?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / mathan kumar
Ffile1 ufe disk
key chain rec1
if %found
update rec1
endif
| Is This Answer Correct ? | 10 Yes | 3 No |
Answer / sivaprasad
by using update opcode we can do the update before tht we
must read tht file
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / san
HERE EMPLIST IS MY PHYSICAL FILE I OPENED IN UPDATE MODE AND
NAME,ID,BRANCH,SEX IS THE PHYSICAL FILE FIELDS. IT IS VERY
EASY WAY JUST FIRST U HAVE TO READ THE RECORD FORMAT OF
PFILE AND EVALUATE THE VALUES WHICH U WANT INTO THE FIELDS
NOTE THAT FOR CHARACTER FIELDS SPECIFY THE STRING IN SINGLE
QUOTE AND NUMERIC WITHOUT QUOTES AND GIVE THE VALUES TO THE
FIELDS BASED ON THE LENGTHS WHICH U HAD DECLARED IN PFILE. I
THINK I EXPLAINED VERY BRIEFLY K CHEERS BYE KEEP LEARNING .
FEMPLIST UF A E K DISK
/FREE
READ E;
NAME = 'SAN';
ID = 12345 ;
BRANCH= 'CSE';
ADDR = 'HYDERABAD';
SEX = 'MALE';
UPDATE E;
*INLR = *ON;
/end-free
| Is This Answer Correct ? | 3 Yes | 1 No |
1.What is the Maximum field length we can declare in RLU?? 2. What is the difference if your designing RLU using DDS and using the option 19 for the RLU??
How can you determine the number of characters in a variable?
How can we receive values from a called procedure in RPG?
which MONMSG will give higher priority in CL program? I know MONMSG are of two types. Program Level Monmsg and Command Monmsg?
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
how to retrieve RRN value in RPGLE program
HOW TO DEBUG A BATCH JOB WHEN IT IS IN MESSAGEWAIT(MSWG) STATUS.I KNOW THE STEPS FOR BATCH DEBUGGING,BUT IM CONFUSING WITH WHEN WE SUBMIT ANY JOB FOR BATCH DEBUG WE PUT IN HELD STATE.SO HERE ALSO DO SAME THING OR ANY OTHER WAY,PLEASE HELP ME....
what is importance of 'MAPFLD' IN OPNQRYF FILE ?
write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen
can we perform CHAIN operation on Subfile record format....?
How do you call procedures in ILE?
How do I link an existing logical file to it's Physical File without recompiling?