You are on page 1of 2

NOTE: With the more recent compilers the "DIALECT" directive does much of what I

am going to talk about here - via(semi-hidden) references to certain MF provided


"*.dir" files. If you want to "limit" your compile to a emulating a specific
dialect (or level of the Standard), check your product for this directive - and
which dialects are available.
NOTE2: Always consider using the SETTINGS directive "occasionally" to see
exactly which directives YOU are getting (by default, by directive selection,
and by *.dir file).
It is important to understand the difference between
Micro Focus's "reserved word" (mostly) and their "flagging" directives.
For example,
OSVS - provides support for ALL the reserved words in IBM's OS/VS COBOL
compiler (and does NOT turn off any from any other dialect)
while
FLAG(OSVS) (or FLAG"OSVS") says to flag syntax that is invalid in the OS/VS
COBOL compiler.
NOTE: MF does (correctly) indicate that some of the reserved word directives do
impact a FEW syntax/semantic issues. These are, however, few and far between
and can "generally" be ignored. They only come into play when the syntax that
is acceptable to two dialects yields different semantics - or if certain VERY
OBSCURE parsing rules come into play.
In general, MF allows programmers to turn on AS MANY different sets of reserved
words as they want - all in the same program. (Hence, the ability to have
TRANSFORM and Local-Storage Section - in the same program.). On the other hand,
it is "expected" that you will only have ONE "flagging" directive turned on at a
time.
As far as '85 Standard conformance goes, MF provides both
FLAG(ANS85)
and
FLAGSTD(x,y,...)
Both of these ACTUALLY provide "flagging" for "FIPS amended third standard
COBOL" - i.e. they include the intrinsic function as part of the "HIGH" level while the actual ANSI (and ISO) Standards called this "optional". I can't speak
for how MF is today, but when I worked for them,
FLAGSTD (FIPS flagging) - was a (little) more complete
but
FLAG(ANS85) (occasionally) provided more informative messages
Now, once a programmer has decided on which dialect's SYNTAX they want to
emulate, they then need to decide what level of message they want to receive for
syntax out of that level or emulation. This is what the FLAGAS directive does.
If you want an E-level message for each "flagging" message, then use FLAGAS(E).
(The CHANGE-MESSAGE directive can impact specific messages - increasing, but not
decreasing their severity level).
***
Bottom-Line:
If you do NOT have access to the "dialect" directive and want to insure that
you have JUST '85 Standard (with amendments) source code, you would nee to
specify (via default, directive or *.dir file)

NOOSVS, NOVSC2,NODOSVS,NOBS2000,NODG,NORM,NOXPOPEN,NOISO2002
(possibly more - depending upon your release/version of MF COBOL)
and most importantly
NOMF,ANS85
Plus
FLAGSTD(H) *> and if you are using RW, Debugging, or another optional module,
its support
or FLAG(ANS85)
Plus
FLAGAS(x) *> depending upon which level of severity you want
***
If you want to allow features from the ISO 2002 Standard, you would need to
change from NOISO2002 to ISO2002 and you would want to change to
FLAG(ISO2002)
(I don't know how much of ISO2002 this actually ALLOWS and what it flags, but I
do see it documented in the current MF documentation).
To "emulate" another compiler (e.g. IBM's Enterprise COBOL) you would want to
change both the "reserved word" directives and the flagging directives.
***
Other directives, e.g
- FLAGSINEDIT
- HIDE-MESSAGE
- WARNING
will impact where and which messages you see.
***
What I am talking about here is
what will (or will not) COMPILE (check) with or without messages. There are
entire OTHER sets of directives that impact "run-time behavior". There are
actually two types of these directives, For example:
Type 1 - Impact compiler "emulation"
- STICKY-LINKAGE
- PERFORM-TYPE
- ODOSLIDE
- IBMCOMP
- OLDNEXT-SENTENCE
- RDW
etc
Type 2 - impact CHOICES that other compilers (especially IBM mainframe ones)
also provide
- DYNAM (with NODYNAM "cancels" are NO-OPs)
- TRUNC (impacts picture truncation)
- QUOTE/POST (what does the QUOTE figurative constant "use")
etc

You might also like