× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Tom,



This was the example that I used.



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"







-----Original Message-----
From: cobol400-l-bounces@xxxxxxxxxxxx
[mailto:cobol400-l-bounces@xxxxxxxxxxxx] On Behalf Of Tom Liotta
Sent: Tuesday, April 21, 2009 6:53 PM
To: cobol400-l@xxxxxxxxxxxx
Subject: Re: [COBOL400-L] Message SubFile



Michael Smith wrote:



I am looking for a working example of a message subfile.



The example provided in the IBM manuals is flawed.



1> Coding errors, "MOVE 'MSGSFLCBL TO PGMQ OF MSGSFLC-O"



Michael:



I don't know what manual you're looking at, so not much can be said

about that. However, try comparing against this IBM doc:



http://tinyurl.com/cvgcyr or

http://www-01.ibm.com/support/docview.wss?uid=nas15f437b798fb17415862565c200
7d1556



2> I add an output field to the FMT1 and execute the code the value
of

PGMQ is corrupted with the value of SCFIELD.



a. MOVE 'SFLCBL' TO PGMQ OF MSGSFLC-O.

b. MOVE 'TESTPGM123' TO SCFIELD OF FMT1-O.



And I don't know what the DDS nor program code/structure looks like

after you made changes (nor really what the original looked like),

so I won't be much help there either.



Tom Liotta




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.