From: john on
None of my manuals or books cover this, but it is a feature of
Open Cobol. What is it used for?

John Culleton
From: Richard on
On Feb 12, 6:25 am, "j...(a)wexfordpress.com" <j...(a)wexfordpress.com>
wrote:
> None of my manuals or books cover this, but it is a feature of
> Open Cobol.  What is it used for?
>
> John Culleton

A 78 item is a constant. It cannot be changed at run time. The main
advantage of of 78 is that the compiler can calculate a value for it,
such as the size of a record area.



From: Howard Brazee on
On Thu, 11 Feb 2010 09:49:09 -0800 (PST), Richard
<riplin(a)Azonic.co.nz> wrote:

>A 78 item is a constant. It cannot be changed at run time. The main
>advantage of of 78 is that the compiler can calculate a value for it,
>such as the size of a record area.

Of course, optimizing compilers will do this anyway.

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison
From: James J. Gavan on
john(a)wexfordpress.com wrote:
> None of my manuals or books cover this, but it is a feature of
> Open Cobol. What is it used for?
>
> John Culleton

Smart people at Open COBOL ! It's not in the standard, an extension
introduced by Micro Focus, and extremely useful. I'm so used to using
it, perhaps quite minimal, (i.e. potential options), that I just think
Level 78 and not as Richard triggered in my mind CONSTANTS. He is right
on the button.

78 MaxNumberInList value 250.
78 LiteralHello value 'Hello World'.
78 LiteralHello2 value z'Hello World 2'.

I'm pushing my luck with Hello2 above - never done it - but if it works
the 'zed/zee' before the quote, indicates it finishes with an x"00".

I can't recall, but I don't think there are examples specifically
covering Level 78's; you find reference to them as you read sample code.
Check how Open COBOL's definition compares with following - the on-line
Manuals for Net Express V 5.1 :-

http://supportline.microfocus.com/documentation/books/nx51ws01/nx51indx.htm

Now I could have directed you to the exact page, but while you are at
this point, you might to do some other checking. So to get to Level 78s,
zip down the left Pane to Index, click and bring it up. Two references
to Level 78's in the numbered items before you hit alpha.

Two minimal examples above, but see the thread 'Day of Week' where their
use should be self explanatory. Should I run into the unforeseen problem
that somebody wants LONGERDayNames used in Bantu - say 35 characters,
I'm scuppered; but change the the appropriate Level 78s value and all
literal sizes are changed automatically - not quite magic - as Richard
says they are CONSTANTS; but do a re-compile and you are home and away.

The word CONSTANT - I'm reasonably certain it isn't in COBOL 2002,
because it was one of the last things, (J4-wise) Chuck Stevens did
before "We had to let him go' from Unisys.

Are you fortunate enough to belong to the J4-Docs-Eager-Readers Club ?
As one wag at Micro Focus put it, "I'm aware of the J4-Standard, but not
quite my cup of tea for bedtime reading".

Chuck took up the challenge to make some sense out of using 'Constant';
brave man. Bear in mind they, (J4) rejected M/F's Level 78 approach. So
Chuck had to do cartwheels going through the turgid way J4 put things
together, because of all the cross-referencing and qualification
coverage before you can do anything else. Well he did arrive at some
solutions, and knowing I was hot to trot on Level 78s, sent me examples
to check. Sorry, not my scene the abstract. Sure I can visualise whole
systems or broad outlines in my mind, but nitty-gritty shown in the code
he was proposing seemed a bit of a daunting to me - I need to shove it
through a compiler to test - well there isn't one.

I'm thinking their CONSTANT will never happen - bite the bullet - use
Micro Focus Level 78.

J4 has done some weirdos before. Back in around 2000 their current
chairman raised/resurrected the idea of a COBOL Database. At the time,
nothing to do with J4, but CLC (comp.lang.cobol users), there were
roughly a group of ten into discussing OO COBOL both Fujitsu and Micro
Focus.

At the time to me 'SQL' was a set of initials, but very vaguely knew
what it was. I queried with Thane Hubbell, (Teach Yourself COBOL in 24
Hours), instigator of the group and then serving as the Fujitsu J4 rep.
Wording doesn't matter but the point I raised - Why re-invent the wheel,
we have our own COBOL file standard, why mess around with DBs when they
were available in long-established tried and true fashion. He came back,
the J4 team at least had arrived at the same conclusion. Thank God !

Before I forget John. No match, no contest.

Disbelievers in OO here - something to the power of ten/100/1000
Believers in OO here - all two of us

Well I could throw in Michael W - as a third member of the brave :-)

Jimmy, Calgary AB
From: Alistair on
On Feb 15, 7:20 am, "James J. Gavan" <jgavandeletet...(a)shaw.ca> wrote:
> James J. Gavan wrote:
> Some examples follow :
>
> 78 UKVatRate                    value 0.17.
> compute VAT = SalesPrice + ( SalesPrice * UKVatRate )
>


>
> ******* Long time since I was involved with the intro for VAT in UK.
> Alistair is my formula correct ?

Vat rate has wobbled recently due to the recession. It dropped to 15 %
then, recently, went back up to 17.5 percent. The calculation is
basically right but prices are more likely to be with VAT inclusive so
you would probably end up having to deduct VAT. In the UK we pay VAT
at the time of purchase and then deduct it from VAT received when
submitting the VAT return to the Inland Revenue.

>


 |  Next  |  Last
Pages: 1 2 3 4 5 6 7
Prev: all
Next: Open Cobol is free and standard.