Home > Archive > Cobol > April 2005 > SOURCEFORMAT AND COPY LIBRARY
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
SOURCEFORMAT AND COPY LIBRARY
|
|
| apknight 2005-03-14, 3:55 am |
| sorry. my english is very poor. so my text is not proof reading -_-a
If SOURCEFORMAT was FREE, Copy text was Fixed?
example:
$ SET SOURCEFORMAT "FREE"
IDENTIFICATION DIVISION.
PROGRAM-ID. Aroma96exam.
*STUDENT NAME .................................................
*STUDENT ID .....................................................
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
DATA DIVISION.
COPY "abc.txt".
..............
abc.txt was fixed or free?
01 dat1 pic x(10). <-?
01 data pic x(10) <-?
| |
|
| apknight wrote:
> sorry. my english is very poor. so my text is not proof reading -_-a
>
>
> If SOURCEFORMAT was FREE, Copy text was Fixed?
>
>
> example:
>
>
> $ SET SOURCEFORMAT "FREE"
>
> IDENTIFICATION DIVISION.
>
> PROGRAM-ID. Aroma96exam.
I'm not sure what compiler you're using, but the one I have (Fujitsu)
has settings for "Source Format" for both the program, and the copy
texts. Check the compiler's manual and see if SOURCEFORMAT can take two
arguments. :)
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
~ / \ / ~ Live from Montgomery, AL! ~
~ / \/ o ~ ~
~ / /\ - | ~ daniel@thebelowdomain ~
~ _____ / \ | ~ http://www.djs-consulting.com ~
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
~ GEEKCODE 3.12 GCS/IT d s-:+ a C++ L++ E--- W++ N++ o? K- w$ ~
~ !O M-- V PS+ PE++ Y? !PGP t+ 5? X+ R* tv b+ DI++ D+ G- e ~
~ h---- r+++ z++++ ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~
| |
| Fred Exley 2005-04-26, 8:55 pm |
|
"Chuck Stevens" <charles.stevens@unisys.com> wrote in message
news:d0n6it$1u3d$1@si05.rsvl.unisys.com...
>
> "Russell" <rws0203nospam@comcast.net> wrote in message
> news:Xns9614859EB4A3rws0203comcastnet@21
6.196.97.131...
>
> 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
| |
| William M. Klein 2005-04-26, 8:55 pm |
| "Fred Exley" <fexly221@msn.com> wrote in message
news:116t9rulvsb11e5@corp.supernews.com...
<snip>
> 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
>
I am not absolutely certain which compilers (if any) actually MATCH exactly the
'02 Free-/Fixed form reference format definition.
I do know for a fact, that there are many "sites" that have used the Micro Focus
and Fujitsu (and probably other) "free format" extensions to the '85 Standard.
These have varying degrees of similarity and differences to what is in the '02
Standard.
Of those on Micro Focus and Fujitsu, a number (possibly a LARGE number) are
taking code from IBM mainframe systems where they were forced to use '85
Standard fixed format (including A-/B-margin restrictions). Therefore, I assume
that some "conversions" have already taken place.
P.S. To whomever in this thread mentioned
$IF
conditional statements. If your compiler supports this format (and only this
format) then you have ANOTHER conversion ahead of you when/if they provide an
'02 conforming compiler. See (in the '02 Standard)
[color=darkred]
and[color=darkred]
(for example)
--
Bill Klein
wmklein <at> ix.netcom.com
|
|
|
|
|