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

how can we find setll setgt chain read reade readp operations are successfull or not,give example.explain in detail.

4 Answers   iSoft, Wipro,


How do you find whether a job is a batch job or interactive?

4 Answers  


can i use unique key in LF

3 Answers   TCS,


Can anybody tell me that why we use option(*nodebugio)in H- Spec?

3 Answers  


how do I declare a table or array in rpg iv?

0 Answers   IBM,






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?

0 Answers  


purpose of pannel group??/

2 Answers   CTS,


what is *place and *auto keyword in prtf ?plz explain

0 Answers   CSC,


How to read a record from file where there is multiple record occurrence is available?

1 Answers  


Can we journel logical file and access path? Can we use commitment control for non-join L.F?

4 Answers  


Can we possible to key with the date field?

1 Answers   IBM,


how many variables can we declare in cl pgm?

13 Answers  


Categories