|
Yes - this works fine in COBOL.
FILEA:
R
REC1
FLD1 10 FILEB:
R
REC1
FLD1 10 FILEAB:
UNIQUE
R REC1 PFILE(FILEA FILEB) K FLD1 Program FILEABTEST:
IDENTIFICATION
DIVISION.
PROGRAM-ID. FILEABTEST. ENVIRONMENT DIVISION. CONFIGURATION SECTION. INPUT-OUTPUT SECTION. FILE-CONTROL. * EXTERNALLY DESCRIBED PRINTER FILE SELECT FILEAB ASSIGN TO DATABASE-FILEAB ACCESS MODE IS SEQUENTIAL ORGANIZATION IS INDEXED RECORD KEY IS EXTERNALLY-DESCRIBED-KEY. DATA DIVISION. FILE SECTION. FD FILEAB. 01 FILEAB-REC. COPY DDS-ALL-FORMATS OF FILEAB. PROCEDURE DIVISION. MAIN-PROCESS.
OPEN INPUT FILEAB.
READ FILEAB DISPLAY REC1 READ FILEAB DISPLAY REC1 CLOSE FILEAB. STOP RUN. fileA contains 1 record: "FROM
FILEA"
fileB
contains 1 record: "FROM FILEB"
Run-time log:
call fileabtest
FROM FILEA FROM FILEB Can I
get back to work now?? :)
|
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.