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


Please Help Members By Posting Answers For Below Questions

how do I declare a minor?

716


how does the rpg element work?

716


What is file identifier where we can use?

652


what is the necessary keyword needed to scroll subfile records?

704


How can we know running job is batch or interactive?

656






how do I play {insert rpg system here}?

585


can any one help in hawkeye and turnover or any change management system plzzzzz or send the documents to my mail id :gvsp.as4@gmail.com

1968


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?

619


what is file information data structure?

1374


How would display prime numbers using CL program?

5680


What is a record lock error?

1267


explain sflclr, sflend, sfldlt, and sflcsrrrn?

889


When it is desirable to describe files Internally?

1188


thanks mr.Harshad R Suryawaunshi,i'm new to as400 i think you are telling in rpgile i know only rpg400 if possible can you tell in rpg400

1895


what is a rpg?

701