Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

HEAD CRASH!! FILES LOST!! Details at 11.


devel / comp.lang.cobol / special-names?

SubjectAuthor
* special-names?Bruce Axtens
+- Re: special-names?Rick Smith
`- Re: special-names?Arnold Trembley

1
special-names?

<0947fa69-5e2a-45e8-9322-d7c919803a46n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=415&group=comp.lang.cobol#415

  copy link   Newsgroups: comp.lang.cobol
X-Received: by 2002:a05:6214:3383:b0:534:6d71:f783 with SMTP id mv3-20020a056214338300b005346d71f783mr316109qvb.29.1673687543400;
Sat, 14 Jan 2023 01:12:23 -0800 (PST)
X-Received: by 2002:ad4:52c1:0:b0:532:34a0:2174 with SMTP id
p1-20020ad452c1000000b0053234a02174mr742373qvs.27.1673687543179; Sat, 14 Jan
2023 01:12:23 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.cobol
Date: Sat, 14 Jan 2023 01:12:22 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=49.196.253.140; posting-account=1W9SuAoAAAApKJ8N7QNszANYOyWIVzjG
NNTP-Posting-Host: 49.196.253.140
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0947fa69-5e2a-45e8-9322-d7c919803a46n@googlegroups.com>
Subject: special-names?
From: bruce.axtens@gmail.com (Bruce Axtens)
Injection-Date: Sat, 14 Jan 2023 09:12:23 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1892
 by: Bruce Axtens - Sat, 14 Jan 2023 09:12 UTC

IDENTIFICATION DIVISION.
PROGRAM-ID. ISOGRAM.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SPECIAL-NAMES.
ALPHABET LOWERCASE IS "abcdefghijklmnopqrstuvwxyz".
ALPHABET UPPERCASE IS "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-PHRASE PIC X(60).
PROCEDURE DIVISION.
ISOGRAM.
MOVE "my dog has fleas" TO WS-PHRASE.
INSPECT WS-PHRASE CONVERTING LOWERCASE to UPPERCASE.
display "ws-phrase " WS-PHRASE.
GOBACK.

JDoodle.com gives me

ws-phrase _ 
 


whereas tutorialspoint and onecompiler give me

main.cobc: 14: error: 'LOWERCASE' is not a field
main.cobc: 14: error: 'UPPERCASE' is not a field

Is it just the way it is that I have to have my upper and lowercase case alphabets declared in working-storage for the inspect converting to work?

Bruce

Re: special-names?

<8ebfea5e-b2ac-4563-847f-5e12920a1ffdn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=416&group=comp.lang.cobol#416

  copy link   Newsgroups: comp.lang.cobol
X-Received: by 2002:a05:6214:1913:b0:534:6f77:4747 with SMTP id er19-20020a056214191300b005346f774747mr364058qvb.40.1673699969145;
Sat, 14 Jan 2023 04:39:29 -0800 (PST)
X-Received: by 2002:ac8:4552:0:b0:3ab:9aec:51be with SMTP id
z18-20020ac84552000000b003ab9aec51bemr3107986qtn.637.1673699968882; Sat, 14
Jan 2023 04:39:28 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.cobol
Date: Sat, 14 Jan 2023 04:39:28 -0800 (PST)
In-Reply-To: <0947fa69-5e2a-45e8-9322-d7c919803a46n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=98.180.88.86; posting-account=CcFQgQoAAAB4uPj9HOgZiRCM2Y_v-jmi
NNTP-Posting-Host: 98.180.88.86
References: <0947fa69-5e2a-45e8-9322-d7c919803a46n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8ebfea5e-b2ac-4563-847f-5e12920a1ffdn@googlegroups.com>
Subject: Re: special-names?
From: rs847925@gmail.com (Rick Smith)
Injection-Date: Sat, 14 Jan 2023 12:39:29 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2466
 by: Rick Smith - Sat, 14 Jan 2023 12:39 UTC

On Saturday, January 14, 2023 at 4:12:24 AM UTC-5, bruce....@gmail.com wrote:
> IDENTIFICATION DIVISION.
> PROGRAM-ID. ISOGRAM.
> ENVIRONMENT DIVISION.
> CONFIGURATION SECTION.
> SPECIAL-NAMES.
> ALPHABET LOWERCASE IS "abcdefghijklmnopqrstuvwxyz".
> ALPHABET UPPERCASE IS "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
> DATA DIVISION.
> WORKING-STORAGE SECTION.
> 01 WS-PHRASE PIC X(60).
> PROCEDURE DIVISION.
> ISOGRAM.
> MOVE "my dog has fleas" TO WS-PHRASE.
> INSPECT WS-PHRASE CONVERTING LOWERCASE to UPPERCASE.
> display "ws-phrase " WS-PHRASE.
> GOBACK.
>
> JDoodle.com gives me
>
> ws-phrase _
>
>
>
> whereas tutorialspoint and onecompiler give me
>
> main.cobc: 14: error: 'LOWERCASE' is not a field
> main.cobc: 14: error: 'UPPERCASE' is not a field
>
> Is it just the way it is that I have to have my upper and lowercase case alphabets declared in working-storage for the inspect converting to work?
>
> Bruce

The INSPECT statement requires identifiers or literals,
but LOWERCASE and UPPERCASE are alphabet-names.

You could copy the literals from the ALPHABET clauses
to the INSPECT statement or use the UPPER-CASE function.

MOVE FUNCTION UPPER-CASE (WS-PHRASE) TO WS-PHRASE

Re: special-names?

<ZtOcnV_MN4NIP17-nZ2dnZfqn_GdnZ2d@giganews.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=418&group=comp.lang.cobol#418

  copy link   Newsgroups: comp.lang.cobol
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sun, 15 Jan 2023 06:53:09 +0000
Date: Sun, 15 Jan 2023 00:53:08 -0600
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Subject: Re: special-names?
Newsgroups: comp.lang.cobol
References: <0947fa69-5e2a-45e8-9322-d7c919803a46n@googlegroups.com>
Content-Language: en-US
From: arnold.trembley@att.net (Arnold Trembley)
In-Reply-To: <0947fa69-5e2a-45e8-9322-d7c919803a46n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: Avast (VPS 230114-4, 1/14/2023), Outbound message
X-Antivirus-Status: Clean
Message-ID: <ZtOcnV_MN4NIP17-nZ2dnZfqn_GdnZ2d@giganews.com>
Lines: 53
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-zZFTYP4pExr30U5vN7hbxTL5YxmQC7jVM8H2hv0oRtYm4+Blt6PjvZIa+7h3bsGwgaVNfIiyZMzNUAZ!OIhukTEKbO5m7+BHUmp5A54oEP3N9NmjoWA0RNBXwpBRoyQZC9cnq5Bw1gW/tY1s3SG4aWOL4Q==
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: Arnold Trembley - Sun, 15 Jan 2023 06:53 UTC

On 1/14/2023 3:12 AM, Bruce Axtens wrote:
> IDENTIFICATION DIVISION.
> PROGRAM-ID. ISOGRAM.
> ENVIRONMENT DIVISION.
> CONFIGURATION SECTION.
> SPECIAL-NAMES.
> ALPHABET LOWERCASE IS "abcdefghijklmnopqrstuvwxyz".
> ALPHABET UPPERCASE IS "ABCDEFGHIJKLMNOPQRSTUVWXYZ".

CLASS LOWERCASE IS "abcdefghijklmnopqrstuvwxyz"
CLASS UPPERCASE IS "ABCDEFGHIJKLMNOPQRSTUVWXYX".

Note: Only ONE period to terminate all SPECIAL-NAMES.

To use INSPECT the way you want, you need to define CLASSes of characters.

ALPHABET means something entirely different, and uses standard names
like EBCDIC, ASCII, or NATIVE.

Rick Smith's example using COBOL intrinsic functions will also work.

Kind regards,

> DATA DIVISION.
> WORKING-STORAGE SECTION.
> 01 WS-PHRASE PIC X(60).
> PROCEDURE DIVISION.
> ISOGRAM.
> MOVE "my dog has fleas" TO WS-PHRASE.
> INSPECT WS-PHRASE CONVERTING LOWERCASE to UPPERCASE.
> display "ws-phrase " WS-PHRASE.
> GOBACK.
>
> JDoodle.com gives me
>
> ws-phrase _ 
>  
> 
>
> whereas tutorialspoint and onecompiler give me
>
> main.cobc: 14: error: 'LOWERCASE' is not a field
> main.cobc: 14: error: 'UPPERCASE' is not a field
>
> Is it just the way it is that I have to have my upper and lowercase case alphabets declared in working-storage for the inspect converting to work?
>
> Bruce

--
https://www.arnoldtrembley.com/

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor