Ah, I'm compiling with PGMNAME(COMPAT).

And I misread the documentation for PGMNAME(LONGUPPER). This behavior is 
conforming to the documentation. It says that PGMNAME(COMPAT) can contain 
national characters:

"All the characters used in the name must be alphabetic, digits, the hyphen, or 
the underscore, except
that if the program-name is a literal and is in the outermost program, then the 
literal can also contain
the extension characters @, #, and $, and the first character can be an 
underscore."

And that for PGMNAME(LONGMIXED) it can contain any character in the range x'41' 
- x'FE',

But PGMNAME(LONGUPPER) only allows for alphabetic, digits, hyphen, underscore. 
@, #, $ are not alphabetic.


What's interesting is that PGMNAME(COMPAT) says that:

If the first character is not alphabetic, and is not an underscore, it is 
converted as follows:
- 1-9 are translated to A-I.
- Anything else is translated to J.

I think this is a documentation error. You can call literal to a name like 
'@SESTEST' without conversion, and you can use it as a program id as long as it 
is in quotes.


It is true that it *used to be* that you couldn't have a program-id starting 
with @. I don't know at what point that restriction was lifted. Maybe with IBM 
COBOL?


-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Frank Swarbrick
Sent: Monday, April 10, 2023 12:23 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Cobol calling module with non alphanumeric no longer allowed???

Interesting.  Apparently it works for both PGMNAME(COMPAT) and 
PGMNAME(LONGMIXED), but not for PGMNAME(LONGUPPER), which is what we are using.

  000019         001600 procedure division.
  000020         001610     call '@SEPTEST'                                     
                  EXT

==000020==> IGYPS0025-E Name "'@SEPTEST'" was invalid.  It was processed as 
"0SEPTEST".

==000020==> IGYPG0020-W Name "0SEPTEST" was processed as "JSEPTEST".

  000021         001700     goback.

Sounds like a bug.  Though unlike what I said, E.COBOL v4.2 has the same issue. 
 The difference for me was we had 4.2 set with PGMNAME(COMPAT) while 5+ we have 
PGMNAME(LONGUPPER).

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Schmitt, Michael
Sent: Monday, April 10, 2023 8:31 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Cobol calling module with non alphanumeric no longer allowed???

A call to '@SEPTEST' compiles for me with both DYNAM and NODYNAM on COBOL for 
z/OS 6.20. Per the PGMNAME compile option, this is allowed in all settings of 
that option.

What do you have for FLAGSTD?

Can you post the exact compile error?

Note that such a program id would need to be enclosed in quotes for that to 
compile.



-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Frank Swarbrick
Sent: Saturday, April 8, 2023 1:25 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Cobol calling module with non alphanumeric no longer allowed???

I am indeed using DYNAM.

I have no great need for this to work.  Just something I noticed and was 
curious about.
________________________________
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of 
Farley, Peter <0000031df298a9da-dmarc-requ...@listserv.ua.edu>
Sent: Friday, April 7, 2023 11:50 PM
To: IBM-MAIN@LISTSERV.UA.EDU <IBM-MAIN@LISTSERV.UA.EDU>
Subject: Re: Cobol calling module with non alphanumeric no longer allowed???

Not true for non-static calls.  We are past COBOL 5 (V6.2 at the moment) and 
"CALL variable USING . . . " where "variable" has any of the "national" 
characters ($#@) works every time.  We have multiple dynamically called utility 
subroutines with those characters in the program name.

Why in the world are you using literal calls?  Or are you using the DYNAM 
option to convert literal calls to dynamic ones?  If so, bite the bullet - 
convert them to "CALL variable" and you are done.

The only legitimate case I have seen for using literal CALL's is when you are 
using nested subroutine programs in the same source file as the calling program.

Peter

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Frank Swarbrick
Sent: Friday, April 7, 2023 6:07 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Cobol calling module with non alphanumeric no longer allowed???

I've tried calling modules (that exist!) with both '@' and '#' signs in them 
and Enterprise COBOL 5+ does not allow this.  COBOL 4 allowed this.  Is there 
any good reason why this is the case?
--

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to