Re: Revisiting an Old Prejudice: READ INTO/WRITE FROM

From: Rick Smith (ricksmith_at_mfi.net)
Date: 08/15/04

  • Next message: Richard: "Re: Revisiting an Old Prejudice: READ INTO/WRITE FROM"
    Date: Sun, 15 Aug 2004 02:19:13 -0400
    
    

    <docdwarf@panix.com> wrote in message news:cf7fe1$h31$1@panix5.panix.com...
    > In article <10hdso774o5b150@corp.supernews.com>,
    > Rick Smith <ricksmith@mfi.net> wrote:
    > >
    > ><docdwarf@panix.com> wrote in message
    news:cf684e$16l$1@panix5.panix.com...
    > >> In article <10hd3528rjphtad@corp.supernews.com>,
    > >> Rick Smith <ricksmith@mfi.net> wrote:
    > >> >
    > >> ><docdwarf@panix.com> wrote in message
    > >news:cf5mrl$c4p$1@panix5.panix.com...
    > >>
    > >> [snip]
    > >>
    > >> >> Mr Smith, I have no familiarity whatsoever with the 'tenor' of
    COBOL;
    > >> >> while what 'seems' can be dependent on who is observing what I asked
    is a
    > >> >> matter of fact: 'What is more likely to Go Wrong by holding to this
    > >> >> 'standard'?'
    > >> >
    > >> >Mr Dwarf, as I stated above, 'I cannot identify that which 'is more
    likely
    > >> >to
    > >> >GoWrong''.
    > >>
    > >> Many thanks, Mr Smith, for addressing the question I asked in so direct
    a
    > >> fashion.
    > >>
    > >> >The reason being, in part, that I have no experience from which
    > >> >to make such an identification. I have never used the practice you
    described
    > >> >and I do not recall ever having seen it used.
    > >>
    > >> Thanks again, Mr Smith, for being so forthright about the amount of
    > >> familiarity you have with the subject about which I am inquiring; it is
    > >> good to be able to know about the experiences one has had which go into
    a
    > >> public pronouncement.
    > >
    > >You are most welcome, Mr Dwarf. It is the comparative 'more likely'
    > >and the condition 'by holding to this 'standard'' that provides the
    > >difficulty.
    >
    > Well, Mr Smith... if it were easy then I might not have felt the need to
    > make this inquiry to so august a forum as this, no?
    >
    > >To give an example of a 'What', one must have experience of both.
    >
    > That could be why I structured the query as I did, Mr Smith; I related
    > what I had been taught and (as a result of this teaching) practised, along
    > with a half-remembered situation a few decades old on a platform which is
    > not the most common... and asked what others had learned and experienced.

    I am curious, Mr Dwarf, why did you include the restriction '(outside
    of that which can be chalked up to sloppiness, e.g. changing a key's
    position/length and not updating the WORKING-STORAGE layout
    to match) '? I ask because these types of errors appear to that which
    'is more likely to Go Wrong'. In each of the cases that comes to mind,
    the example you provided as, making 'the record layout in the FD ...
    as simple as possible', prevents certain compile time checks, for such
    'sloppiness', allowing this 'sloppiness' to become runtime errors and
    anomalies.

    Also, do I understand correctly that your making 'the record layout
    in the FD ... as simple as possible' is intended to enforce the
    'zero-tolerance rule' (which you mentioned as having been taught in
    your first COBOL class)? I ask this because both GC28-6403-0,
    "IBM System/360 Disk Operating System Subset American
    National Standard COBOL" (aka COBOL E), and GC28-6396-5,
    "IBM OS Full American National Standard COBOL" (aka
    COBOL F) show nearly identical sample programs for "Random
    retrieval and updating of an indexed file". These sample programs
    use only the file buffers for processing. The only item in working
    storage being the NOMINAL KEY for the indexed file. The
    updating of the indexed file record was the instruction
    'ADD CD-AMT TO DISK-AMT', followed by a REWRITE.
    Thus, not only are file buffers touched but arithmetic is done on
    an item in them. I wonder, Mr Dwarf, whether the instructors 'Thou
    Shalts' were the result of working with a non-conforming compiler.
    For example, if the instructor had problems with using, let's say, a
    COBOL 74 compiler for Wang VS and developed his 'Thou
    Shalts' based upon overcoming those problems; then was it
    COBOL or something else that was taught?

    I found that I had a similar experience ('sloppiness') when I updated
    a system. Different record descriptions were used to descibe a
    record, one a complete description in the FD, the other a PIC X(xxx)
    in working storage, which was used to hold a copy of the record,
    temporarily. When I modified some fields in the copy book for the
    complete description. I failed to notice the copy of the record.
    During testing the program failed. Needless to say, I was not happy
    with discovering this 'sloppiness'.

    I have one, personal, program in which I use READ INTO and
    WRITE FROM, exclusively. There was, at one point, eight record
    descriptions for the same record type. I chose to use COPY
    REPLACING (partial text replacement) to create unique data
    names for processing of the records in various procedures.

    Mr Dwarf, I have carefully reviewed a lot of material, including my
    experience, trying to find some rational basis for the general
    applicability of the 'zero-tolerance rule', I found none.


  • Next message: Richard: "Re: Revisiting an Old Prejudice: READ INTO/WRITE FROM"

    Relevant Pages

    • Re: Opinions on approach, please...
      ... COBOL that supports both forward and backwards "browsing" of ISAM, ... It isn't going to do anything with it :-) I'm hoping the RDB (SQL Server) ... Code conversion is much more tricky. ... The job of the MOST template is to "translate" these Indexed file actions ...
      (comp.lang.cobol)
    • Re: Opinions on approach, please...
      ... applications that use Indexed files to RDB. ... Conceptually, I want to add a Data Access layer to the existing COBOL, ... I plan to generate from a template, a module that ... The job of the MOST template is to "translate" these Indexed file actions ...
      (comp.lang.cobol)
    • Re: Opinions on approach, please...
      ... I haven't used START against an indexed file in a batch COBOL program very ... To emulate this I plan on using an SQL cursor. ...
      (comp.lang.cobol)
    • Re: Micro Focus Net Express® with .NET
      ... > code for indexed file access. ... I need to distribute the Fujitsu runtime for Windows (and own ... > I could find) I don't think there is COBOL integration for Winforms ...
      (comp.lang.cobol)