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?

Answers were Sorted based on User's Feedback



Have a join logical file with more than one members with different record formats. So how can we r..

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

Have a join logical file with more than one members with different record formats. So how can we r..

Answer / pankaj

You can specify only one record format in a join logical
file.

Is This Answer Correct ?    2 Yes 1 No

Have a join logical file with more than one members with different record formats. So how can we r..

Answer / sarath

hi i am not able to find the extmbr in my f spec pls advice
if i am wrong.

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More RPG400 Interview Questions

suppose if we want to update the data in cl what we will do?

9 Answers  


how to change the length of the field in a physicalfile?

12 Answers  


What is file identifier where we can use?

1 Answers  


1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?

1 Answers  


steps for debugging two rpg programs????

4 Answers  


How to write record if no field or the field are different in physical file in rpgle ?

1 Answers  


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.

1 Answers   IBM,


What is ment by record level identifier?

1 Answers  


How to update selected fields from pf without using update opcode. How to read all member in Rpg-3,without using any cl command?

8 Answers  


How to add 2 new fields in a file? How many ways are there in as400?

2 Answers  


suppose a job is running for 15 minutes after that it goes to message wait? what are the impact analysis

1 Answers  


What is the difference between iter and do?

1 Answers  


Categories