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
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 |
Answer / pankaj
You can specify only one record format in a join logical
file.
| Is This Answer Correct ? | 2 Yes | 1 No |
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 |
How to declare the pull button in AS/400..
what is the difference between SETON RT & RETURN?
i want code and what are used key words are ...like wrkmbrpdm screen (q) i have a file with 3 fields empno,empname,empaddr... here you give the empno it displays from that number to remaining empno's how? sub file screen: employee details pos to:empno then enter empno empname empaddr so file have 100 records from 1 to 100 so the above pos you give the 55 empno...it displays the from 55 to remaining... ...... please share this answel
How to identify the object has compiled with the debug view as *source without using STRDBG?
How to update only a field of a PF in an RPG program. I don't want to update the record, only one field.
suppose we have 10 members in physical file and i have to use 4 out of 10 so how can we read this in RPG
Can somebody tell me that, Is it possible to read all the member of PF without OVRDBF?
Let?s consider a variable X of length 20. Move value ?ABC? to it.How to determine how many characters does X have?
program to find the number of objects used in a given program through a display.
1.The questions have given an array declaration and move operation then this statement is correct or not?
A rpg or clp command to find if the file field is defined as a character or numeric field.
How can we override a file during runtime in rpg?