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
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?
how can I tell when to replace the array?
what do you mean by an input subfile, what are the keywords required?
what is the procedure and explain about real time scenario.
Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?
Interviewer asked me write down DDS for load all subfile .can anybody write dds
How to handle duplicate error handling in RPG?
What are the types of identifiers?
write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen
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
What is the difference between iter and do?
What is a record lock error?
What is the difference between copybooks and subprocedures in as400?
Explain mdt?
How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique