Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Your mode of life will be changed to EBCDIC.


computers / comp.os.vms / Re: COBOL example $MGBLSC

SubjectAuthor
* COBOL example $MGBLSCBrian Schenkenberger
+- Re: COBOL example $MGBLSCabrsvc
+* Re: COBOL example $MGBLSCBrian Schenkenberger
|`* Re: COBOL example $MGBLSCArne Vajhøj
| +- Re: COBOL example $MGBLSCBrian Schenkenberger
| +* Re: COBOL example $MGBLSCBrian Schenkenberger
| |`* Re: COBOL example $MGBLSCArne Vajhøj
| | +* Re: COBOL example $MGBLSCJohn Reagan
| | |`* Re: COBOL example $MGBLSCBrian Schenkenberger
| | | +- Re: COBOL example $MGBLSCJohn Reagan
| | | `- Re: COBOL example $MGBLSCArne Vajhøj
| | `* Re: COBOL example $MGBLSCBrian Schenkenberger
| |  +* Re: COBOL example $MGBLSCArne Vajhøj
| |  |`* Re: COBOL example $MGBLSCbill
| |  | +- Re: COBOL example $MGBLSCDave Froble
| |  | `* Re: COBOL example $MGBLSCArne Vajhøj
| |  |  `* Re: COBOL example $MGBLSCbill
| |  |   `* Re: COBOL example $MGBLSCChris Townley
| |  |    +- Re: COBOL example $MGBLSCbill
| |  |    `* Re: COBOL example $MGBLSCbill
| |  |     +* Re: COBOL example $MGBLSCJan-Erik Söderholm
| |  |     |+* Re: COBOL example $MGBLSCDave Froble
| |  |     ||`* Re: COBOL example $MGBLSCJan-Erik Söderholm
| |  |     || `* Re: COBOL example $MGBLSCArne Vajhøj
| |  |     ||  `* Re: COBOL example $MGBLSCbill
| |  |     ||   `* Re: COBOL example $MGBLSCArne Vajhøj
| |  |     ||    +* Re: COBOL example $MGBLSCbill
| |  |     ||    |+* Re: COBOL example $MGBLSCChris Townley
| |  |     ||    ||`- Re: COBOL example $MGBLSCbill
| |  |     ||    |+* Re: COBOL example $MGBLSCArne Vajhøj
| |  |     ||    ||`* Re: COBOL example $MGBLSCbill
| |  |     ||    || `- Re: COBOL example $MGBLSCArne Vajhøj
| |  |     ||    |`* Re: COBOL example $MGBLSCJohnny Billquist
| |  |     ||    | `- Re: COBOL example $MGBLSCScott Dorsey
| |  |     ||    `- Re: COBOL example $MGBLSCScott Dorsey
| |  |     |`* Re: COBOL example $MGBLSCJohn Dallman
| |  |     | `- Re: COBOL example $MGBLSCbill
| |  |     `- Re: COBOL example $MGBLSCArne Vajhøj
| |  +- Re: COBOL example $MGBLSCHein RMS van den Heuvel
| |  `* Re: COBOL example $MGBLSCArne Vajhøj
| |   `* Re: COBOL example $MGBLSCArne Vajhøj
| |    `- Re: COBOL example $MGBLSCArne Vajhøj
| `- Re: COBOL example $MGBLSCArne Vajhøj
`* Re: COBOL example $MGBLSCSimon Clubley
 `- Re: COBOL example $MGBLSCBrian Schenkenberger

Pages:12
Re: COBOL example $MGBLSC

<udhrva$2ib2$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29770&group=comp.os.vms#29770

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jan-erik...@telia.com (Jan-Erik Söderholm)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sat, 9 Sep 2023 15:29:13 +0200
Organization: A noiseless patient Spider
Lines: 112
Message-ID: <udhrva$2ib2$1@dont-email.me>
References: <udcn5f$31542$1@dont-email.me> <udd26q$32pot$1@dont-email.me>
<uddd48$348jj$1@dont-email.me> <uddimg$35476$1@dont-email.me>
<uddlte$35f98$1@dont-email.me> <udfj2g$3hote$1@dont-email.me>
<udfkn4$3i47t$1@dont-email.me> <km15gqF8emlU5@mid.individual.net>
<udg0rs$3mbio$1@dont-email.me> <km1mq8F8emnU7@mid.individual.net>
<udg90r$3fq1i$1@dont-email.me> <km39fkF8emlU9@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Sep 2023 13:29:14 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c4fe9bc9d4ee9737d66059848ebeefce";
logging-data="84322"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18AEVe+eMK7yZAbhe/4tBgy"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:anCaCskpBMBqk6FnVnOS0zQsYQY=
In-Reply-To: <km39fkF8emlU9@mid.individual.net>
Content-Language: sv
 by: Jan-Erik Söderholm - Sat, 9 Sep 2023 13:29 UTC

Den 2023-09-09 kl. 15:15, skrev bill:
> On 9/8/2023 6:59 PM, Chris Townley wrote:
>> On 08/09/2023 23:50, bill wrote:
>>> On 9/8/2023 4:40 PM, Arne Vajhøj wrote:
>>>> On 9/8/2023 1:55 PM, bill wrote:
>>>>> On 9/8/2023 1:13 PM, Arne Vajhøj wrote:
>>>>>> On 9/8/2023 12:45 PM, Brian Schenkenberger wrote:
>>>>>>> I have the SYS$MGBLSC working... at least, in the debugger.  I
>>>>>>> defined a test global section with two longwords.
>>>>>>>
>>>>>>> 1,-1
>>>>>>> 2,-2
>>>>>>> 3,-3
>>>>>>> etc.,-etc.
>>>>>>> 0,0
>>>>>>>
>>>>>>> I have the following for the global section's element definition:
>>>>>>>
>>>>>>> LINKAGE SECTION.
>>>>>>>
>>>>>>> 01 GLOBAL-SECTION.
>>>>>>>   02 ELEMENT OCCURS 2000 TIMES.
>>>>>>>     03 A        PIC S9(9) COMP.
>>>>>>>     03 B        PIC S9(9) COMP.
>>>>>>>
>>>>>>> and the procedure...
>>>>>>>
>>>>>>> PROCEDURE DIVISION USING GLOBAL_SECTION.
>>>>>>> PARAGRAPH-MAIN.
>>>>>>>     PERFORM PARAGRAPH-ENTER THRU PARAGRAPH-EXIT
>>>>>>>             VARYING I FROM 1 BY 1 UNTIL A(I) = 0 AND B(I) = 0.
>>>>>>> PARAGRAPH-ENTER.
>>>>>>>     DISPLAY "First[" I "]: " A(I) "  Second[" I "]: " B(I).
>>>>>>> PARAGRAPH-EXIT.
>>>>>>>     EXIT.
>>>>>>> END PROGRAM GBLSEC.
>>>>>>>
>>>>>>> In the debugger, A(I) and B(I) show me the values but DISPLAY pukes
>>>>>>> on them. It'd be great too if there was a way to DISPLAY them in HEX
>>>>>>> but just getting it to DISPLAY without regurgitaing garbage would be
>>>>>>> great.
>>>>>>
>>>>>> Add a couple of temporary variables:
>>>>>>
>>>>>> WORKING-STORAGE SECTION.
>>>>>> 01 AI PIC 9(4) DISPLAY.
>>>>>> 01 BI PIC 9(4) DISPLAY.
>>>>>>
>>>>>> and do:
>>>>>>
>>>>>> MOVE A(I) TO AI
>>>>>> MOVE B(I) TO BI
>>>>>> DISPLAY "First[" I "]: " AI "  Second[" I "]: " BI.
>>>>>>
>>>>>> If anyone that actually knows Cobol has a better solution then
>>>>>> I am also interested!
>>>>>
>>>>> I really don't have that much experience with VMS COBOL and have no idea
>>>>> what $MGBLSC means,
>>>>
>>>> SYS$MGLBSC is the VMS system service to map a global section.
>>>>
>>>>>                      but, if it is merely a display problem how about a
>>>>> REDEFINES from COMP to DISPLAY instead of another variable and the MOVE?
>>>>
>>>> How would that look like?
>>>
>>> Can you point me at a copy of the VMS COBOL Reference Manual?
>>> This is something VMS specific.  I tried a couple sites.  One
>>> of them returned XML errors and sector7 pointed me at localhost.
>>> If I can grab a quick look at the manual I can probably provide
>>> a fairly clean way to do it.  I may even try to figure out how
>>> to get to EISNER after the port change and then I will actually
>>> test what I write.
>>>
>>
>> Try https://docs.vmssoftware.com/vsi-cobol-for-openvms-reference-guide
>> There is also a User guide
>>
>
>
> Afraid I will have to take a pass on this one.  Too much VMS
> specific stuff that makes no sense to me in COBOL.
> An example:
> ------------------------------
> LINKAGE SECTION.
>
>    01 GLOBAL-SECTION.
>
> -----------------------
>
> PROCEDURE DIVISION USING GLOBAL_SECTION.
>
> -----------------------------
>
> Note that the names don't match.  And, GLOBAL is a reserved word.
>
> And I thought IBM COBOL was convoluted.
>
> bill
>

As that same manual says in section "1.2.1.1. User-Defined Words":

"Throughout this manual, and except where specific rules apply, the
hyphen (-) and the underline (_) are treated as the same character
in a user-defined word."

So the two symbols "GLOBAL-SECTION" and "GLOBAL_SECTION" are the same.
Could had been clearer to if that had been avoided...

There are some other special cases, search the manual for "underline".

Re: COBOL example $MGBLSC

<udhtv0$3o1e$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29771&group=comp.os.vms#29771

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dav...@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sat, 9 Sep 2023 10:02:54 -0400
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <udhtv0$3o1e$1@dont-email.me>
References: <udcn5f$31542$1@dont-email.me> <udd26q$32pot$1@dont-email.me>
<uddd48$348jj$1@dont-email.me> <uddimg$35476$1@dont-email.me>
<uddlte$35f98$1@dont-email.me> <udfj2g$3hote$1@dont-email.me>
<udfkn4$3i47t$1@dont-email.me> <km15gqF8emlU5@mid.individual.net>
<udg0rs$3mbio$1@dont-email.me> <km1mq8F8emnU7@mid.individual.net>
<udg90r$3fq1i$1@dont-email.me> <km39fkF8emlU9@mid.individual.net>
<udhrva$2ib2$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Sep 2023 14:03:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ff2fb308606de114b110d1ecc586b8ea";
logging-data="122926"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FBWgD8cHbOKoIJ/fNYVv3zgBrD/xeIXc="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:XHwINYxML+Ascwdqe4CpYNFPs5I=
In-Reply-To: <udhrva$2ib2$1@dont-email.me>
 by: Dave Froble - Sat, 9 Sep 2023 14:02 UTC

On 9/9/2023 9:29 AM, Jan-Erik Söderholm wrote:

> "Throughout this manual, and except where specific rules apply, the
> hyphen (-) and the underline (_) are treated as the same character
> in a user-defined word."

I guess that could be compared to "case insensitive", but while I consider case
sensitivity to be less than reasonable, I find the above to be really stupid.
Sure makes searching for specific words in a program complex.

Got to understand Bill's objection to such.

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: COBOL example $MGBLSC

<udhuvd$2ib2$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29776&group=comp.os.vms#29776

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jan-erik...@telia.com (Jan-Erik Söderholm)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sat, 9 Sep 2023 16:20:29 +0200
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <udhuvd$2ib2$2@dont-email.me>
References: <udcn5f$31542$1@dont-email.me> <udd26q$32pot$1@dont-email.me>
<uddd48$348jj$1@dont-email.me> <uddimg$35476$1@dont-email.me>
<uddlte$35f98$1@dont-email.me> <udfj2g$3hote$1@dont-email.me>
<udfkn4$3i47t$1@dont-email.me> <km15gqF8emlU5@mid.individual.net>
<udg0rs$3mbio$1@dont-email.me> <km1mq8F8emnU7@mid.individual.net>
<udg90r$3fq1i$1@dont-email.me> <km39fkF8emlU9@mid.individual.net>
<udhrva$2ib2$1@dont-email.me> <udhtv0$3o1e$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Sep 2023 14:20:29 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c4fe9bc9d4ee9737d66059848ebeefce";
logging-data="84322"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ION/YjtMTcyY7+oTfUnfr"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.12.0
Cancel-Lock: sha1:YS38MkYYAhUg+eiXnzkG3XQPTn8=
In-Reply-To: <udhtv0$3o1e$1@dont-email.me>
Content-Language: sv
 by: Jan-Erik Söderholm - Sat, 9 Sep 2023 14:20 UTC

Den 2023-09-09 kl. 16:02, skrev Dave Froble:
> On 9/9/2023 9:29 AM, Jan-Erik Söderholm wrote:
>
>> "Throughout this manual, and except where specific rules apply, the
>> hyphen (-) and the underline (_) are treated as the same character
>> in a user-defined word."
>
> I guess that could be compared to "case insensitive", but while I consider
> case sensitivity to be less than reasonable, I find the above to be really
> stupid. Sure makes searching for specific words in a program complex.
>
> Got to understand Bill's objection to such.
>

Stupid or not, it was not known to Bill and created that
wrong comment of being two differnt symbols. I just showed
that they are probably handled as the same symbol.

That doesn't mean that I disagree with you... :-)

Re: COBOL example $MGBLSC

<udhvag$3t63$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29777&group=comp.os.vms#29777

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sat, 9 Sep 2023 10:26:24 -0400
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <udhvag$3t63$2@dont-email.me>
References: <udcn5f$31542$1@dont-email.me> <udd26q$32pot$1@dont-email.me>
<uddd48$348jj$1@dont-email.me> <uddimg$35476$1@dont-email.me>
<uddlte$35f98$1@dont-email.me> <udfj2g$3hote$1@dont-email.me>
<udfkn4$3i47t$1@dont-email.me> <km15gqF8emlU5@mid.individual.net>
<udg0rs$3mbio$1@dont-email.me> <km1mq8F8emnU7@mid.individual.net>
<udg90r$3fq1i$1@dont-email.me> <km39fkF8emlU9@mid.individual.net>
<udhrva$2ib2$1@dont-email.me> <udhtv0$3o1e$1@dont-email.me>
<udhuvd$2ib2$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Sep 2023 14:26:24 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e0ca7542e7f8d2c872ca23813f8648e1";
logging-data="128195"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX193SkpxkgOIlyprdtz17Ax/dak6T9I5gkE="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:ubJH+Q3M5sDipnND3+PHyJGTXF0=
Content-Language: en-US
In-Reply-To: <udhuvd$2ib2$2@dont-email.me>
 by: Arne Vajhøj - Sat, 9 Sep 2023 14:26 UTC

On 9/9/2023 10:20 AM, Jan-Erik Söderholm wrote:
> Den 2023-09-09 kl. 16:02, skrev Dave Froble:
>> On 9/9/2023 9:29 AM, Jan-Erik Söderholm wrote:

>>> "Throughout this manual, and except where specific rules apply, the
>>> hyphen (-) and the underline (_) are treated as the same character
>>> in a user-defined word."
>>
>> I guess that could be compared to "case insensitive", but while I
>> consider case sensitivity to be less than reasonable, I find the above
>> to be really stupid. Sure makes searching for specific words in a
>> program complex.
>>
>> Got to understand Bill's objection to such.
>
> Stupid or not, it was not known to Bill and created that
> wrong comment of being two differnt symbols. I just showed
> that they are probably handled as the same symbol.
>
> That doesn't mean that I disagree with you... :-)

Old languages sometimes has some rules that appears
very weird, because the expectation today is determined
by how a hundred newer languages has agreed on doing things
a different way.

Take as an example this perfectly valid Fortran 77 program:

program weird
integer*4 abc
abc = 123
write(*,*) abc
write(*,*) a b c
write(*,*) a b c
end

WTF??

Arne

Re: COBOL example $MGBLSC

<memo.20230909163316.13508K@jgd.cix.co.uk>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29781&group=comp.os.vms#29781

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!paganini.bofh.team!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jgd...@cix.co.uk (John Dallman)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sat, 9 Sep 2023 16:33 +0100 (BST)
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <memo.20230909163316.13508K@jgd.cix.co.uk>
References: <udhrva$2ib2$1@dont-email.me>
Reply-To: jgd@cix.co.uk
Injection-Info: dont-email.me; posting-host="2b826d6dbcd736c61fb04e1d1deaae55";
logging-data="150277"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1874eEj/NpKr85oVNJrfH6UGpqYoj9RaBI="
Cancel-Lock: sha1:9n5/mcW45SyLDSp5T68EV4mAWCk=
 by: John Dallman - Sat, 9 Sep 2023 15:33 UTC

In article <udhrva$2ib2$1@dont-email.me>, jan-erik.soderholm@telia.com
(Jan-Erik S�derholm) wrote:

> So the two symbols "GLOBAL-SECTION" and "GLOBAL_SECTION" are the
> same. Could had been clearer to if that had been avoided...

I have not done any COBOL for 41 years, and you've just made me happier
about that.

John

Re: COBOL example $MGBLSC

<km3hn3F8emlU10@mid.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29782&group=comp.os.vms#29782

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bill.gun...@gmail.com (bill)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sat, 9 Sep 2023 11:36:02 -0400
Lines: 53
Message-ID: <km3hn3F8emlU10@mid.individual.net>
References: <udcn5f$31542$1@dont-email.me> <udd26q$32pot$1@dont-email.me>
<uddd48$348jj$1@dont-email.me> <uddimg$35476$1@dont-email.me>
<uddlte$35f98$1@dont-email.me> <udfj2g$3hote$1@dont-email.me>
<udfkn4$3i47t$1@dont-email.me> <km15gqF8emlU5@mid.individual.net>
<udg0rs$3mbio$1@dont-email.me> <km1mq8F8emnU7@mid.individual.net>
<udg90r$3fq1i$1@dont-email.me> <km39fkF8emlU9@mid.individual.net>
<udhrva$2ib2$1@dont-email.me> <udhtv0$3o1e$1@dont-email.me>
<udhuvd$2ib2$2@dont-email.me> <udhvag$3t63$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net YupgmsMVaRaQvu/kheCZZQx29oML9Z7KDt8monnITCjKmVsKog
Cancel-Lock: sha1:KZRqWl3vPkN2tb5WGvHRQlfAJgM= sha256:cv4zyvJNxHktuydsKwrtHveRNih30+82+odt+yV6kHM=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Content-Language: en-US
In-Reply-To: <udhvag$3t63$2@dont-email.me>
 by: bill - Sat, 9 Sep 2023 15:36 UTC

On 9/9/2023 10:26 AM, Arne Vajhøj wrote:
> On 9/9/2023 10:20 AM, Jan-Erik Söderholm wrote:
>> Den 2023-09-09 kl. 16:02, skrev Dave Froble:
>>> On 9/9/2023 9:29 AM, Jan-Erik Söderholm wrote:
>
>>>> "Throughout this manual, and except where specific rules apply, the
>>>> hyphen (-) and the underline (_) are treated as the same character
>>>> in a user-defined word."
>>>
>>> I guess that could be compared to "case insensitive", but while I
>>> consider case sensitivity to be less than reasonable, I find the
>>> above to be really stupid. Sure makes searching for specific words in
>>> a program complex.
>>>
>>> Got to understand Bill's objection to such.
>>
>> Stupid or not, it was not known to Bill and created that
>> wrong comment of being two differnt symbols. I just showed
>> that they are probably handled as the same symbol.
>>
>> That doesn't mean that I disagree with you... :-)
>
> Old languages sometimes has some rules that appears
> very weird, because the expectation today is determined
> by how a hundred newer languages has agreed on doing things
> a different way.
>
> Take as an example this perfectly valid Fortran 77 program:
>
>       program weird
>       integer*4 abc
>       abc = 123
>       write(*,*) abc
>       write(*,*) a b c
>       write(*,*) a     b     c
>       end
>
> WTF??
>

As an old school Fortran programmer as well as COBOL (Fortran was my
second language other than various assemblers) all I see in this is
that you don't understand Fortran. That is a perfectly valid, not
weird at all, program. If you wanted it to treat "a", "b" and "c"
as separate and distinct variables you should have used commas as the
the language expects. Spaces in that context are meaningless. :-)

bill

Re: COBOL example $MGBLSC

<km3htlF8emlU11@mid.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29783&group=comp.os.vms#29783

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bill.gun...@gmail.com (bill)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sat, 9 Sep 2023 11:39:32 -0400
Lines: 17
Message-ID: <km3htlF8emlU11@mid.individual.net>
References: <udhrva$2ib2$1@dont-email.me>
<memo.20230909163316.13508K@jgd.cix.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net PFxTa39CkcseLbPVvEdDvQeUr9iFl6t5qMheBVT8vWWMejfdZy
Cancel-Lock: sha1:IJZ0ZvLY8T1pnwttFM+fHYmFTJE= sha256:GMMmMRJ62ZujdecI3rIHRFOwmg35i7DcUkZB9ahn5R0=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Content-Language: en-US
In-Reply-To: <memo.20230909163316.13508K@jgd.cix.co.uk>
 by: bill - Sat, 9 Sep 2023 15:39 UTC

On 9/9/2023 11:33 AM, John Dallman wrote:
> In article <udhrva$2ib2$1@dont-email.me>, jan-erik.soderholm@telia.com
> (Jan-Erik Söderholm) wrote:
>
>> So the two symbols "GLOBAL-SECTION" and "GLOBAL_SECTION" are the
>> same. Could had been clearer to if that had been avoided...
>
> I have not done any COBOL for 41 years, and you've just made me happier
> about that.
>

It's not a COBOL problem, it's a VMS problem. Other compilers
will flag the reference to "GLOBAL_SECTION" as not defined.

bill

Re: COBOL example $MGBLSC

<udi5ng$4t22$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29788&group=comp.os.vms#29788

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sat, 9 Sep 2023 12:15:45 -0400
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <udi5ng$4t22$2@dont-email.me>
References: <udcn5f$31542$1@dont-email.me> <udd26q$32pot$1@dont-email.me>
<uddd48$348jj$1@dont-email.me> <uddimg$35476$1@dont-email.me>
<uddlte$35f98$1@dont-email.me> <udfj2g$3hote$1@dont-email.me>
<udfkn4$3i47t$1@dont-email.me> <km15gqF8emlU5@mid.individual.net>
<udg0rs$3mbio$1@dont-email.me> <km1mq8F8emnU7@mid.individual.net>
<udg90r$3fq1i$1@dont-email.me> <km39fkF8emlU9@mid.individual.net>
<udhrva$2ib2$1@dont-email.me> <udhtv0$3o1e$1@dont-email.me>
<udhuvd$2ib2$2@dont-email.me> <udhvag$3t63$2@dont-email.me>
<km3hn3F8emlU10@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Sep 2023 16:15:44 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e0ca7542e7f8d2c872ca23813f8648e1";
logging-data="160834"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ajndgku8cjG2mq5GMRvLYe9wAtPzyf+U="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:B8S/u4zVH01tQPuPf/2Gq3Tt7Z4=
In-Reply-To: <km3hn3F8emlU10@mid.individual.net>
Content-Language: en-US
 by: Arne Vajhøj - Sat, 9 Sep 2023 16:15 UTC

On 9/9/2023 11:36 AM, bill wrote:
> On 9/9/2023 10:26 AM, Arne Vajhøj wrote:
>> On 9/9/2023 10:20 AM, Jan-Erik Söderholm wrote:
>>> Den 2023-09-09 kl. 16:02, skrev Dave Froble:
>>>> On 9/9/2023 9:29 AM, Jan-Erik Söderholm wrote:
>>
>>>>> "Throughout this manual, and except where specific rules apply, the
>>>>> hyphen (-) and the underline (_) are treated as the same character
>>>>> in a user-defined word."
>>>>
>>>> I guess that could be compared to "case insensitive", but while I
>>>> consider case sensitivity to be less than reasonable, I find the
>>>> above to be really stupid. Sure makes searching for specific words
>>>> in a program complex.
>>>>
>>>> Got to understand Bill's objection to such.
>>>
>>> Stupid or not, it was not known to Bill and created that
>>> wrong comment of being two differnt symbols. I just showed
>>> that they are probably handled as the same symbol.
>>>
>>> That doesn't mean that I disagree with you... :-)
>>
>> Old languages sometimes has some rules that appears
>> very weird, because the expectation today is determined
>> by how a hundred newer languages has agreed on doing things
>> a different way.
>>
>> Take as an example this perfectly valid Fortran 77 program:
>>
>>        program weird
>>        integer*4 abc
>>        abc = 123
>>        write(*,*) abc
>>        write(*,*) a b c
>>        write(*,*) a     b     c
>>        end
>>
>> WTF??
>
> As an old school Fortran programmer as well as COBOL (Fortran was my
> second language other than various assemblers) all I see in this is
> that you don't understand Fortran.  That is a perfectly valid, not
> weird at all, program.  If you wanted it to treat "a", "b" and "c"
> as separate and distinct variables you should have used commas as the
> the language expects.  Spaces in that context are meaningless.  :-)

Today it is considered weird that you can insert arbitrary
spaces in variable names.

Arne

Re: COBOL example $MGBLSC

<km3lt7F8emlU14@mid.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29789&group=comp.os.vms#29789

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bill.gun...@gmail.com (bill)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sat, 9 Sep 2023 12:47:34 -0400
Lines: 59
Message-ID: <km3lt7F8emlU14@mid.individual.net>
References: <udcn5f$31542$1@dont-email.me> <udd26q$32pot$1@dont-email.me>
<uddd48$348jj$1@dont-email.me> <uddimg$35476$1@dont-email.me>
<uddlte$35f98$1@dont-email.me> <udfj2g$3hote$1@dont-email.me>
<udfkn4$3i47t$1@dont-email.me> <km15gqF8emlU5@mid.individual.net>
<udg0rs$3mbio$1@dont-email.me> <km1mq8F8emnU7@mid.individual.net>
<udg90r$3fq1i$1@dont-email.me> <km39fkF8emlU9@mid.individual.net>
<udhrva$2ib2$1@dont-email.me> <udhtv0$3o1e$1@dont-email.me>
<udhuvd$2ib2$2@dont-email.me> <udhvag$3t63$2@dont-email.me>
<km3hn3F8emlU10@mid.individual.net> <udi5ng$4t22$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net 0aLhsdSOzWwI9ykdtoZpjAlWFjca3WviLNgOP+GWeZ/grQMHZh
Cancel-Lock: sha1:AayP/f34BjmYtkW8UQAEVRjArEY= sha256:I6W1to634aOI7OouCpoACqGVEd4Do6HXNCfZJU/QVw8=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Content-Language: en-US
In-Reply-To: <udi5ng$4t22$2@dont-email.me>
 by: bill - Sat, 9 Sep 2023 16:47 UTC

On 9/9/2023 12:15 PM, Arne Vajhøj wrote:
> On 9/9/2023 11:36 AM, bill wrote:
>> On 9/9/2023 10:26 AM, Arne Vajhøj wrote:
>>> On 9/9/2023 10:20 AM, Jan-Erik Söderholm wrote:
>>>> Den 2023-09-09 kl. 16:02, skrev Dave Froble:
>>>>> On 9/9/2023 9:29 AM, Jan-Erik Söderholm wrote:
>>>
>>>>>> "Throughout this manual, and except where specific rules apply, the
>>>>>> hyphen (-) and the underline (_) are treated as the same character
>>>>>> in a user-defined word."
>>>>>
>>>>> I guess that could be compared to "case insensitive", but while I
>>>>> consider case sensitivity to be less than reasonable, I find the
>>>>> above to be really stupid. Sure makes searching for specific words
>>>>> in a program complex.
>>>>>
>>>>> Got to understand Bill's objection to such.
>>>>
>>>> Stupid or not, it was not known to Bill and created that
>>>> wrong comment of being two differnt symbols. I just showed
>>>> that they are probably handled as the same symbol.
>>>>
>>>> That doesn't mean that I disagree with you... :-)
>>>
>>> Old languages sometimes has some rules that appears
>>> very weird, because the expectation today is determined
>>> by how a hundred newer languages has agreed on doing things
>>> a different way.
>>>
>>> Take as an example this perfectly valid Fortran 77 program:
>>>
>>>        program weird
>>>        integer*4 abc
>>>        abc = 123
>>>        write(*,*) abc
>>>        write(*,*) a b c
>>>        write(*,*) a     b     c
>>>        end
>>>
>>> WTF??
>>
>> As an old school Fortran programmer as well as COBOL (Fortran was my
>> second language other than various assemblers) all I see in this is
>> that you don't understand Fortran.  That is a perfectly valid, not
>> weird at all, program.  If you wanted it to treat "a", "b" and "c"
>> as separate and distinct variables you should have used commas as the
>> the language expects.  Spaces in that context are meaningless.  :-)
>
> Today it is considered weird that you can insert arbitrary
> spaces in variable names.
>

That is all about parsing and really has nothing to do with the
function of the language. The separator in that context is a comma,
not a space, tab or any other invisible character. :-)

bill

Re: COBOL example $MGBLSC

<udi7qo$2tpq$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29790&group=comp.os.vms#29790

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: new...@cct-net.co.uk (Chris Townley)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sat, 9 Sep 2023 17:51:35 +0100
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <udi7qo$2tpq$1@dont-email.me>
References: <udcn5f$31542$1@dont-email.me> <udd26q$32pot$1@dont-email.me>
<uddd48$348jj$1@dont-email.me> <uddimg$35476$1@dont-email.me>
<uddlte$35f98$1@dont-email.me> <udfj2g$3hote$1@dont-email.me>
<udfkn4$3i47t$1@dont-email.me> <km15gqF8emlU5@mid.individual.net>
<udg0rs$3mbio$1@dont-email.me> <km1mq8F8emnU7@mid.individual.net>
<udg90r$3fq1i$1@dont-email.me> <km39fkF8emlU9@mid.individual.net>
<udhrva$2ib2$1@dont-email.me> <udhtv0$3o1e$1@dont-email.me>
<udhuvd$2ib2$2@dont-email.me> <udhvag$3t63$2@dont-email.me>
<km3hn3F8emlU10@mid.individual.net> <udi5ng$4t22$2@dont-email.me>
<km3lt7F8emlU14@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Sep 2023 16:51:36 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1d5ef9300e3212a7638e15e71337d5dd";
logging-data="96058"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Eithp4AXnnRq/UqviMAng0hIW14rgZfU="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:WgjOvrfM2IlGlK3TpT8jKL2TmF0=
In-Reply-To: <km3lt7F8emlU14@mid.individual.net>
Content-Language: en-GB
 by: Chris Townley - Sat, 9 Sep 2023 16:51 UTC

On 09/09/2023 17:47, bill wrote:
> On 9/9/2023 12:15 PM, Arne Vajhøj wrote:

>> Today it is considered weird that you can insert arbitrary
>> spaces in variable names.
>>
>
> That is all about parsing and really has nothing to do with the
> function of the language.  The separator in that context is a comma,
> not a space, tab or any other invisible character.  :-)
>
> bill

I would not consider it good practice. I have never used Fortran, and i
was fazed by Arne's snippet

--
Chris

Re: COBOL example $MGBLSC

<km3moeF8emnU9@mid.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29792&group=comp.os.vms#29792

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bill.gun...@gmail.com (bill)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sat, 9 Sep 2023 13:02:05 -0400
Lines: 35
Message-ID: <km3moeF8emnU9@mid.individual.net>
References: <udcn5f$31542$1@dont-email.me> <udd26q$32pot$1@dont-email.me>
<uddd48$348jj$1@dont-email.me> <uddimg$35476$1@dont-email.me>
<uddlte$35f98$1@dont-email.me> <udfj2g$3hote$1@dont-email.me>
<udfkn4$3i47t$1@dont-email.me> <km15gqF8emlU5@mid.individual.net>
<udg0rs$3mbio$1@dont-email.me> <km1mq8F8emnU7@mid.individual.net>
<udg90r$3fq1i$1@dont-email.me> <km39fkF8emlU9@mid.individual.net>
<udhrva$2ib2$1@dont-email.me> <udhtv0$3o1e$1@dont-email.me>
<udhuvd$2ib2$2@dont-email.me> <udhvag$3t63$2@dont-email.me>
<km3hn3F8emlU10@mid.individual.net> <udi5ng$4t22$2@dont-email.me>
<km3lt7F8emlU14@mid.individual.net> <udi7qo$2tpq$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net 8WNV9Y4Di1Qe4nbUCs08zAw8Vr6HTvs/wDXezBeznxtN3eLiY8
Cancel-Lock: sha1:3lHAAqsTfi1oeSHr8hcb4mhrqTk= sha256:znAplAANJI7cGZibl5TRcN8bjmgIzdO/EEZuUnW9ABk=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Content-Language: en-US
In-Reply-To: <udi7qo$2tpq$1@dont-email.me>
 by: bill - Sat, 9 Sep 2023 17:02 UTC

On 9/9/2023 12:51 PM, Chris Townley wrote:
> On 09/09/2023 17:47, bill wrote:
>> On 9/9/2023 12:15 PM, Arne Vajhøj wrote:
>
>
>
>>> Today it is considered weird that you can insert arbitrary
>>> spaces in variable names.
>>>
>>
>> That is all about parsing and really has nothing to do with the
>> function of the language.  The separator in that context is a comma,
>> not a space, tab or any other invisible character.  :-)
>>
>> bill
>
> I would not consider it good practice. I have never used Fortran, and i
> was fazed by Arne's snippet
>

A lot of things were done at the time Fortran came about that are not
considered good practice today. Like self-modifyng code. But people
here, if anyone, know that changing behavior can have a devastating
effect on legacy applications.

No one writing real Fortran today would do that. I doubt anyone in
the past ever did it deliberately. But I am sure the parser was written
in a very resource limited environment and many things were left out.
You know that COBOL had no range or bounds checking originally. You
wouldn't do that today and most COBOL compilers today (all of the ones
I am familiar with) have it at least as an option. Hind sight is always
20/20.

bill

Re: COBOL example $MGBLSC

<udi99l$5cg1$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29793&group=comp.os.vms#29793

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sat, 9 Sep 2023 13:16:37 -0400
Organization: A noiseless patient Spider
Lines: 63
Message-ID: <udi99l$5cg1$1@dont-email.me>
References: <udcn5f$31542$1@dont-email.me> <udd26q$32pot$1@dont-email.me>
<uddd48$348jj$1@dont-email.me> <uddimg$35476$1@dont-email.me>
<uddlte$35f98$1@dont-email.me> <udfj2g$3hote$1@dont-email.me>
<udfkn4$3i47t$1@dont-email.me> <km15gqF8emlU5@mid.individual.net>
<udg0rs$3mbio$1@dont-email.me> <km1mq8F8emnU7@mid.individual.net>
<udg90r$3fq1i$1@dont-email.me> <km39fkF8emlU9@mid.individual.net>
<udhrva$2ib2$1@dont-email.me> <udhtv0$3o1e$1@dont-email.me>
<udhuvd$2ib2$2@dont-email.me> <udhvag$3t63$2@dont-email.me>
<km3hn3F8emlU10@mid.individual.net> <udi5ng$4t22$2@dont-email.me>
<km3lt7F8emlU14@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Sep 2023 17:16:37 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e0ca7542e7f8d2c872ca23813f8648e1";
logging-data="176641"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18GD8wu+MtfqHxm0exw+nLWmJPoNWH/NDo="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:vwfkoc3ICacsByVzXbuRNWC3q5I=
In-Reply-To: <km3lt7F8emlU14@mid.individual.net>
Content-Language: en-US
 by: Arne Vajhøj - Sat, 9 Sep 2023 17:16 UTC

On 9/9/2023 12:47 PM, bill wrote:
> On 9/9/2023 12:15 PM, Arne Vajhøj wrote:
>> On 9/9/2023 11:36 AM, bill wrote:
>>> On 9/9/2023 10:26 AM, Arne Vajhøj wrote:
>>>> On 9/9/2023 10:20 AM, Jan-Erik Söderholm wrote:
>>>>> Den 2023-09-09 kl. 16:02, skrev Dave Froble:
>>>>>> On 9/9/2023 9:29 AM, Jan-Erik Söderholm wrote:
>>>>>>> "Throughout this manual, and except where specific rules apply, the
>>>>>>> hyphen (-) and the underline (_) are treated as the same character
>>>>>>> in a user-defined word."
>>>>>>
>>>>>> I guess that could be compared to "case insensitive", but while I
>>>>>> consider case sensitivity to be less than reasonable, I find the
>>>>>> above to be really stupid. Sure makes searching for specific words
>>>>>> in a program complex.
>>>>>>
>>>>>> Got to understand Bill's objection to such.
>>>>>
>>>>> Stupid or not, it was not known to Bill and created that
>>>>> wrong comment of being two differnt symbols. I just showed
>>>>> that they are probably handled as the same symbol.
>>>>>
>>>>> That doesn't mean that I disagree with you... :-)
>>>>
>>>> Old languages sometimes has some rules that appears
>>>> very weird, because the expectation today is determined
>>>> by how a hundred newer languages has agreed on doing things
>>>> a different way.
>>>>
>>>> Take as an example this perfectly valid Fortran 77 program:
>>>>
>>>>        program weird
>>>>        integer*4 abc
>>>>        abc = 123
>>>>        write(*,*) abc
>>>>        write(*,*) a b c
>>>>        write(*,*) a     b     c
>>>>        end
>>>>
>>>> WTF??
>>>
>>> As an old school Fortran programmer as well as COBOL (Fortran was my
>>> second language other than various assemblers) all I see in this is
>>> that you don't understand Fortran.  That is a perfectly valid, not
>>> weird at all, program.  If you wanted it to treat "a", "b" and "c"
>>> as separate and distinct variables you should have used commas as the
>>> the language expects.  Spaces in that context are meaningless.  :-)
>>
>> Today it is considered weird that you can insert arbitrary
>> spaces in variable names.
>>
>
> That is all about parsing and really has nothing to do with the
> function of the language.

True.

But treating - as _ in Cobol (in some contexts) is also just parsing
and not function.

Arne

Re: COBOL example $MGBLSC

<udiaqv$5j2c$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29795&group=comp.os.vms#29795

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sat, 9 Sep 2023 13:42:55 -0400
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <udiaqv$5j2c$1@dont-email.me>
References: <udcn5f$31542$1@dont-email.me> <udd26q$32pot$1@dont-email.me>
<uddd48$348jj$1@dont-email.me> <uddimg$35476$1@dont-email.me>
<uddlte$35f98$1@dont-email.me> <udfj2g$3hote$1@dont-email.me>
<udfkn4$3i47t$1@dont-email.me> <km15gqF8emlU5@mid.individual.net>
<udg0rs$3mbio$1@dont-email.me> <km1mq8F8emnU7@mid.individual.net>
<udg90r$3fq1i$1@dont-email.me> <km39fkF8emlU9@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Sep 2023 17:42:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e0ca7542e7f8d2c872ca23813f8648e1";
logging-data="183372"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18iKqehMa1BF8KKLSoquEHSQSeNleTrRAw="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:Dq+xSMkTxO0mwf3Lxrm3i+kLHm4=
Content-Language: en-US
In-Reply-To: <km39fkF8emlU9@mid.individual.net>
 by: Arne Vajhøj - Sat, 9 Sep 2023 17:42 UTC

On 9/9/2023 9:15 AM, bill wrote:
> On 9/8/2023 6:59 PM, Chris Townley wrote:
>> On 08/09/2023 23:50, bill wrote:
>>> On 9/8/2023 4:40 PM, Arne Vajhøj wrote:
>>>> On 9/8/2023 1:55 PM, bill wrote:
>>>>>                      but, if it is merely a display problem how
>>>>> about a
>>>>> REDEFINES from COMP to DISPLAY instead of another variable and the
>>>>> MOVE?
>>>>
>>>> How would that look like?
>>>
>>> Can you point me at a copy of the VMS COBOL Reference Manual?
>>> This is something VMS specific.  I tried a couple sites.  One
>>> of them returned XML errors and sector7 pointed me at localhost.
>>> If I can grab a quick look at the manual I can probably provide
>>> a fairly clean way to do it.  I may even try to figure out how
>>> to get to EISNER after the port change and then I will actually
>>> test what I write.
>>
>> Try https://docs.vmssoftware.com/vsi-cobol-for-openvms-reference-guide
>> There is also a User guide
>>
>
>
> Afraid I will have to take a pass on this one.  Too much VMS
> specific stuff that makes no sense to me in COBOL.
> An example:
> ------------------------------
> LINKAGE SECTION.
>
>    01 GLOBAL-SECTION.
>
> -----------------------
>
> PROCEDURE DIVISION USING GLOBAL_SECTION.
>
> -----------------------------
>
> Note that the names don't match.  And, GLOBAL is a reserved word.

I think there are 3 parts of this:
A) how to call VMS system service SYS$MGBLSC
B) how to use returned address for Cobol data, which is where the
routine call somes in
C) how to display a comp

A and B are settled.

So you can focus on C.

Arne

Re: COBOL example $MGBLSC

<km3sdtF8emnU10@mid.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29796&group=comp.os.vms#29796

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bill.gun...@gmail.com (bill)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sat, 9 Sep 2023 14:38:52 -0400
Lines: 75
Message-ID: <km3sdtF8emnU10@mid.individual.net>
References: <udcn5f$31542$1@dont-email.me> <udd26q$32pot$1@dont-email.me>
<uddd48$348jj$1@dont-email.me> <uddimg$35476$1@dont-email.me>
<uddlte$35f98$1@dont-email.me> <udfj2g$3hote$1@dont-email.me>
<udfkn4$3i47t$1@dont-email.me> <km15gqF8emlU5@mid.individual.net>
<udg0rs$3mbio$1@dont-email.me> <km1mq8F8emnU7@mid.individual.net>
<udg90r$3fq1i$1@dont-email.me> <km39fkF8emlU9@mid.individual.net>
<udhrva$2ib2$1@dont-email.me> <udhtv0$3o1e$1@dont-email.me>
<udhuvd$2ib2$2@dont-email.me> <udhvag$3t63$2@dont-email.me>
<km3hn3F8emlU10@mid.individual.net> <udi5ng$4t22$2@dont-email.me>
<km3lt7F8emlU14@mid.individual.net> <udi99l$5cg1$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net n22dHqg0bMqkOOc6vMiywwEd6l0NMduedaO5Hj3QQ4J0GEDds+
Cancel-Lock: sha1:PvH+7y1xOQcZLVlqpAAONpb0vqk= sha256:UkLge++H0P6/4RZyokZaBOdg32dAhTvDO2e/c9auT5I=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Content-Language: en-US
In-Reply-To: <udi99l$5cg1$1@dont-email.me>
 by: bill - Sat, 9 Sep 2023 18:38 UTC

On 9/9/2023 1:16 PM, Arne Vajhøj wrote:
> On 9/9/2023 12:47 PM, bill wrote:
>> On 9/9/2023 12:15 PM, Arne Vajhøj wrote:
>>> On 9/9/2023 11:36 AM, bill wrote:
>>>> On 9/9/2023 10:26 AM, Arne Vajhøj wrote:
>>>>> On 9/9/2023 10:20 AM, Jan-Erik Söderholm wrote:
>>>>>> Den 2023-09-09 kl. 16:02, skrev Dave Froble:
>>>>>>> On 9/9/2023 9:29 AM, Jan-Erik Söderholm wrote:
>>>>>>>> "Throughout this manual, and except where specific rules apply, the
>>>>>>>> hyphen (-) and the underline (_) are treated as the same character
>>>>>>>> in a user-defined word."
>>>>>>>
>>>>>>> I guess that could be compared to "case insensitive", but while I
>>>>>>> consider case sensitivity to be less than reasonable, I find the
>>>>>>> above to be really stupid. Sure makes searching for specific
>>>>>>> words in a program complex.
>>>>>>>
>>>>>>> Got to understand Bill's objection to such.
>>>>>>
>>>>>> Stupid or not, it was not known to Bill and created that
>>>>>> wrong comment of being two differnt symbols. I just showed
>>>>>> that they are probably handled as the same symbol.
>>>>>>
>>>>>> That doesn't mean that I disagree with you... :-)
>>>>>
>>>>> Old languages sometimes has some rules that appears
>>>>> very weird, because the expectation today is determined
>>>>> by how a hundred newer languages has agreed on doing things
>>>>> a different way.
>>>>>
>>>>> Take as an example this perfectly valid Fortran 77 program:
>>>>>
>>>>>        program weird
>>>>>        integer*4 abc
>>>>>        abc = 123
>>>>>        write(*,*) abc
>>>>>        write(*,*) a b c
>>>>>        write(*,*) a     b     c
>>>>>        end
>>>>>
>>>>> WTF??
>>>>
>>>> As an old school Fortran programmer as well as COBOL (Fortran was my
>>>> second language other than various assemblers) all I see in this is
>>>> that you don't understand Fortran.  That is a perfectly valid, not
>>>> weird at all, program.  If you wanted it to treat "a", "b" and "c"
>>>> as separate and distinct variables you should have used commas as the
>>>> the language expects.  Spaces in that context are meaningless.  :-)
>>>
>>> Today it is considered weird that you can insert arbitrary
>>> spaces in variable names.
>>>
>>
>> That is all about parsing and really has nothing to do with the
>> function of the language.
>
> True.
>
> But treating - as _ in Cobol (in some contexts) is also just parsing
> and not function.

Not really the same. The space is not considered a valid character
within a name in any language that I know of. In COBOL the "-" and
"_" are considered valid characters for use in names and should
therefore be considered different.
Cases where different characters are considered
equivalent exist and are covered in the documentation. That is upper
and lower case letters are considered equivalent. No other characters
are considered equivalent in any compiler I have worked with except
the VMS compiler. I would love to see a pointer to any other compiler
that allows this.

bill

Re: COBOL example $MGBLSC

<udieot$2bl$2@news.misty.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29798&group=comp.os.vms#29798

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.80-218-16-84.dclient.hispeed.ch!not-for-mail
From: bqt...@softjar.se (Johnny Billquist)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sat, 9 Sep 2023 20:50:05 +0200
Organization: MGT Consulting
Message-ID: <udieot$2bl$2@news.misty.com>
References: <udcn5f$31542$1@dont-email.me> <udd26q$32pot$1@dont-email.me>
<uddd48$348jj$1@dont-email.me> <uddimg$35476$1@dont-email.me>
<uddlte$35f98$1@dont-email.me> <udfj2g$3hote$1@dont-email.me>
<udfkn4$3i47t$1@dont-email.me> <km15gqF8emlU5@mid.individual.net>
<udg0rs$3mbio$1@dont-email.me> <km1mq8F8emnU7@mid.individual.net>
<udg90r$3fq1i$1@dont-email.me> <km39fkF8emlU9@mid.individual.net>
<udhrva$2ib2$1@dont-email.me> <udhtv0$3o1e$1@dont-email.me>
<udhuvd$2ib2$2@dont-email.me> <udhvag$3t63$2@dont-email.me>
<km3hn3F8emlU10@mid.individual.net> <udi5ng$4t22$2@dont-email.me>
<km3lt7F8emlU14@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Sep 2023 18:50:05 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="80-218-16-84.dclient.hispeed.ch:80.218.16.84";
logging-data="2421"; mail-complaints-to="abuse@misty.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.15.0
In-Reply-To: <km3lt7F8emlU14@mid.individual.net>
 by: Johnny Billquist - Sat, 9 Sep 2023 18:50 UTC

On 2023-09-09 18:47, bill wrote:
> On 9/9/2023 12:15 PM, Arne Vajhøj wrote:
>> On 9/9/2023 11:36 AM, bill wrote:
>>> On 9/9/2023 10:26 AM, Arne Vajhøj wrote:
>>>> Old languages sometimes has some rules that appears
>>>> very weird, because the expectation today is determined
>>>> by how a hundred newer languages has agreed on doing things
>>>> a different way.
>>>>
>>>> Take as an example this perfectly valid Fortran 77 program:
>>>>
>>>>        program weird
>>>>        integer*4 abc
>>>>        abc = 123
>>>>        write(*,*) abc
>>>>        write(*,*) a b c
>>>>        write(*,*) a     b     c
>>>>        end
>>>>
>>>> WTF??
>>>
>>> As an old school Fortran programmer as well as COBOL (Fortran was my
>>> second language other than various assemblers) all I see in this is
>>> that you don't understand Fortran.  That is a perfectly valid, not
>>> weird at all, program.  If you wanted it to treat "a", "b" and "c"
>>> as separate and distinct variables you should have used commas as the
>>> the language expects.  Spaces in that context are meaningless.  :-)
>>
>> Today it is considered weird that you can insert arbitrary
>> spaces in variable names.
>>
>
> That is all about parsing and really has nothing to do with the
> function of the language.  The separator in that context is a comma,
> not a space, tab or any other invisible character.  :-)

It is not purely about parsing, but about the definition of the
language. Fortran 77 explicitly considered whitespace in this context as
non-significant.

Parsing is (or should be) based on the language specification/definition.

Johnny

Re: COBOL example $MGBLSC

<udifmp$q68$1@panix2.panix.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29800&group=comp.os.vms#29800

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.panix2.panix.com!panix2.panix.com!not-for-mail
From: klu...@panix.com (Scott Dorsey)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: 9 Sep 2023 19:06:01 -0000
Organization: Former users of Netcom shell (1989-2000)
Lines: 10
Message-ID: <udifmp$q68$1@panix2.panix.com>
References: <udcn5f$31542$1@dont-email.me> <udhvag$3t63$2@dont-email.me> <km3hn3 <udi5ng$4t22$2@dont-email.me>
Injection-Info: reader2.panix.com; posting-host="panix2.panix.com:166.84.1.2";
logging-data="12689"; mail-complaints-to="abuse@panix.com"
 by: Scott Dorsey - Sat, 9 Sep 2023 19:06 UTC

=?UTF-8?Q?Arne_Vajh=c3=b8j?= <arne@vajhoej.dk> wrote:
>Today it is considered weird that you can insert arbitrary
>spaces in variable names.

It has been for a while, but it was also one of the first things I taught
students when I taught freshman Fortran. Along with 2.0 and 2 being
completely different values that aren't equal.
--scott
--
"C'est un Nagra. C'est suisse, et tres, tres precis."

Re: COBOL example $MGBLSC

<udifqi$t3e$1@panix2.panix.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29801&group=comp.os.vms#29801

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.panix2.panix.com!panix2.panix.com!not-for-mail
From: klu...@panix.com (Scott Dorsey)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: 9 Sep 2023 19:08:02 -0000
Organization: Former users of Netcom shell (1989-2000)
Lines: 11
Message-ID: <udifqi$t3e$1@panix2.panix.com>
References: <udcn5f$31542$1@dont-email.me> <udhvag$3t63$2@dont-email.me> <km3hn3 <udieot$2bl$2@news.misty.com>
Injection-Info: reader2.panix.com; posting-host="panix2.panix.com:166.84.1.2";
logging-data="10287"; mail-complaints-to="abuse@panix.com"
 by: Scott Dorsey - Sat, 9 Sep 2023 19:08 UTC

Johnny Billquist <bqt@softjar.se> wrote:
>It is not purely about parsing, but about the definition of the
>language. Fortran 77 explicitly considered whitespace in this context as
>non-significant.

"Never put whitespace in equations because if you get in the habit of
doing that you'll use more continuation cards and cards are expensive."
-- M. Newell

--
"C'est un Nagra. C'est suisse, et tres, tres precis."

Re: COBOL example $MGBLSC

<udil30$71lm$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29804&group=comp.os.vms#29804

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sat, 9 Sep 2023 16:37:53 -0400
Organization: A noiseless patient Spider
Lines: 60
Message-ID: <udil30$71lm$1@dont-email.me>
References: <udcn5f$31542$1@dont-email.me> <udd26q$32pot$1@dont-email.me>
<uddd48$348jj$1@dont-email.me> <uddimg$35476$1@dont-email.me>
<uddlte$35f98$1@dont-email.me> <udfj2g$3hote$1@dont-email.me>
<udfkn4$3i47t$1@dont-email.me> <km15gqF8emlU5@mid.individual.net>
<udg0rs$3mbio$1@dont-email.me> <km1mq8F8emnU7@mid.individual.net>
<udg90r$3fq1i$1@dont-email.me> <km39fkF8emlU9@mid.individual.net>
<udhrva$2ib2$1@dont-email.me> <udhtv0$3o1e$1@dont-email.me>
<udhuvd$2ib2$2@dont-email.me> <udhvag$3t63$2@dont-email.me>
<km3hn3F8emlU10@mid.individual.net> <udi5ng$4t22$2@dont-email.me>
<km3lt7F8emlU14@mid.individual.net> <udi99l$5cg1$1@dont-email.me>
<km3sdtF8emnU10@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Sep 2023 20:37:53 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e0ca7542e7f8d2c872ca23813f8648e1";
logging-data="231094"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/3fhWcgCU4PgpJ3L0HDr8P2BTXqZZvqFc="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:qKUEotT0taz3AlQ3dopnimqwOAE=
Content-Language: en-US
In-Reply-To: <km3sdtF8emnU10@mid.individual.net>
 by: Arne Vajhøj - Sat, 9 Sep 2023 20:37 UTC

On 9/9/2023 2:38 PM, bill wrote:
> On 9/9/2023 1:16 PM, Arne Vajhøj wrote:
>> On 9/9/2023 12:47 PM, bill wrote:
>>> On 9/9/2023 12:15 PM, Arne Vajhøj wrote:
>>>> Today it is considered weird that you can insert arbitrary
>>>> spaces in variable names.
>>>>
>>>
>>> That is all about parsing and really has nothing to do with the
>>> function of the language.
>>
>> True.
>>
>> But treating - as _ in Cobol (in some contexts) is also just parsing
>> and not function.
>
> Not really the same.  The space is not considered a valid character
> within a name in any language that I know of.  In COBOL the "-" and
> "_" are considered valid characters for use in names and should
> therefore be considered different.
> Cases where different characters are considered
> equivalent exist and are covered in the documentation. That is upper
> and lower case letters are considered equivalent.  No other characters
> are considered equivalent in any compiler I have worked with except
> the VMS compiler.  I would love to see a pointer to any other compiler
> that allows this.

Not the exact same context, but close:

C:\Work>type m2.cob
IDENTIFICATION DIVISION.
PROGRAM-ID.M2.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 I-V PIC 9(9) DISPLAY EXTERNAL.
PROCEDURE DIVISION.
MAIN-PARAGRAPH.
MOVE 123 TO I-V
CALL "R2"
STOP RUN.

C:\Work>type r2.cob
IDENTIFICATION DIVISION.
PROGRAM-ID.R2.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 I_V PIC 9(9) DISPLAY EXTERNAL.
PROCEDURE DIVISION.
MAIN-PARAGRAPH.
DISPLAY I_V.
END PROGRAM R2.

C:\Work>cobc -Wall -free -x m2.cob r2.cob

C:\Work>m2
000000123

Arne

Re: COBOL example $MGBLSC

<udlm4e$om4q$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29824&group=comp.os.vms#29824

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sun, 10 Sep 2023 20:14:06 -0400
Organization: A noiseless patient Spider
Lines: 56
Message-ID: <udlm4e$om4q$1@dont-email.me>
References: <udcn5f$31542$1@dont-email.me> <udd26q$32pot$1@dont-email.me>
<uddd48$348jj$1@dont-email.me> <uddimg$35476$1@dont-email.me>
<uddlte$35f98$1@dont-email.me> <udfj2g$3hote$1@dont-email.me>
<udgklq$3t8m3$1@dont-email.me> <udglql$3tfkp$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Sep 2023 00:14:06 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="28ca6c9d5c554b433b19a6c64ccf821f";
logging-data="809114"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/DY63yoR0CgzFVV908KI8+LVEG/Huc2Ds="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:X9zWiFSyZJ/ey2viBlXLo19famk=
In-Reply-To: <udglql$3tfkp$1@dont-email.me>
Content-Language: en-US
 by: Arne Vajhøj - Mon, 11 Sep 2023 00:14 UTC

On 9/8/2023 10:38 PM, Arne Vajhøj wrote:
> Or if you really want to hack it:
>
> identification division.
> program-id.hex2.
> *
> data division.
> working-storage section.
> 01  v       pic 9(9) comp.
> 01  fmt     pic x(11) value "%d %08x%c%c".
> 01  cr      pic 9(9) comp value 13.
> 01  lf      pic 9(9) comp value 10.
> *
> procedure division.
> main-paragraph.
>     move 123 to v
>     call "DECC$GXPRINTF"
>         using
>            by reference fmt
>            by value v
>            by value v
>            by value cr
>            by value lf
>     end-call
>     stop run.

Not good code. No guarantee that there will be
a terminating zero byte. And %c%c CR LF is
clumsy instead of \n.

So:

identification division.
program-id.hex2.
* data division.
working-storage section.
01 v pic 9(9) comp.
01 fmt.
03 str pic x(7) value "%d %08x".
03 lfz pic 9(9) comp value 10.
* procedure division.
main-paragraph.
move 123 to v
call "DECC$GXPRINTF"
using
by reference fmt
by value v
by value v
end-call
stop run.

Arne

Re: COBOL example $MGBLSC

<udlsfa$pbcl$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29827&group=comp.os.vms#29827

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: COBOL example $MGBLSC
Date: Sun, 10 Sep 2023 22:02:17 -0400
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <udlsfa$pbcl$2@dont-email.me>
References: <udcn5f$31542$1@dont-email.me> <udd26q$32pot$1@dont-email.me>
<uddd48$348jj$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 11 Sep 2023 02:02:18 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="28ca6c9d5c554b433b19a6c64ccf821f";
logging-data="830869"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/6jWO/pgDeKrfTZ0XcpZ0FgaeqA22qjy4="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.0
Cancel-Lock: sha1:GY6dv+tO08cXUaRwNdArUVeeqkQ=
In-Reply-To: <uddd48$348jj$1@dont-email.me>
Content-Language: en-US
 by: Arne Vajhøj - Mon, 11 Sep 2023 02:02 UTC

On 9/7/2023 4:51 PM, Arne Vajhøj wrote:
> On 9/7/2023 1:44 PM, Brian Schenkenberger wrote:
>> On 2023-09-07 14:36:31 +0000, Brian Schenkenberger said:
>>> I need to tell a customer how to map, assuming this is even possible,
>>> a global section into which I write data for them. They only do
>>> COBOL. :( Is this possibe? How does one reference the data once
>>> mapped in the expanded region? I've tried to make heads or tails of
>>> COBOL but I get totally lost in the PICs.
>>>
>>> If only somebody would do what Jim Duff did for calling system
>>> services with C but using COBOL. So very few examples exist.
>>
>> OK.  I've gotten this far but now I have no idea how to access the
>> data in the mapped region.
>>
>> IDENTIFICATION DIVISION.
....
>> *** NOW WHAT???
....
> For inspiration:
>
> $ type main.cob
> IDENTIFICATION DIVISION.
....
> $ type brian.cob
> IDENTIFICATION DIVISION.

I have updated https://www.vajhoej.dk/arne/articles/vmsipc.html
sections "Shared Memory" and "Memory Mapped File" with:
* added Cobol example (before only C, Fortran and Pascal)
* added expanding P0 region examples (before only mapping
existing address space)
* fixed a small bug in sys$crmpsc call

Arne

Pages:12
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor