[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnubol: Name is Select/Assign clause



"William M. Klein" wrote:
> 
> > -----Original Message-----
>   <snip>
> > >
> >
> > AFAIK, to have the identifier point to an environment variable, you have
> > to use the EXTERNAL keyword, and to have the identifier point to a
> > Working-storage member, you have to use the keyword DYNAMIC, in the
> > ASSIGN clause (separate from the ACCESS clause--two allowable DYNAMICs.
> 
>  <more snip>
> 
> Look at the "ASSIGN" directive and you will see that this may ALSO be changed
> by a directive (without changing the source code).  As neither "EXTERNAL" nor
> "DYNAMIC" is ANSI/ISO conforming in this context, that is how to "control"
> this in a Standard conforming source program.

True--which is why I said, that that's the way it works in Microfocus. 
Either way you go, with a compiler directive or in the source code, it's
a Microfocus extension, and not part of the standard.  Still, it's a
handy extension--we use it all the time, on workstation (i.e.,
non-mainframe) code.  I'm not going to worry about the directives at
this point in the game.  From my preliminary work on the data structure
for file descriptions, it's not going to be much of an issue, in any
case.  

In any case, the draft standard says you can have a [ USING data-name-1
] entry, in addition to or instead of, the [ TO {device-name-1
literal-1} ] clause, where data-name-1 refers to a data item, well, read
below, in point b).  The USING clause will obviate the need for
Microfocus' DYNAMIC keyword.  

Did y'all know you can hilight/copy from pdf files in the latest
Acroread for Linux?  I never knew that. :) Well, I never tried before...
=============================BEGIN==============================================
3) The ASSIGN clause specifies the association of the file referenced by
file-name-1 to a storage medium referenced by device-name-1, literal-1,
or the content of the data item referenced by data-name-1. The
association occurs at the time of execution of an OPEN, SORT, or MERGE
statement that referenced file-name-1, according to the following rules: 

a) When the TO phrase of the ASSIGN clause is specified and the USING
phrase is omitted, the file referenced by file-name-1 is associated with
a storage medium referenced by the specification of device-name-1 or the
value of literal-1 in the program that executes the OPEN, SORT, or MERGE
statement. 

b) When the USING phrase of the ASSIGN clause is specified, the file
referenced by file-name-1 is associated with a storage medium referenced
by the content of the data item referenced by data-name-1 in the program
that executes the OPEN, SORT, or MERGE statement. 


If the association cannot be made because the content of the data item
referenced by data-name-1 is not consistent with the specification for
device-name-1 or literal-1, the OPEN, SORT, or MERGE statement is
unsuccessful.
=============================END================================================

Out of curiosity, I don't see the USING clause in any of my current
syntax diagrams for the ASSIGN phrase.  Is it new with the draft
standard?

ciao.
-- 
Matthew Vanecek
Visit my Website at http://mysite.directlink.net/linuxguy
For answers type: perl -e 'print
$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
*****************************************************************
For 93 million miles, there is nothing between the sun and my shadow
except me. I'm always getting in the way of something...

--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.