× 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.


  • Subject: Re: subfiles - can't get COBOL program to recognize control record
  • From: "Simon Coulter" <shc@xxxxxxxxxxxxxxxxx>
  • Date: Tue, 30 Jun 98 22:00:02 +1000

Hello Mary,

It's a bit hard to diagnose the problem without some code but here are some 
fragments from a working COBOL 
subfile program.  DSPF03 is the display file name; it contains the subfile 
control record DSPCR03.  I hope 
this helps.  If not then show some code.

* Screen panel display file
      SELECT PURCHASE-ORDER-SFL
        ASSIGN TO WORKSTATION-DSPF03
        ORGANIZATION IS TRANSACTION
        ACCESS IS DYNAMIC
        RELATIVE KEY IS SFL-RRN.

 DATA DIVISION.
   FILE SECTION.
   FD PURCHASE-ORDER-SFL.
   01 PO-DSP-RCD.
      COPY DDS-ALL-FORMATS OF DSPF03.

   WORKING -STORAGE SECTION.
   01 SFL-RRN     PIC 9(4)  VALUE ZERO.
   01 SCREEN-INDICATORS.
      05 IN71     PIC 1.
         88 SFLDSP-ON       VALUE B"1".
         88 SFLDSP-OFF      VALUE B"0".
      05 IN72     PIC 1.
         88 SFLDSPCTL-ON    VALUE B"1".
         88 SFLDSPCTL-OFF   VALUE B"0".

 WRITE-PANEL.
* If we have records in the subfile ...
     IF SFL-RRN > ZERO
        SET SFLDSP-ON TO TRUE
     ELSE
        SET SFLDSP-OFF TO TRUE
     END-IF.

     SET SFLDSPCTL-ON TO TRUE.

     MOVE CORRESPONDING SCREEN-INDICATORS TO DSPCR03-O-INDIC.

     WRITE PO-DSP-RCD
        FORMAT IS "DSPCR03"
     END-WRITE.

Regards,
Simon Coulter.

//----------------------------------------------------------
// FlyByNight Software         AS/400 Technical Specialists
// Phone: +61 3 9419 0175      Mobile: +61 0411 091 400
// Fax:   +61 3 9419 0175      E-mail: shc@flybynight.com.au
// 
// Windoze should not be open at Warp speed.
 

//--- forwarded letter -------------------------------------------------------
> X-Mailer: Internet Mail Service (5.0.1460.8)
> Date: Mon, 29 Jun 98 08:45:00 -0500
> From: "Mary Koetting" <Mary_Koetting@mail.mchcp.org>
> To: "'MIDRANGE-L@midrange.com'" <MIDRANGE-L@midrange.com>
> Reply-To: MIDRANGE-L@midrange.com
> Subject: subfiles - can't get COBOL program to recognize control record

> 
> I'm writing a COBOL subfile program and when I write the control record with
> the format as the control, it will not recognize the record as a valid
> record. 
> 
> To display the subfile, I have the indicator for the SFLDSP and SFLDSPCTL
> both on. I know there is some sort of table that the system keeps track of
> valid record types that can be written and read but I don't know how to
> display this list. 
> 
> We have RPG subfile programs which work but I think this is the first COBOL
> subfile program.  
> 
> Any help is greatly appreciated. Thanks
> +---
> | This is the Midrange System Mailing List!
> | To submit a new message, send your mail to MIDRANGE-L@midrange.com.
> | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
> | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---
> 

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.