|
The coding error :
DISPLAY-001.
MOVE SPACES TO FLD1 OF FMT1-O.
WRITE DISPLAY-RECORD FORMAT IS "FMT1".
MOVE 'MSGSFLCBL' TO PGMQ OF MSGSFLC-O.
WRITE DISPLAY-RECORD
FORMAT IS "MSGSFLC"
INDICATORS ARE WS-INDICATORS.
READ DISPLAY-FILE
INDICATORS ARE WS-INDICATORS.
#2 was the result of using
DATA DIVISION.
FILE SECTION.
FD DISPLAY-FILE01 DISPLAY-RECORD.
LABEL RECORDS ARE STANDARD.
01 DISPLAY-RECORD.
COPY DDS-ALL-FORMATS OF FS2CBL.
Thanks to Jerry Thomas for point the following:
COPY DDS-ALL-FORMATS OF FS2CBL
05 fs2cbl-record pic x(??). 05 FMT1-I redefines FS2CBL-RECORD.
05 FMT1-O redefines FS2CBL-RECORD.
06 SCFIELD pic x(10)
So when I moved values to the two fields, one "appeared" to be corrupted.
The resolution was:
always copy my different formats into a different are of working storage and
then reference them on the write. This keeps from overlaying data buffer.
FD SCREEN-FILE LABEL RECORDS ARE OMITTED.
01 SCREEN-RECORD PIC X(999).
WORKING-STORAGE SECTION.
01 DSPFMTA. COPY DD-DSPFMTA-O OF DSPEX05.
01 DSPFMTB. COPY DD-DSPFMTB-I-O OF DSPEX05.
01 DSPFMTC. COPY DD-DSPFMTC-I-O OF DSPEX05.
01 MSGFLC. COPY DD-MSGFLC-I-O OF DSPEX05.
.
WRITE SCREEN-RECORD FROM MSGFLC FORMAT IS "MSGFLC" INDICATORS ARE WS-SCREEN-INDICATORS.
CALL "CLRMSG".
WRITE SCREEN-RECORD FROM DSPFMTC FORMAT IS "DSPFMTC"
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.