Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Accept / Display - an "environment variables
(Follow-on to other thread),

Currently, ANSI/ISO Standards allow for ACCEPT FROM DAY/DATE/DAY-OF-WEEK/TIM
E
(and "enhanced screen stuff")

All "other" ACCEPTS need to be to a mnemonic associated with "hardware-ish"
device via the Special-Names paragraph.

The reason that I mention this, is that IBM, Micro Focus, and possibly other
s
have an extension that allow one to directly reference such "hardware-ish"
device in the Procedure Division - NOT via the mnemonic-name, e.g.

Accept Some-Field from Sysout.

(This is marked as a "compatibility" feature with IBM's '74 Standard compile
r -
I don't know if it was an extension or part of that Standard.  I know it is 
NOT
allowed in the '85 Standard.)

I (personally) find it unlikely that J4/WG4 would add syntax/keyword such as

Accept whatever from ENVIRONMENT-NAME

There is certainly no guarantee that they would or would not reject this, bu
t my
best guess is that *IF* the ACCEPT/DISPLAY approach were used, that it WOULD
still be via a "mnemonic-name" associated in the Special-Names paragraph.

--
Bill Klein
wmklein <at> ix.netcom.com



Report this thread to moderator Post Follow-up to this message
Old Post
William M. Klein
05-26-06 11:55 PM


Re: Accept / Display - an "environment variables
"William M. Klein" <wmklein@nospam.netcom.com> wrote in message
news:%KGdg.14295$sY5.9484@fe10.news.easynews.com...

> The reason that I mention this, is that IBM, Micro Focus, and possibly
> others have an extension that allow one to directly reference such
> "hardware-ish" device in the Procedure Division - NOT via the
> mnemonic-name, e.g.
>
>    Accept Some-Field from Sysout.
>
> (This is marked as a "compatibility" feature with IBM's '74 Standard
> compiler - I don't know if it was an extension or part of that Standard.
> I know it is NOT allowed in the '85 Standard.)

Anything but a mnemonic-name defined in special-names in a Format 1 ACCEPT
is definitely an extension to the '74 standard, and from what I can see it's
an extension to the '68 standard as well (at least, IBM's reference manual
for DOS COBOL seems to think so).
> I (personally) find it unlikely that J4/WG4 would add syntax/keyword such
> as
>
>     Accept whatever from ENVIRONMENT-NAME
>
> There is certainly no guarantee that they would or would not reject this,
> but my best guess is that *IF* the ACCEPT/DISPLAY approach were used, that
> it WOULD still be via a "mnemonic-name" associated in the Special-Names
> paragraph.

That'd be the way I'd suggest going.  I'm not convinced anything needs to be
*added* to the language for ACCEPT/DISPLAY; the remaining piece is the
functionality of SET, as I see it, presuming the semantics of DISPLAY don't
work for that case.

-Chuck Stevens



Report this thread to moderator Post Follow-up to this message
Old Post
Chuck Stevens
05-26-06 11:55 PM


Re: Accept / Display - an "environment variables
"Chuck Stevens" <charles.stevens@unisys.com> wrote in message news:...
>
> "William M. Klein" <wmklein@nospam.netcom.com> wrote in message
> news:%KGdg.14295$sY5.9484@fe10.news.easynews.com...
> 

I'm no IBM expert, but getting input from what sure looks like something
that belongs in the output-only class seems decidedly counterintuitive to me
...

Kind of reminds me of something like
Select ... assign to paper-tape-punch
organization is indexed record key ...

Ummm... I for one would have some difficulty visualizing that ...

Could you perhaps have meant SysIN?    ;=)

Our default, by the way, is the equivalent of the IBM DOS "ACCEPT ... FROM
CONSOLE".

Our COBOL74 allows "ACCEPT ... FROM SPO" (would you believe SPO is a
mnemonic for "Supervisory Print Out" from B5000 days?) and "ACCEPT FROM ODT"
(where ODT is "operator display terminal" when we finally got away from
KSR33's), and it allows mnemonics "equated" to those terms in SPECIAL-NAMES.

Our COBOL85 is stricter; it requires a mnemonic for ODT or date/time
specifier after FROM and doesn't allow SPO as a mnemonic.

Neither one allows the (implicit, in the case of COBOL74, or explicit for
either one) mnemonic to refer to anything but the ODT.

-Chuck Stevens



Report this thread to moderator Post Follow-up to this message
Old Post
Chuck Stevens
05-26-06 11:55 PM


Re: Accept / Display - an "environment variables
I wondered who would notice that.  My mistake.  "Common" IBM usage is:

Accept whatever from Sysin
or
Display whatever upon Sysout

(There are a long list of "valid" things that can be used for Accept/Display
 -
e.g. CONSOLE, SYSIPT, etc)

--
Bill Klein
wmklein <at> ix.netcom.com
"Chuck Stevens" <charles.stevens@unisys.com> wrote in message
news:e57k7r$1cb5$1@si05.rsvl.unisys.com...
> "Chuck Stevens" <charles.stevens@unisys.com> wrote in message news:... 
>
> I'm no IBM expert, but getting input from what sure looks like something t
hat
> belongs in the output-only class seems decidedly counterintuitive to me ..
.
>
> Kind of reminds me of something like
>    Select ... assign to paper-tape-punch
>        organization is indexed record key ...
>
> Ummm... I for one would have some difficulty visualizing that ...
>
> Could you perhaps have meant SysIN?    ;=)
>
> Our default, by the way, is the equivalent of the IBM DOS "ACCEPT ... FROM
> CONSOLE".
>
> Our COBOL74 allows "ACCEPT ... FROM SPO" (would you believe SPO is a mnemo
nic
> for "Supervisory Print Out" from B5000 days?) and "ACCEPT FROM ODT" (where
 ODT
> is "operator display terminal" when we finally got away from KSR33's), and
 it
> allows mnemonics "equated" to those terms in SPECIAL-NAMES.
>
> Our COBOL85 is stricter; it requires a mnemonic for ODT or date/time speci
fier
> after FROM and doesn't allow SPO as a mnemonic.
>
> Neither one allows the (implicit, in the case of COBOL74, or explicit for
> either one) mnemonic to refer to anything but the ODT.
>
>    -Chuck Stevens
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
William M. Klein
05-26-06 11:55 PM


Re: Accept / Display - an "environment variables
Chuck Stevens wrote:
>
> "Chuck Stevens" <charles.stevens@unisys.com> wrote in message news:... 
>
> I'm no IBM expert, but getting input from what sure looks like something
> that belongs in the output-only class seems decidedly counterintuitive to 
me
> ...
>
> Kind of reminds me of something like
>     Select ... assign to paper-tape-punch
>         organization is indexed record key ...
>
> Ummm... I for one would have some difficulty visualizing that ...
>
> Could you perhaps have meant SysIN?    ;=)


Try this on for size, then: once upon a time when 32k was a big machine,
we were doing a Honeywell --> Univac conversion when we came upon the
phrase "rewind the printer".  Quite simple really; did you ever
encounter it?

PL

Report this thread to moderator Post Follow-up to this message
Old Post
Peter Lacey
05-26-06 11:55 PM


Re: Accept / Display - an "environment variables
No, can't say I have, although I can envision "CLOSE with NO REWIND" on a
printer, for a variety of historical (hysterical?) reasons ...

-Chuck Stevens

"Peter Lacey" <lacey@mts.net> wrote in message
news:44776731.ACF4997C@mts.net...
> Chuck Stevens wrote: 
>
>
> Try this on for size, then: once upon a time when 32k was a big machine,
> we were doing a Honeywell --> Univac conversion when we came upon the
> phrase "rewind the printer".  Quite simple really; did you ever
> encounter it?
>
> PL



Report this thread to moderator Post Follow-up to this message
Old Post
Chuck Stevens
05-26-06 11:55 PM


Re: Accept / Display - an "environment variables
COBOL for VSE

accept data-area from console
display data-area upon console
accept data-area from sysipt
accept data-area from sysin
display data-area upon syslst
display data-area upon syslist
display data-area upon sysout
display data-area upon syspch
display data-area upon syspunch


And somewhat related, for WRITE ADVANCING:
special-names.
C01 IS C01
CSP IS CSP
AFP-5A IS AFP-5A.
write fd-rec after advancing C01   *> skip to printer "channel 1"
write fd-rec after advancing CSP  *> suppress spacing
and my personal favorite
write fd-rec after advancing AFP-5A  >* special controls for Advanced
Function Printing(tm)

I don't really understand the point of special-names here.  We do generally
have it more like:
C01 IS CHANNEL-1
CSP IS SUPRESS-SPACE
AFP-5A IS AFP-CONTROL.
write fd-rec after advancing CHANNEL-1
write fd-rec after advancing SUPPRESS-SPACE
and my personal favorite
write fd-rec after advancing AFP-CONTROL

So I suppose the requirement to use special-names does make things a bit
more readible, but I don't really see why one cannot use the names
"directly", without utilizing special-names.
Ah well...

One thing I've never done is
special-names.
console IS cnsl.

display 'something' upon cnsl

It works, but it never occured to me I might want to do that, when
display 'something' upon console
seems (to me) to be quite obvious...

I suppose the special-names paragraph would be useful if I were converting
from COBOL/VSE to some other COBOL.  Then I could do something like...

special-names.
sysout is syslst
sysout is syspch
sysin is sysipt.

(Actually, that does not work because I've assigned two mnemonic names to
the same environment name.  Huh.  Seems like that should work...)

Frank

---
Frank Swarbrick
Senior Developer/Analyst - Mainframe Applications
FirstBank Data Corporation - Lakewood, CO  USA
 
I wondered who would notice that.  My mistake.  "Common" IBM usage is:

Accept whatever from Sysin
or
Display whatever upon Sysout

(There are a long list of "valid" things that can be used for Accept/Display
-
e.g. CONSOLE, SYSIPT, etc)

--
Bill Klein
wmklein <at> ix.netcom.com
"Chuck Stevens" <charles.stevens@unisys.com> wrote in message
news:e57k7r$1cb5$1@si05.rsvl.unisys.com...
> "Chuck Stevens" <charles.stevens@unisys.com> wrote in message news:... 
mnemonic-name, 
>
> I'm no IBM expert, but getting input from what sure looks like something
that
> belongs in the output-only class seems decidedly counterintuitive to me
...
>
> Kind of reminds me of something like
>    Select ... assign to paper-tape-punch
>        organization is indexed record key ...
>
> Ummm... I for one would have some difficulty visualizing that ...
>
> Could you perhaps have meant SysIN?    ;=)
>
> Our default, by the way, is the equivalent of the IBM DOS "ACCEPT ... FROM

> CONSOLE".
>
> Our COBOL74 allows "ACCEPT ... FROM SPO" (would you believe SPO is a
mnemonic
> for "Supervisory Print Out" from B5000 days?) and "ACCEPT FROM ODT" (where
ODT
> is "operator display terminal" when we finally got away from KSR33's), and
it
> allows mnemonics "equated" to those terms in SPECIAL-NAMES.
>
> Our COBOL85 is stricter; it requires a mnemonic for ODT or date/time
specifier
> after FROM and doesn't allow SPO as a mnemonic.
>
> Neither one allows the (implicit, in the case of COBOL74, or explicit for

> either one) mnemonic to refer to anything but the ODT.
>
>    -Chuck Stevens
>
>





Report this thread to moderator Post Follow-up to this message
Old Post
Frank Swarbrick
05-26-06 11:55 PM


Re: Accept / Display - an "environment variables
The "rationale" for requiring the Special-Names and mnemonic is that it mean
s
that "device-names" (e.g. SYSOUT, SYSIPT, CONSOLE, etc) need NOT be restrict
ed
from use as "user-defined words".  However, for implementations (such as IBM
's)
they prohibit these words from being used as user-defined names.

--
Bill Klein
wmklein <at> ix.netcom.com
"Frank Swarbrick" <Frank.Swarbrick@efirstbank.com> wrote in message
news:4dpinuF1arrshU1@individual.net...
> COBOL for VSE
>
> accept data-area from console
> display data-area upon console
> accept data-area from sysipt
> accept data-area from sysin
> display data-area upon syslst
> display data-area upon syslist
> display data-area upon sysout
> display data-area upon syspch
> display data-area upon syspunch
>
>
> And somewhat related, for WRITE ADVANCING:
> special-names.
>    C01 IS C01
>    CSP IS CSP
>    AFP-5A IS AFP-5A.
> write fd-rec after advancing C01   *> skip to printer "channel 1"
> write fd-rec after advancing CSP  *> suppress spacing
> and my personal favorite
> write fd-rec after advancing AFP-5A  >* special controls for Advanced
> Function Printing(tm)
>
> I don't really understand the point of special-names here.  We do generall
y
> have it more like:
>    C01 IS CHANNEL-1
>    CSP IS SUPRESS-SPACE
>    AFP-5A IS AFP-CONTROL.
> write fd-rec after advancing CHANNEL-1
> write fd-rec after advancing SUPPRESS-SPACE
> and my personal favorite
> write fd-rec after advancing AFP-CONTROL
>
> So I suppose the requirement to use special-names does make things a bit
> more readible, but I don't really see why one cannot use the names
> "directly", without utilizing special-names.
> Ah well...
>
> One thing I've never done is
> special-names.
>    console IS cnsl.
>
> display 'something' upon cnsl
>
> It works, but it never occured to me I might want to do that, when
> display 'something' upon console
> seems (to me) to be quite obvious...
>
> I suppose the special-names paragraph would be useful if I were converting
> from COBOL/VSE to some other COBOL.  Then I could do something like...
>
> special-names.
>    sysout is syslst
>    sysout is syspch
>    sysin is sysipt.
>
> (Actually, that does not work because I've assigned two mnemonic names to
> the same environment name.  Huh.  Seems like that should work...)
>
> Frank
>
> ---
> Frank Swarbrick
> Senior Developer/Analyst - Mainframe Applications
> FirstBank Data Corporation - Lakewood, CO  USA
> 
> I wondered who would notice that.  My mistake.  "Common" IBM usage is:
>
> Accept whatever from Sysin
>    or
> Display whatever upon Sysout
>
> (There are a long list of "valid" things that can be used for Accept/Displ
ay
> -
> e.g. CONSOLE, SYSIPT, etc)
>
> --
> Bill Klein
> wmklein <at> ix.netcom.com
> "Chuck Stevens" <charles.stevens@unisys.com> wrote in message
> news:e57k7r$1cb5$1@si05.rsvl.unisys.com... 
> mnemonic-name, 
> that 
> ... 
> 
> mnemonic 
> ODT 
> it 
> specifier 
> 
>
>
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
William M. Klein
05-27-06 02:55 AM


Re: Accept / Display - an "environment variables
"Frank Swarbrick" <Frank.Swarbrick@efirstbank.com> wrote in message
news:4dpinuF1arrshU1@individual.net...
> COBOL for VSE
>
> accept data-area from console
> display data-area upon console
> accept data-area from sysipt
> accept data-area from sysin
> display data-area upon syslst
> display data-area upon syslist
> display data-area upon sysout
> display data-area upon syspch
> display data-area upon syspunch
>
>
> And somewhat related, for WRITE ADVANCING:
> special-names.
>    C01 IS C01
>    CSP IS CSP
>    AFP-5A IS AFP-5A.
> write fd-rec after advancing C01   *> skip to printer "channel 1"
> write fd-rec after advancing CSP  *> suppress spacing
> and my personal favorite
> write fd-rec after advancing AFP-5A  >* special controls for Advanced
> Function Printing(tm)
>
> I don't really understand the point of special-names here.  We do
> generally
> have it more like:
>    C01 IS CHANNEL-1
>    CSP IS SUPRESS-SPACE
>    AFP-5A IS AFP-CONTROL.
> write fd-rec after advancing CHANNEL-1
> write fd-rec after advancing SUPPRESS-SPACE
> and my personal favorite
> write fd-rec after advancing AFP-CONTROL
>
> So I suppose the requirement to use special-names does make things a bit
> more readible, but I don't really see why one cannot use the names
> "directly", without utilizing special-names.
> Ah well...
>
> One thing I've never done is
> special-names.
>    console IS cnsl.
>
> display 'something' upon cnsl
>
> It works, but it never occured to me I might want to do that, when
> display 'something' upon console
> seems (to me) to be quite obvious...
>
> I suppose the special-names paragraph would be useful if I were converting
> from COBOL/VSE to some other COBOL.  Then I could do something like...
>
> special-names.
>    sysout is syslst
>    sysout is syspch
>    sysin is sysipt.
>
> (Actually, that does not work because I've assigned two mnemonic names to
> the same environment name.  Huh.  Seems like that should work...)
>
> Frank
>
> ---
> Frank Swarbrick
> Senior Developer/Analyst - Mainframe Applications
> FirstBank Data Corporation - Lakewood, CO  USA
> 
> I wondered who would notice that.  My mistake.  "Common" IBM usage is:
>
> Accept whatever from Sysin
>    or
> Display whatever upon Sysout
>
> (There are a long list of "valid" things that can be used for
> Accept/Display
> -
> e.g. CONSOLE, SYSIPT, etc)
>
> --
> Bill Klein
> wmklein <at> ix.netcom.com
> "Chuck Stevens" <charles.stevens@unisys.com> wrote in message
> news:e57k7r$1cb5$1@si05.rsvl.unisys.com... 
> mnemonic-name, 
> that 
> ... 
> 
> mnemonic 
> ODT 
> it 
> specifier 
> 
>
>
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
Chuck Stevens
05-31-06 11:55 PM


Re: Accept / Display - an "environment variables
"Frank Swarbrick" <Frank.Swarbrick@efirstbank.com> wrote in message
news:4dpinuF1arrshU1@individual.net...
> I don't really understand the point of special-names here.  We do
> generally

> have it more like:
>    C01 IS CHANNEL-1
>    CSP IS SUPRESS-SPACE
>    AFP-5A IS AFP-CONTROL.
> write fd-rec after advancing CHANNEL-1
> write fd-rec after advancing SUPPRESS-SPACE
> and my personal favorite
> write fd-rec after advancing AFP-CONTROL
>
> So I suppose the requirement to use special-names does make things a bit
> more readible, but I don't really see why one cannot use the names
> "directly", without utilizing special-names.
> Ah well...

For the WRITE ... ADVANCING <mnemonic-name> case, whatever feature-names the
implementor chooses to use in the particular environment are defined by the
implementor.  I haven't a clue what AFP-5A means in the Unisys MCP
environment.  The implementor also defines switch-names and device-names.
What is SYSIN in one environment may be READER in another, and I'm not
convinced the standard should support one over another.  Should all
conforming implementations of COBOL be required to provide syntax for
testing and setting the bits in the UPSI byte -- and be limited to no more
than eight switches -- whether or not there is any direct or indirect analog
to the UPSI byte (by that name or any other) in the implementation?  Same
sort of thing applies to the likes of "ADVANCING C01".

-Chuck Stevens



Report this thread to moderator Post Follow-up to this message
Old Post
Chuck Stevens
05-31-06 11:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 03:00 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.