|
>> COBOL isn't as smart as RPG. You have to tell it everything. Agreed to some extent - on the other hand you can at least use a variable to contain the format name. In RPG you have to code a separate statement for every perishing format. Jon Paris Partner400 > -----Original Message----- > From: cobol400-l-admin@midrange.com > [mailto:cobol400-l-admin@midrange.com]On Behalf Of Jay Sulzmann > Sent: Wednesday, July 24, 2002 2:26 PM > To: cobol400-l@midrange.com > Subject: Re: A little shudder here > > > See Winchester Terry's prior message. He has an example of both > a READ and > a WRITE. Note particularly "FORMAT" and INDICATORS ARE. > > COBOL isn't as smart as RPG. You have to tell it everything. > > Jay > > ----- Original Message ----- > From: "Joe Pluta" <joepluta@PlutaBrothers.com> > To: <cobol400-l@midrange.com> > Sent: Wednesday, July 24, 2002 2:21 PM > Subject: RE: A little shudder here > > > > > From: Jay Sulzmann > > > > > > I always set up 01-levels for each record format in > WORKING-STORAGE. In > > > other words, set up a 01-level, then do a COPY DD (as opposed to COPY > DDS) > > > on the record format name. > > > > Please forgive my ignorance here. This is REAL newbie stuff, I'm sure, > but > > let me show you what I'm working with: > > > > FILE-CONTROL. > > SELECT WRKSTN ASSIGN TO WORKSTATION-DSPF005 > > ORGANIZATION IS TRANSACTION > > ACCESS DYNAMIC RELATIVE KEY RRN > > FILE STATUS IS WS-STATS. > > > > FILE SECTION. > > FD WRKSTN LABEL RECORDS ARE OMITTED. > > 01 WRKSTN-REC. > > COPY DDS-ALL-FORMATS OF DSPF005. > > > > > > MOVE "CBL002" TO PGMNAM OF S00100-O. > > WRITE WRKSTN-REC FORMAT "S00100". > > > > > > Given this, I assume (bad, I know) that the COPY DDS-ALL-FORMATS is what > > brings in the definitions of the file, creating the magic "S00100-I" and > > "S00100-O" formats. This defines PGMNAM in my program. Then, since the > > compiler "knows" that S00100 is a format of WRKSTN-REC and that > WRKSTN-REC > > "belongs to" WRKSTN, the WRITE verb completes correctly. > > > > If I put 01-levels for each format in my working storage, what is the > syntax > > of the WRITE verb that associates the format with the workstation? > > > > Joe > > > > _______________________________________________ > > This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) mailing > list > > To post a message email: COBOL400-L@midrange.com > > To subscribe, unsubscribe, or change list options, > > visit: http://lists.midrange.com/cgi-bin/listinfo/cobol400-l > > or email: COBOL400-L-request@midrange.com > > Before posting, please take a moment to review the archives > > at http://archive.midrange.com/cobol400-l. > > > > > > > _______________________________________________ > This is the COBOL Programming on the iSeries/AS400 (COBOL400-L) > mailing list > To post a message email: COBOL400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/cobol400-l > or email: COBOL400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/cobol400-l. > >
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.