Code Comments
Programming Forum and web based access to our favorite programming groups.Rick Smith wrote: > "William M. Klein" <wmklein@nospam.netcom.com> wrote in message > news:IDNBg.223594$1Q1.150987@fe03.news.easynews.com... > > > > Yes, but exactly, and I ran the program to be sure that > the error still occured, as in the first program. > > > > defined as > > > record-length > > > > There are only 2 record lengths used, 1 and 2. I used > "to 10" to demonstrate the error that the maximum is > supplied and not the largest or the original. The program > makes no attempt to access the record unless the length > is 1 or 2. > > > > MF > > > > It was not a "typo". The implementation I am using is > 12 years old. Had I reported the error to Micro Focus, > the most likely response would have been to upgrade > to their latest and greatest. I would suggest your last paragraph is accurate Rick :-) Not sorting or merging Bill. I wonder if following is in anyway related. Remember way back me trying to get OO class file handling. I got it, but then wanted to go one step further, have a GENERIC class per file type - and it appeared you offered the solution :- Generic reference in say an ISAM Template file class. FILE-CONTROL. Select Data-File assign Data-filename organization indexed access dynamic record key Data-PrimeKey file status ws-FileStatus. FILE SECTION. FD Data-File record varying from 20 to 1500 characters *> +++ depending on ws-RecordSize. 01 Data-record. 05 Data-PrimeKey pic x(20). *> PPPP 05 Data-info pic x(1480). *> +++ The purpose being to handle both FIXED and VARIABLE record lengths - although I never actually used variable. (It meant that I could get away with four classes(programs) to handle any ISAM, Relative, Sequential and Line Sequential). It worked beautifully. Then I subsequently switched to SQL and DB Tables, completely forgetting about COBOL file types. Somebody in the M/F Forum queried using a Line Sequential Variable. So I adapted my file classes to indicate record-lengths, passing current record-length input (via Linkage) into ws-Record-Size and of course WRITING/REWRITING using ws-Record-Size, and as a result of READing I automatically get, within the file class, ws-Record-Size. (I even added code to stipulate that the template was being used for a *true* fixed length file or alternatively a *true* veriable length file). Wasn't aware of the DFE (Data File Editor) back then and only came across it when inadvertently opening an isam.dat from the IDE. Shows record contents plus packed fields Usage Display. BUT - given I had a current record of length, say 50 - looks like the DFE also contains a bunch of spaces all the way up to 1,500. Windows Explorer is useless to get file sizes as it rounds off figures. I have an old PC-Magazine routine DR.COM which lets you look at ANY file, (even if unintelligible), but that does give me a correct file size and it sure looks like my 50 character records have 1,450 trailing spaces to make up the declared max record size. Although the numbers are somewhat inconsistent for file sizes, they are still BIG. Did raise it in Forum, - but I'm afraid they balked. Jimmy
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.