Have a join logical file with more than one members with
different record formats. So how can we read the different
members from this file and also how we can read the
different record format from the join logical?
Answer Posted / keshar
Addition to above answer to read particular member in file
we can use OVRDBF command in CL. This will pointed out to
particular member and then we can do any operation.
Syntax:
OVRDBF FILE(file1) MBR(mbr1)
In RPG we can read particular member by keyword EXTMBR in F
specification.
The EXTMBR keyword specifies which member of the file is
opened. You can specify a member name, '*ALL', or '*FIRST'.
Note that '*ALL' and '*FIRST' must be specified in quotes,
since they are member "names", not RPG special words. The
value can be a literal or a variable. The default
is '*FIRST'.
The name must be in the correct case. For example, if you
specify EXTMBR(mbrname) and variable mbrname has the
value 'mbr1', the member will not be found. Instead, it
should have the value 'MBR1'
example:
Ffile1 IE K DISK EXTMBR('MBR1')
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
are there any useful c runtime apis that I can call from rpg iv?
what is data area and how it is used in rpg program ?
what is kids-rpg?
When it is desirable to describe files Internally?
Explain mdt?
What is the purpose of record level identifier?
how can I tell when to replace the array?
1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.
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.
What is file identifier where we can use?
during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.
Interviewer asked me write down DDS for load all subfile .can anybody write dds
what is the difference between do while and do until?
How Chain operation copies the record's data to the input buffer for the program?
How to select highest score of each subject or how to select highest income of every month?