Home > Archive > Cobol > March 2005 > COPYEXT, COPYLBR, COPYLIST, FOLD-COPY-NAME, OLDCOPY
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 |
COPYEXT, COPYLBR, COPYLIST, FOLD-COPY-NAME, OLDCOPY
|
|
| apknight 2005-03-14, 3:55 am |
| I can't have MF COBOL COMPILER.. but I must study MF COBOL..
ㅠ.ㅠ
so.. I have many question ^_^... ( so often found me here )
I found followed Text.. cobol lnaguage reference
In addition to Compiler directives which provide flagging and modify
the reserved word list, the following directives may impact either the
syntax or the semantics described in this section.
* COPYEXT - specifies the filename extension to be used for
locating copy files.
* COPYLBR - specifies that library-names are equivalent to .lbr
files.
* COPYLIST - causes the result of a COPY statement to be included
in the listing file.
* FOLD-COPY-NAME - allows the Compiler to find a copy library
member when the library name on disk and the text-name in the COPY
statement do not use the same upper-case and lower-case letters for
the library member name.
* OLDCOPY - changes the handling of COPY statements to match the
ANS'68 and OS/VS COBOL LANGLVL(1) rules.
..................................................................
What is .lbr file?, and COPYLIST is automated set by COPY Statement?
One More... FOLD-COPY-NAME'S value is TRUE/FALSE ? or Y/N? or other? (
needs..example)
| |
| James J. Gavan 2005-03-14, 3:55 am |
| apknight wrote:
> I can't have MF COBOL COMPILER.. but I must study MF COBOL..
> ㅠ.ㅠ
><snip>
Oh dear, and I know you have a problem with English. Obviously you are
reading your manuals - but - very often to confirm specifics, ask Micro
Focus, Go to and sign up at :-
http://www.cobolportal.com/microfoc...m/agreement.asp
Then you can ask for clarification where you are stuck.
However. having said that, I think you are going overboard trying to get
a handle on every conceivable piece of syntax that fits your current
query. Don't do that. Keep it simple and use DEFAULTS. Later on you can
get fancy and modify.
It maybe that you have a current genuine need to use some of the
features - so accept my answers on the basis that I am assuming you
don't have a need.
Forget all those wretched Directives, (UNLESS you have a current need to
use one - for simplicity use what I previously showed you :-
copy "Customer.cpy". - that will get you there to fit most of your needs
>
> * COPYEXT - specifies the filename extension to be used for
> locating copy files.
Why use ? call them "xxxx.cpy" as I have above - then you can easily
identify ALL your copyfiles by the file extension "cpy"
>
> * COPYLBR - specifies that library-names are equivalent to .lbr
> files.
>
Instead of copy "Customer.cpy" it's looking for copy "Customer.lbr".
Never used it. Why would I put a "CustomerRecord" in a library. For that
matter why would I include a set of library routines in a source
program. To my thinking, I CALL those routines from the Library not
include them as a copy in the source.
> * COPYLIST - causes the result of a COPY statement to be included
> in the listing file.
Copying files into a source is meant to be a shortcut - why would you
want them repeated in program source files. Do you automatically print
Listings from compiles ? I don't - compiles invariably give you errors.
When you have a clean compile, then perhaps. But when you have tested
sufficiently THEN print hard copy - but again no real need for the
Directive - from the IDE just select your source and use the normal
Windows 'Print'
>
> * FOLD-COPY-NAME - allows the Compiler to find a copy library
> member when the library name on disk and the text-name in the COPY
> statement do not use the same upper-case and lower-case letters for
> the library member name.
>
Again one I've never used - check the CALL syntax; there are program
examples :-
CALL "Something" using... returning
> * OLDCOPY - changes the handling of COPY statements to match the
> ANS'68 and OS/VS COBOL LANGLVL(1) rules.
Why ? Do you have code which is ANSI 68 or OS/VS LANGLVL(1) ? Look under
CALL - there are program examples.
>
> .................................................................
> What is .lbr file?,
Build up a set of 'like minded' sources, (e.g. a set of file-handling
routines, or a set of Screen-Section routines etc.) into a library which
subsequently you can turn into a DLL (Dynamic Link Library). Get some
stuff cleanly compiled and working - then worry about LBR or DLL.
Query LBR and you will see it is associated with packaging and
distributing your application.
> and COPYLIST is automated set by COPY Statement?
Never used it - suggest answer is YES. Using Directive COPYLIST without
actually having any source COPY statements gets you nowhere.
I don't wish to appear rude, but I think you are concentrating too much
on every aspect of syntax. Get a broad view and backtrack as necessary,
as a need arises. The above link I gave you takes you to Answer Exchange
- but also go to the home page at microfocus.com and search for example
programs - you should be able to pick up a lot of tips from there.
Note, within Answer Exchange there is a currently un-indexed Knowledge
Base - that too might have an explanation for some of the things you
want to query.
Jimmy
| |
| Simon Tobias 2005-03-14, 3:55 pm |
| Hi.
I concur with Jimmy's summary, regarding not to get too worried about the
details, and sticking with the default compiler directives unless you have a
real need to override them (and I'm guessing you won't).
COPYLIST only affects the listing output -- within myapp.lst, you will see
the contents of any copy files, something like :
01 wibble PIC X.
*> This is mysub.cpy
01 flibble PIC X.
01 wobble PIC X.
along with your original source. Otherwise, you will just see something like
:
01 wibble PIC X.
COPY "mysub.cpy".
01 wobble PIC X.
FOLD-COPY-NAME is of more use on UNIX, where filenames are
case sensitive. Ideally, ensure you either stick with all lower-case or
all upper-case names.
SimonT.
| |
| William M. Klein 2005-03-16, 3:55 am |
| Why "must" you study MF (Micro Focus) COBOL - if you don't have access to a
compiler?
Besides the other replies on "don't get hung up on details and exceptions" - I
would say that studying a SPECIFIC dialect of COBOL (such as Micro Focus COBOL)
without the compiler is a "non-starter". You need to be able to "play with" the
specific compiler to understand how it differs from other compilers.
Do you have access to ANY COBOL compiler? If so which one? Again, if not, why
are you trying to study COBOL?
--
Bill Klein
wmklein <at> ix.netcom.com
"apknight" <apknight@gmail.com> wrote in message
news:95895e6d.0503131804.24b5cadb@posting.google.com...
>I can't have MF COBOL COMPILER.. but I must study MF COBOL..
> ㅠ.ㅠ
>
> so.. I have many question ^_^... ( so often found me here )
>
>
> I found followed Text.. cobol lnaguage reference
>
>
> In addition to Compiler directives which provide flagging and modify
> the reserved word list, the following directives may impact either the
> syntax or the semantics described in this section.
>
> * COPYEXT - specifies the filename extension to be used for
> locating copy files.
>
> * COPYLBR - specifies that library-names are equivalent to .lbr
> files.
>
> * COPYLIST - causes the result of a COPY statement to be included
> in the listing file.
>
> * FOLD-COPY-NAME - allows the Compiler to find a copy library
> member when the library name on disk and the text-name in the COPY
> statement do not use the same upper-case and lower-case letters for
> the library member name.
>
> * OLDCOPY - changes the handling of COPY statements to match the
> ANS'68 and OS/VS COBOL LANGLVL(1) rules.
>
>
> .................................................................
> What is .lbr file?, and COPYLIST is automated set by COPY Statement?
>
> One More... FOLD-COPY-NAME'S value is TRUE/FALSE ? or Y/N? or other? (
> needs..example)
| |
| James J. Gavan 2005-03-17, 8:55 am |
| William M. Klein wrote:
> Why "must" you study MF (Micro Focus) COBOL - if you don't have access to a
> compiler?
>
> Besides the other replies on "don't get hung up on details and exceptions" - I
> would say that studying a SPECIFIC dialect of COBOL (such as Micro Focus COBOL)
> without the compiler is a "non-starter". You need to be able to "play with" the
> specific compiler to understand how it differs from other compilers.
>
> Do you have access to ANY COBOL compiler? If so which one? Again, if not, why
> are you trying to study COBOL?
>
For apknight,
Bill is obviously smarter than Simon or myself, he spotted the first
line from your message where you wrote, or implied, you hadn't actually
got a Micro Focus compiler,
So what are you reading - is it a set of hard-copy manuals or are you
accessing the Micro Focus site for on-line manuals ?
If you really do want to pursue COBOL with Micro Focus, and subject to
your finances, there is a University Edition of Net Express 4.0 for
about $100 US. While this contains all the whistles and bells of Version
4.0 at time of publication, it is *only* a learning tool. You cannot
legally distribute applications using the compiler. In fact, but not
published, there is a maximum limit as to the number of lines of code
that any one source program can have.
If you do buy the University Edition - should you decide later to go for
broke and buy the full Professional Edition then I think Micro Focus
discount the money you have have already paid when buying the latter.
But the full product is NOT cheap nor is the current full Professional
Edition of Fujitsu.
If you can obtain it - there is an early Fujitsu Version 3.0, which is
free. But that's now a new game. While still 'common' COBOL, any
features they might have equivalent to Micro Focus Directives will be
entirely different. Now you are starting all over again.
Jimmy
|
|
|
|
|