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



Hello Simon,

Thanks for the complete COBOL solution - I'm also interested in what would be
your ideal solution of communication between programs and processes.

Thanks to all other correspondents

Regards,

Chris






"Simon Coulter" <shc@flybynight.com.au> on 11/01/2000 20:20:55

Please respond to COBOL400-L@midrange.com

To:   cobol400-l@midrange.com
cc:    (bcc: Chris Chambers/London/V2 Music)
Subject:  Re: DTAARA in COBOL





Hello Chris,

Using the LDA is similar in both OPM and ILE COBOL but using a *DTAARA in OPM
COBOL requires
calling another (usually CL) program which can handle data area objects.

The ILE COBOL Programmer's Guide has information in section 3.2.5.6 on using
both the LDA and
a *DTAARA.  Aside from the fact that data areas, and the LDA in particular, are
a pretty
crappy way of communicating between programs and processes.

The LDA must be defined in the SPECIAL-NAMES section as LOCAL-DATA.  Then use
ACCEPT (format
4) and DISPLAY (format 2) statements to read and write.

     ENVIRONMENT DIVISION.
     SPECIAL-NAMES.
          LOCAL-DATA IS LDA.

     DATA DIVISION.
     WORKING-STORAGE SECTION.
     01 LDA-FIELDS.
       03 ORDNBR    PIC S9(6) VALUE ZERO.
       03 ORDAMT    PIC S9(9)V9(2) PACKED-DECIMAL VALUE ZERO.

     PROCEDURE DIVISION.


       * Fetch contents of LDA
     ACCEPT LDA-FIELDS FROM LDA.


       * Write data to LDA
     DISPLAY LDA-FIELDS UPON LDA.

Data areas are must be defined in the SPECIAL-NAMES section as DATA-AREA.  Then
use ACCEPT
(format 9) and DISPLAY (format 5) to read and write.

     ENVIRONMENT DIVISION.
     SPECIAL-NAMES.
          DATA-AREA IS STUFF.

     DATA DIVISION.
     WORKING-STORAGE SECTION.
     01 DTAARA-FIELDS.
       03 ORDNBR    PIC S9(6) VALUE ZERO.
       03 ORDAMT    PIC S9(9)V9(2) PACKED-DECIMAL VALUE ZERO.

     PROCEDURE DIVISION.


       * Fetch contents of data area
     ACCEPT DTAARA-FIELDS FROM STUFF
          FOR "MYDTAARA" LIBRARY "MYLIB".


       * Write data to data area
     DISPLAY DTAARA-FIELDS UPON STUFF
          FOR "MYDTAARA" LIBRARY "MYLIB".

Regards,
Simon Coulter.

«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
«» FlyByNight Software         AS/400 Technical Specialists       «»
«» Eclipse the competition - run your business on an IBM AS/400.  «»
«»                                                                «»
«» Phone: +61 3 9419 0175      Mobile: +61 0411 091 400           «»
«» Fax:   +61 3 9419 0175      mailto: shc@flybynight.com.au      «»
«»                                                                «»
«» Windoze should not be open at Warp speed.                      «»
«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
//--- forwarded letter -------------------------------------------------------
> Date: Tue, 11 Jan 2000 18:05:01 +0000
> From: Chris.Chambers@v2music.com
> To: cobol400-l@midrange.com
> Reply-To: COBOL400-L@midrange.com
> Subject: DTAARA in COBOL

>
> Can anyone point me in the right direction to demonstrate how to access a data
> area in COBOL other than the LDA.
>
> I need to access an  area created by CRTDTAARA and also the *LDA within one
> program.

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






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.