Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to update physical file in rpgle without using display
file?

Answers were Sorted based on User's Feedback



How to update physical file in rpgle without using display file?..

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

How to update physical file in rpgle without using display file?..

Answer / mathan kumar

Ffile1 ufe disk
key chain rec1
if %found
update rec1
endif

Is This Answer Correct ?    10 Yes 3 No

How to update physical file in rpgle without using display file?..

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

How to update physical file in rpgle without using display file?..

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

Post New Answer

More RPG400 Interview Questions

what is importance of 'MAPFLD' IN OPNQRYF FILE ?

2 Answers  


When will DUMP & DEBUG be ignored?

3 Answers   IBM,


If I have a file with 5 record and that file has 2 Key field and I want to read the unique record of the file then how can we achieve it?

1 Answers  


parameters cannot be passed in which one???

4 Answers   CTS,


what is plat file?

6 Answers   Indian Infotech,


How I can reread the physical file in CL program once the end of file reached in same CL program.

20 Answers   IBM,


What you have to do in the display file when you are using message subfile?

1 Answers  


how we create binder member for updating service program and where we type this code on command line or in program ? strpgmexp pgmlvl(*current) export symbol (xyz0 endpgmexp. plz explain me this step by step .

2 Answers  


1. I have2 records in a PF. READ PF DO DSPLY EMPNO RETRN DSPLY EMPNO ENDDO What was the output 2. SETON LR vs RETURN 3. Primary File 4. How to delete a deleted spaces 5. How to read a PF in reverse order in CL 6. I have a object in Lib A, B and C. But it shows in D Lib..Why? 7.

4 Answers   HCL,


difference between 1:%found and %equal built function in detail with example .

6 Answers   Polaris,


Can we possible to key with the date field?

1 Answers   IBM,


1.what are the ARITHMETIC EXPRESSIONS IN CL PGM? 2.How to PASSING PARAMETER TO CL PGM?

1 Answers   NetCracker,


Categories