Q. HOw can read multimember file through RPG/400 and CL/400
Actully i know that we can Read multimember file in RPG
through EXEFILE and EXEMBR and in cl through OVRDBF and
MEMBER(3)....But i want to read 3 members by CL Program And
RPG/400 program.Please write the coding(Program) for both
RPG/400 and CL/400 programs?
2.What are the full forms(stands) of EXEFILE and EXEMBR?

Answer Posted / abhishek bajpai

To read a multi member file.. u only need EXTMBR.
EXTFILE is used so that the name of the file is verified at
runtime and not at compile time. It is also used so that
the program opens the file from a desired library only (by
giving qualified name of the file as the parameter) and
not from the library list as usual.

To read the 3 members of a file..u must know the name of
the 3 members. On the F spec define the file with
EXTMBR(VAR1) USROPN
where Var1 is a variable. Before opening the file populate
Var1 with the member name in caps. And read the file.
In CL use OVRDBF as usual with the member name.

Is This Answer Correct ?    24 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

1. There is a file called Month. Month has 12 members called Jan, Feb, ..., Dec. How to design a rpg code which can access any member and show its content. (User can ask for any member when required)?

626


what is *inzsr used for?

1930


how do you pass parameters in cl?

1364


in conjunction with which statements can orxx and andxx conditions be used ?

1501


how many files can be defined in f specs?

1838


what are the different types of arrays available in rpg ?

1267


what is the purpose of ovrdta (override data) keyword?

1417


What is file information data structure(infds) in as400?

1218


how do you know that records are locked?

1547


define a shared access path?

1300


how may a cgi control duplicate inputs?

805


can we define multi-dimensional arrays in rpg ?

1266


how to run other job when one job is active?

782


what is the version of os/400 that we have?

1269


what are dds required for subfile?

789