Home > Archive > Cobol > October 2004 > Wrong Again (was: String Functions in MF
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 |
Wrong Again (was: String Functions in MF
|
|
| William M. Klein 2004-10-02, 8:55 am |
| "Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
news:l9cml0t1f0ao5plaef6u0nn9if70la2td4@
4ax.com...
> On Wed, 29 Sep 2004 21:57:01 GMT, Robert Wagner
> <robert@wagner.net.yourmammaharvests> wrote:
<snip>
> I forgot to mention that 'my' pointer technique is in the 02 standard.
> The standard does not require BASED syntax, as you speculated here it
> would. It also allows SET ADDRESS OF (linkage section item) TO
> (pointer).
It is true that one may code SETT ADDRESS OF (linkage section item) TO (pointer)
HOWEVER, SR(18) of the SET statement (page 520) explicitly says,
"18) Data-name-1 shall be a based data item."
Therefore, this is QUITE incompatible with the current IBM and Micro Focus
syntax (and the undocumented and unsupported Fujitsu syntax)
--
Bill Klein
wmklein <at> ix.netcom.com
| |
| Robert Wagner 2004-10-02, 8:55 am |
| On Wed, 29 Sep 2004 22:18:13 GMT, "William M. Klein"
<wmklein@nospam.netcom.com> wrote:
>"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
> news:l9cml0t1f0ao5plaef6u0nn9if70la2td4@
4ax.com...
><snip>
>
>It is true that one may code SET ADDRESS OF (linkage section item) TO (pointer)
>
>HOWEVER, SR(18) of the SET statement (page 520) explicitly says,
>
>"18) Data-name-1 shall be a based data item."
>
>Therefore, this is QUITE incompatible with the current IBM and Micro Focus
>syntax (and the undocumented and unsupported Fujitsu syntax)
It's not QUITE incompatible, it requires a minor change -- adding a
BASED clause to the linkage section item. Having done that, the BASED
pointer need never be referenced.
| |
| William M. Klein 2004-10-02, 8:55 am |
|
"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
news:6geml0564aik6rjr3m79for7hf86mp6m27@
4ax.com...
> On Wed, 29 Sep 2004 22:18:13 GMT, "William M. Klein"
> <wmklein@nospam.netcom.com> wrote:
>
>
> It's not QUITE incompatible, it requires a minor change -- adding a
> BASED clause to the linkage section item. Having done that, the BASED
> pointer need never be referenced.
>
So you admit you were WRONG when you said (see a few lines above)
"The standard does not require BASED syntax, ..."
--
Bill Klein
wmklein <at> ix.netcom.com
| |
| Robert Wagner 2004-10-02, 8:55 am |
| On Wed, 29 Sep 2004 22:50:17 GMT, "William M. Klein"
<wmklein@nospam.netcom.com> wrote:
>
>"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
> news:6geml0564aik6rjr3m79for7hf86mp6m27@
4ax.com...
>
>So you admit you were WRONG when you said (see a few lines above)
>
> "The standard does not require BASED syntax, ..."
If it pleases you, I admit I was wrong. One must declare BASED syntax
and then can ignore it.
| |
| docdwarf@panix.com 2004-10-02, 8:55 am |
| In article <jsmml05eoau2unj54ns9nmroiljjgjg739@4ax.com>,
Robert Wagner <robert@wagner.net.yourmammaharvests> wrote:
>On Wed, 29 Sep 2004 22:50:17 GMT, "William M. Klein"
><wmklein@nospam.netcom.com> wrote:
>
>
>If it pleases you, I admit I was wrong.
Mr Wagner, if you said 'A does not require B' and then later asserted that
(given the same aspect at the same time) 'A requires B' then, right or
wrong, you seem to have contradicted yourself. This sort of thing has
been shrugged off by the likes of Whitman... but I am not sure how much
you wish to align your personality with that sort.
DD
| |
| William M. Klein 2004-10-02, 8:55 am |
| Robert,
Just so you know, there is one more difference (between the requirement for
the BASED phrase) between existing IBM and Micro Focus implementations and that
required in the '02 Standard.
For IBM and Micro Focus, a Linkage Section item for which the SET ADDRESS OF
statement establishes addressability need not - but MAY appear in the Procedure
Division Using statement. If it appears there but a SET ADDRESS statement is
used against it, it "changes" where that item is now located.
For the '02 Standard, there is an explicit rule that an item in the Procedure
Division Using statement may *NOT* have a BASED phrase. Therefore, some
existing IBM and Micro Focus applications may fail to compile with a restricted
to '02 Standard COBOL compiler - even if BASED phrases are added.
From my personal experience, MOST Micro Focus and IBM applications using SET
ADDRESS OF to establish addressability to a Linkage Section item do NOT include
them in the Procedure Division header. HOWEVER, I have also seen some that do
(for cases where a parameter is passed to a subprogram - and then that LS item
is "re-addressed" based on application logic)
--
Bill Klein
wmklein <at> ix.netcom.com
"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
news:jsmml05eoau2unj54ns9nmroiljjgjg739@
4ax.com...
> On Wed, 29 Sep 2004 22:50:17 GMT, "William M. Klein"
> <wmklein@nospam.netcom.com> wrote:
>
>
> If it pleases you, I admit I was wrong. One must declare BASED syntax
> and then can ignore it.
| |
| Robert Wagner 2004-10-02, 3:55 pm |
| On 29 Sep 2004 21:22:07 -0400, docdwarf@panix.com wrote:
>Mr Wagner, if you said 'A does not require B' and then later asserted that
>(given the same aspect at the same time) 'A requires B' then, right or
>wrong, you seem to have contradicted yourself. This sort of thing has
>been shrugged off by the likes of Whitman... but I am not sure how much
>you wish to align your personality with that sort.
If foolish consistency is the hobgoblin of a small mind [Emerson],
then consistent small mindedness is the harbinger of idiocy.
| |
| William M. Klein 2004-10-02, 3:55 pm |
| And your difficulty in admitting your errors is what gets you the general
responses you receive in CLC.
--
Bill Klein
wmklein <at> ix.netcom.com
"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
news:cmopl05er1g3qft7a1h4igelk42pd6tm3h@
4ax.com...
> On 29 Sep 2004 21:22:07 -0400, docdwarf@panix.com wrote:
>
>
>
> If foolish consistency is the hobgoblin of a small mind [Emerson],
> then consistent small mindedness is the harbinger of idiocy.
>
| |
| docdwarf@panix.com 2004-10-02, 3:55 pm |
| In article <cmopl05er1g3qft7a1h4igelk42pd6tm3h@4ax.com>,
Robert Wagner <robert@wagner.net.yourmammaharvests> wrote:
>On 29 Sep 2004 21:22:07 -0400, docdwarf@panix.com wrote:
>
>
>
> If foolish consistency is the hobgoblin of a small mind [Emerson],
>then consistent small mindedness is the harbinger of idiocy.
I am not sure what is intended by this, Mr Wagner... are you attemp[ting
to offer the Voice of Experience along the lines of 'ask the man who owns
one'?
DD
| |
| William M. Klein 2004-10-02, 3:55 pm |
| Robert,
Just so you know, there is one more difference (between the requirement for
the BASED phrase) between existing IBM and Micro Focus implementations and that
required in the '02 Standard.
For IBM and Micro Focus, a Linkage Section item for which the SET ADDRESS OF
statement establishes addressability need not - but MAY appear in the Procedure
Division Using statement. If it appears there but a SET ADDRESS statement is
used against it, it "changes" where that item is now located.
For the '02 Standard, there is an explicit rule that an item in the Procedure
Division Using statement may *NOT* have a BASED phrase. Therefore, some
existing IBM and Micro Focus applications may fail to compile with a restricted
to '02 Standard COBOL compiler - even if BASED phrases are added.
From my personal experience, MOST Micro Focus and IBM applications using SET
ADDRESS OF to establish addressability to a Linkage Section item do NOT include
them in the Procedure Division header. HOWEVER, I have also seen some that do
(for cases where a parameter is passed to a subprogram - and then that LS item
is "re-addressed" based on application logic)
--
Bill Klein
wmklein <at> ix.netcom.com
"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
news:jsmml05eoau2unj54ns9nmroiljjgjg739@
4ax.com...
> On Wed, 29 Sep 2004 22:50:17 GMT, "William M. Klein"
> <wmklein@nospam.netcom.com> wrote:
>
>
> If it pleases you, I admit I was wrong. One must declare BASED syntax
> and then can ignore it.
| |
| William M. Klein 2004-10-03, 3:55 pm |
| And your difficulty in admitting your errors is what gets you the general
responses you receive in CLC.
--
Bill Klein
wmklein <at> ix.netcom.com
"Robert Wagner" <robert@wagner.net.yourmammaharvests> wrote in message
news:cmopl05er1g3qft7a1h4igelk42pd6tm3h@
4ax.com...
> On 29 Sep 2004 21:22:07 -0400, docdwarf@panix.com wrote:
>
>
>
> If foolish consistency is the hobgoblin of a small mind [Emerson],
> then consistent small mindedness is the harbinger of idiocy.
>
|
|
|
|
|