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



I have some doubts on subfile----------- -----I wrote a prog on subfile to display the reco..

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

I have some doubts on subfile----------- -----I wrote a prog on subfile to display the reco..

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

I have some doubts on subfile----------- -----I wrote a prog on subfile to display the reco..

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

Post New Answer

More RPG400 Interview Questions

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

3 Answers   ISG,


program to find the number of objects used in a given program through a display.

2 Answers   IBM,


How to select highest score of each subject or how to select highest income of every month?

0 Answers  


What is the difference between inner join @ outer join

4 Answers  


what is flat file?

1 Answers   IBM,






How can we receive values from a called procedure in CL?

1 Answers   IBM, NTT Data,


Can anybody tell me in which scenario we have to use SQLRPG .(Embeded SQL)....?

2 Answers   HSBC,


what is a rpg?

0 Answers   IBM,


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...........

0 Answers   CTS,


What is the purpose of record level identifier?

0 Answers  


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

1 Answers   CTS,


Categories