Kbase 17728: Does Progress/400 Support Logical Files Built Over Multiple Members In A Physical File?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/15/2008 |
|
Status: Verified
GOAL:
Does Progress/400 Support Logical Files Built Over Multiple Members In A Physical File?
FACT(s) (Environment):
Progress/400 DataServer
FIX:
PROGRESS/400 cannot support logical files that have been built over multiple members in a physical file.
For example, physical file SAMPLE contains member M1, M2, M3 and M4.
If the logical file SAMPLEL is created over SAMPLE and the ADDLFM (Add Logical File Member) is entered as follows:
ADDLFM FILE(SAMPLEL) MBM(SAMPLEL) DTAMBRS
((*CURRENT/SAMPLE (M1 M2 M3 M4))
then the member SAMPLEL is added to the logical file SAMPLEL over all the members included in the DTAMBRS parameter.
PROGRESS/400 uses relative record numbers for its internal processing and positioning. The DataServer cannot position to a record in a structure such as this because ILE/C does not directly support it.
However, to workaround this restriction, user can create matching members in both the logical and physical files.
ADDLFM FILE(SAMPLEL) MBR(M1) DTAMBRS((*CURRENT/SAMPLE (M1))
ADDLFM FILE(SAMPLEL) MBR(M2) DTAMBRS((*CURRENT/SAMPLE (M2))
ADDLFM FILE(SAMPLEL) MBR(M3) DTAMBRS((*CURRENT/SAMPLE (M3))
ADDLFM FILE(SAMPLEL) MBR(M4) DTAMBRS((*CURRENT/SAMPLE (M4))
When data is required from member M4, the PROGRESS/400 QCMD facility
can be used to close the file and then override it to member M4. The
following 4GL code illustrates this:
DO TRANSACTION:
CREATE qcmd.
ASSIGN cmd = "!CLOSE SAMPLE".
RELEASE qcmd.
CREATE qcmd.
ASSIGN cmd = "!OVRDBF FILE(SAMPLEL) TOMBR (M4)".
RELEASE qcmd.
CREATE qcmd.
ASSIGN cmd = "!OVRDBF FILE(SAMPLE) TOMBR (M4)".
RELEASE qcmd.
END.
The following code can successfully retrieve the correct record from
member M4:
FOR EACH sample USE-INDEX SAMPLEL ....