Re: SOURCEFORMAT AND COPY LIBRARY
- From: "Fred Exley" <fexly221@xxxxxxx>
- Date: Tue, 26 Apr 2005 13:41:23 -0700
"Chuck Stevens" <charles.stevens@xxxxxxxxxx> wrote in message
news:d0n6it$1u3d$1@xxxxxxxxxxxxxxxxxxxxxxx
>
> "Russell" <rws0203nospam@xxxxxxxxxxx> wrote in message
> news:Xns9614859EB4A3rws0203comcastnet@xxxxxxxxxxxxxxxxx
>> "William M. Klein" <wmklein@xxxxxxxxxxxxxxxxx> wrote in
>> news:mfqXd.4498720$f47.804910@xxxxxxxxxxxxxxxxx:
>>
>> > Russell,
>> > The rules that you describe are useful for source code that needs to
>> > be
>> > "valid" for BOTH an '85 (fixed form reference format only) and an '02
>> > Compiler (either fixed form or free form reference format).
>> >
>> > If, on the other hand, one is creating source code that will be valid
>> > for fixed or free form reference format BUT only for compilers that
>> > support the '02 Standard's source code (not extensions to the '85
>> > Standard), then the follow rules work:
>> >
>> > 1) leave columns 1-7 blank (spaces)
>> > 2) do not have source code past the R-margin (defined by this
>> > implementer) for fixed form reference format
>> > 3) Use *> to indicate comment lines (starting in column 7 or later)
>> > 4) Use >>D to indicate debugging lines
>> > 5) Use >>PAGE directive (instead of "/" in column 7)
>> >
>> > Source code following the above rules WILL compile successfully in
>> > either fixed or free form reference format - for any compiler
>> > supporting the '02 Standards rules (whether they do or don't support
>> > the rest of that Standard)
>> >
>>
>> It always helps to ask someone that knows what they are talking
>> about. I wonder if anyone actually needs to have this level of
>> compatibility between radically different compilers.
>>
>> The reason that I thought of this would be someone that wants to
>> start using free form cobol in a large system. It would be quite some
>> time before you get around to converting ALL of the programs to freeform,
>> and until you do, the copys are going to need to useable in both fixed
>> and free form.
>>
>> The solution that puts a compiler directive at the top of each copy
>> setting fixed format, and another directive at the end setting free form
>> is obviously not going to work for the programs that have not been
>> converted to freeform yet.
>>
>> And who wants TWO sets of copys.
>>
>> I suppose that you could use conditional compiles ($IF) and a
>> constant to handle this problem, assuming that your compiler has this
>> capability. I have done that sort of thing to try and add an additional
>> working storage copy to multiple programs without editing them, when a
>> change to a commonly used procedure copy requires the new copy file.
>
> Russel, I think the standard covers this.
>
> The default reference format for library text is the format that was in
> effect for the COPY statement. A SOURCE FORMAT directive that is the first
> line of library text can be in either fixed form or free form. And if a
> SOURCE FORMAT directive is in library text, it is in effect until either
> another SOURCE FORMAT directive is encountered *in the library text*, or the
> end of the library text is reached. (ISO/IEC 1989:2002 page 57, 7.2.18.2,
> SOURCE FORMAT directive, general rules.) .
>
> -Chuck Stevens
Has anybody actually DONE a large-system conversion from fixed to free-format?
I'd imagine the benefits of freeformat would be tremendous over the tedious
editing always required in fixed, but I'm just guessing. Any real experience
with this issue out there? Thanks -Fred
.
- Follow-Ups:
- Re: SOURCEFORMAT AND COPY LIBRARY
- From: William M. Klein
- Re: SOURCEFORMAT AND COPY LIBRARY
- Prev by Date: Re: COBOL and XML (was Re: OT - "lie" vs "error")
- Next by Date: Re: HTML Template for Small Online Newspaper?
- Previous by thread: OT - yet another OT thread
- Next by thread: Re: SOURCEFORMAT AND COPY LIBRARY
- Index(es):
Relevant Pages
|
|