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.

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we override a file during runtime in rpg?

673


Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?

1449


what is file information data structure?

1345


what is the difference between do while and do until?

684


How to declare the pull button in AS/400..

1864






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.

2038


How many program bind in one module....

2103


Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?

497


how do I declare a minor?

701


How would display prime numbers using CL program?

5664


how can you display specific subfile page on the screen in unequal subfile?

664


is this a rpg channel?

663


what is the procedure and explain about real time scenario.

1461


What is ment by record level identifier?

639


What is the difference between iter and do?

655