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

what is *place and *auto keyword in prtf ?plz explain

0 Answers   CSC,


Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.

0 Answers  


How can i keyed a flat file in RPGLE

5 Answers   IBM, Wipro,


In how many ways a session/device error occurs,,, and what is the remedy for it?

3 Answers  


explain sflclr, sflend, sfldlt, and sflcsrrrn?

0 Answers   IBM,


can you debug ile rpg program using isdb?

0 Answers   IBM,


How can we access Interactive job LDA in Batch Job?. and How we can access a file in interactive QTEMP lib in Batch job?.

4 Answers   IBM,


I have one cl program which calls two rpg programs named a & b. I am loading a run time array in Pgm A and the control comes back to cl pgm. i call pgmb and I want to read the runtime array in pgmb which was loaded in pgma. How it can be acheived. I should not use any intermediate file or dataarea to store the loaded values.

2 Answers  


As400 Command to find the Name of the Program to which a Particular Module is Bound..? Ex: IC210AMR (*MODULE) is bound with Other Modules which Forms Program Object as IC210ABP(*PGM) . As400 Command to find the IC210ABP Using IC210AMR..? Thanks

5 Answers   CTS,


Can any one plz explain the concept of INFSR, *PSSR, INFDS AND PSDS, I' confusing about PSDS and *PSSR, Wat is the difference btw them, wat PSDS will do????

1 Answers  


what was the robotech rpg?

0 Answers   IBM,


What would be the effect on the field where reverse image, underline and high intensity?

7 Answers   IBM,


Categories