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 |
There is a excel sheet having details of Old account number and new account number. I need to update these details in my AS400 files. i.e. all the records having old account number should be replaced with new account number. There can be 100 or 200 or 300 PFs...no fix files known. how can we do this?Solution should be performance oriented
How can we know running job is batch or interactive?
without logical file we cannot access the data in physical file.but we specify physical file in the program(ie:- Ffile IF E k disk).how can it be accessed?
Can someone tell me tell me what is meant by message wait...?
can any one help in hawkeye and turnover or any change management system plzzzzz or send the documents to my mail id :gvsp.as4@gmail.com
how we retrieve records without using key field (ex:name) from Physical File through RPG in as/400?
difference betwen keywords and opcodes
I want to declare the number of elements of an array dynamically in RPGLE ? Is it possible? If yes, then how do I do it ?
I want my simple Green screen should refersh every 1 min ,How can I do it..? Please share the logic
I have two sessions S1 & S2 under this 3 jobs(say j1,j2,j3 under session S1) And 2 jobs(Say j4, j5 Under session S2)is running. How many QTEMP & how many LDA will create for the same.
How we will read call stack?
How to read a record from file where there is multiple record occurrence is available?