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 |
Can you copy the records created by the OPNQRYF to other files and how?
what happens when sflsiz = sflpag? What are the advantages and disadvantages?
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?
Can anybody tell me, does CL/400 handle LEVEL check while running the CL program....? plz share your experience...
Can somebody tell me that, Is it possible to read all the member of PF without OVRDBF?
I have a RPG program of 100 Lines and first line is to SETON indicator LR. Will the program execute rest of the 99 Lines?
Can a run time array be declare like below with no specified number of elements ? Is it possible ? DFLD_ARRAY 7 DIM() INZ(*blanks) What does this mean ? Does this mean that the number of array elements will be dynamically declared during run time ?
how to retrieve particular field records from a physical file,say i have a physical file called 'employee' in it i have to retrieve the records of a field 'admin' present in pf 'employee' using rpg,but i should not use logical file or openquery file.
what is estimation? and what is the level identifier parameter in PF?
I am Submitting one job in batch that job calls three progams(PGMA, PGMB, PGMC). PGMB should be called after sucessfully completion of PGMA as like for PGMC also. So Can you please tell me how can we do that (without using data area)
during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.
program to find the number of objects used in a given program through a display.