I have some doubts on subfile-----------
-----I wrote a prog on subfile to display the records.
Every thing is clear but i defined a field
called "opt" as
input field in subfile record format
from that input field i wish to enter into new
screen called "EDIT"
which i created it as a separate RCD in display
file. i gave opt as 2 for edit just like in WRKMBRPDM screen
please telll me the code and
how can i code for it in RPG.
Answers were Sorted based on User's Feedback
Answer / sachin
EQ
READC SFLRCD 90
*IN90 DOWEQ *OFF
OPT COMP 2 SR100
ENDDO
SR100 BEGSR (TO DISPLAY NEW RECORD FORMAT )
*IN12 DOWEQ *OFF
EXFMT RCD1
|
|
|
ENDDO
I TINHK ABOVE STUFF IS ENOUGH FOR U TO UNDERSTAND THE LOGIC
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / abhishek kumar
Use CSRLOC keyword to select the particular record. Once u
get the record, do what ever u want to do (e.g edit, etc)
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / guest
Asyou gave option edit, you have changed the existing
recore, so do,
Readc SFLRCD;
when option ='Edit'
move the diplay file fields to the database field.
Do chain on the basis of key to database file (to read and
lock record for update)
Update File rcdfmt;
Update SFLRCD;
Is This Answer Correct ? | 0 Yes | 2 No |
I have file with data as follows data 1 2 3 4 5 I need to read 1 and 5 ,then 2 and 4 then like.. upto end of file, can any one help on this
program to find the number of objects used in a given program through a display.
How to select highest score of each subject or how to select highest income of every month?
What is the difference between inner join @ outer join
what is flat file?
How can we receive values from a called procedure in CL?
Can anybody tell me in which scenario we have to use SQLRPG .(Embeded SQL)....?
what is a rpg?
give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........
What is the purpose of record level identifier?
How do you find out whether a record is present in the physical file without reading the file? for Example Employee No: 100 in an Employee master.How do we find out whther 100 is present in Employee master without reading the file?
11 Answers Bank Of America, CSC, IBM,
what is post opcode do