__getcb  alias c'@@GETCB'

This works with
         call __getcb,(3)

But is rather pointless, I suppose, since I can just call @@GETCB directly.

I can also use:
__getcb  alias c'__getcb'

This also seems to assemble properly, but the binder can't find __getcb.  Which 
I sort of understand, because as you say, @@GETCB is the external name.

However in COBOL it works, because of some sort of rename process I don't 
understand.


      0     2610     CEEBPIRC           LABEL

                        *** M O D U L E  M A P ***



SECTION    CLASS                                      ------- SOURCE --------

OFFSET   OFFSET  NAME                TYPE    LENGTH  DDNAME   SEQ  MEMBER





            28B0  @@GETCB         *  CSECT         A  SYSLIB    02  @@GETCB



          ***  DATA SET SUMMARY  ***



DDNAME    CONCAT   FILE IDENTIFICATION



DSNLOAD     01     SYS3.ZOSD.DSN1.SDSNLOAD

SYSLIB      02     SYS1.SCEELKED

SYSLIN      02     CICS.CTS540.RSU2212.SDFHLOAD

SYSLIN      04     SYS23098.T101939.RA000.DVFJSC.OBJMOD.H02

 ***  RENAMED SYMBOL CROSS REFERENCE  ***

 ---------------------

 RENAMED SYMBOL

       SOURCE SYMBOL

 ---------------------



 @@GETCB

       __getcb



 ***  END OF RENAMED SYMBOL CROSS REFERENCE  ***

I don't know how the symbol rename process is invoked.

________________________________
From: IBM Mainframe Discussion List <[email protected]> on behalf of 
Tony Harminc <[email protected]>
Sent: Saturday, April 8, 2023 8:56 AM
To: [email protected] <[email protected]>
Subject: Re: Call by value, final

On Sat, 8 Apr 2023 at 00:27, Frank Swarbrick
<[email protected]> wrote:
>
> For those interested, the following calls C function "@@GETCB" ( int 
> __getcb(int); ) passing the fullword 3 by value.  There are several 
> alternatives, as discussed earlier, but this is what I am going with.
>
> ***********************************************************************
> *  see if we're running under cics by calling @@GETCB with fullword   *
> *  value 3 (call by value).                                           *
> ***********************************************************************
>          ceedsa ,
>          ceecaa ,
> iscics   ceeentry main=NO
>          call  @@GETCB,(3)
>          ceeterm RC=(15)
> ppa      ceeppa ,
>          end   iscics
>
> Note:  __getcb() and @@GETCB are the same routine.  I couldn't figure out how 
> to get a lower case call literal to work.  The assembler seems OK with it, 
> but the linker is converted to upper case, even though I've specified 
> CASE(MIXED).  Any thoughts on this are welcome, even though it's working fine 
> as-is.  Using lowercase literals in this manner is allowed in COBOL, even, 
> with "PGMNAME(mIxEdCaSe)".

What goes wrong if you specify

call __getcb ?

You say "the linker is converted to upper case" - not sure what that
means. What is converting what to upper case?

Maybe you need an ALIAS assembler statement. I've used it for long
external names, but I don't know about casing. It may be that the
library supplied external name just is @@GETCB .

Tony H.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to