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 do I do concatenation in rpg iv, like I do in cl?
What is the OPEN and CLOSE accesspath?
How can we override a file during runtime in rpg?
How to add 2 new fields in a file? How many ways are there in as400?
I want to add 10 days in current date. how it is possible in CL program...?
When a object will be locked & when a record will be locked? Plz explain.
how do you use commitment control in rpg?
How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...
am 2010 passed out . can any one tell me which course is good to put 2+fake .guide me
How to check which are the pgms using 1 perticulate file.? I know there is many tool available for X-reference...but need to know is there any command available in the system...?
what are the types of identifers
1.find most occurrences of a character. for exm: input:aaabbbbdddddyyy output: d 5 times how can i get that?