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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.

2163


do you use message subfiles? What are the necessary keywords required coding a message subfile?

658


How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique

517


what are the key words you must use when using a subfile?

662


How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...

1283






are there any useful c runtime apis that I can call from rpg iv?

665


How many program bind in one module....

2083


What is a record lock error?

1239


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

1258


If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?

588


We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?

733


What is the difference between iter and do?

643


What are the types of identifiers?

546


explain sflclr, sflend, sfldlt, and sflcsrrrn?

844


Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?

1424