Discussion:
LE and 64-bit applications
Add Reply
Frank Swarbrick
2017-12-02 00:20:45 UTC
Reply
Permalink
Raw Message
I had the thought to test calling LE routines from the Swift beta. I have been successful in calling a couple of the routines that are declared in the __le_api.h header. But it appears that the CEE* routines are not available in 64-bit mode. Is this true? If so, any idea why?

I have no particular need for this, but I thought it would be interesting to do.

Thanks,
Frank

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Charles Mills
2017-12-02 00:52:37 UTC
Reply
Permalink
Raw Message
CEE.SCEEBND2 rather than CEE.SCEELKED?

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-***@LISTSERV.UA.EDU] On
Behalf Of Frank Swarbrick
Sent: Friday, December 1, 2017 4:22 PM
To: IBM-***@LISTSERV.UA.EDU
Subject: LE and 64-bit applications

I had the thought to test calling LE routines from the Swift beta. I have
been successful in calling a couple of the routines that are declared in the
__le_api.h header. But it appears that the CEE* routines are not available
in 64-bit mode. Is this true? If so, any idea why?

I have no particular need for this, but I thought it would be interesting to
do.

Thanks,
Frank

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

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
John McKown
2017-12-02 02:49:46 UTC
Reply
Permalink
Raw Message
Post by Frank Swarbrick
I had the thought to test calling LE routines from the Swift beta. I have
been successful in calling a couple of the routines that are declared in
the __le_api.h header. But it appears that the CEE* routines are not
available in 64-bit mode. Is this true? If so, any idea why?
​From:
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.ceea300/clscen1.htm

[quote]

*Restriction:* Language Environment services are not supported for AMODE 64
applications.

[/quote]​

However, there is this:
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.ceeam00/toc.htm

[quote from
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.ceeam00/overv.htm
]

Introduction to Language Environment for AMODE 64 applications

Language Environment supports 64-bit addressing for applications written in
C, C++, or Language Environment-conforming Assembler.

In the 64-bit addressing mode (AMODE 64) Language Environment supports
addresses that are 64 bits in length, which allows access to data in
virtual storage up to 16 exabytes. Hence applications that work with large
databases or large volumes of data can consolidate data in one address
space. There are a few things to note:

An AMODE 64 Language Environment® application supports XPLINK linkage only
and the C runtime environment is always initialized. A new library,
CELQLIB, is shipped for AMODE 64 support, while the existing libraries
continue to be shipped and supported.
Preinitialized environments are supported via CELQPIPI.
The user stack and heap, along with most of Language Environment storage is
above the 2 GB bar.
There is a new anchor for AMODE 64 applications so register 12 no longer
needs to be reserved for the address of the CAA.
The only means of communication between AMODE 64 and AMODE 24 or AMODE 31
applications is through mechanisms that can communicate across processes or
address spaces. However, Language Environment applications that use AMODE
64 can run with existing applications that use AMODE 24 or AMODE 31 on the
same physical z/OS® system.
Where necessary, there are new Language Environment runtime options to
support AMODE 64 applications. The new runtime options primarily support
the new stack and heap storage located above the bar. Some of the existing
options are no longer available.

[/quote]

​So I'm thinking that AMODE(64) is basically only for C & HLASM and you
_must_ use the 64-bit C subroutine ​library and/or the BPX4* (UNIX) and/or
assembler macros which handle 64-bits.
Post by Frank Swarbrick
I have no particular need for this, but I thought it would be interesting to do.
Thanks,
Frank
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
--
I have a theory that it's impossible to prove anything, but I can't prove
it.

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Don Poitras
2017-12-02 06:42:41 UTC
Reply
Permalink
Raw Message
Post by Frank Swarbrick
I had the thought to test calling LE routines from the Swift beta. I have
been successful in calling a couple of the routines that are declared in
the __le_api.h header. But it appears that the CEE* routines are not
available in 64-bit mode. Is this true? If so, any idea why?
snip
?So I'm thinking that AMODE(64) is basically only for C & HLASM and you
_must_ use the 64-bit C subroutine ?library and/or the BPX4* (UNIX) and/or
assembler macros which handle 64-bits.
You can run AMODE(64) without LE at all if you wish. If you want to
use LE functions, then you must compile XPLINK and use the 64-bit
libraries. HLASM can be coded for subroutines, but can't be the main(),
so you can't have _just_ HLASM running AMODE64 using LE. PL1 was also
recently added to the 64-bit family.
--
Don Poitras - SAS Development - SAS Institute Inc. - SAS Campus Drive
***@sas.com (919) 531-5637 Cary, NC 27513

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Frank Swarbrick
2017-12-04 22:56:04 UTC
Reply
Permalink
Raw Message
Hmm, interesting. I guess they have made a few available via the names in __le_api.h, and the others are not available at all. Guess no one has asked for the others yet. Interesting...

FWIW, the Swift z/OS beta uses the same 64-bit "interface" as does 64-bit C.
________________________________
From: IBM Mainframe Discussion List <IBM-***@LISTSERV.UA.EDU> on behalf of John McKown <***@GMAIL.COM>
Sent: Friday, December 1, 2017 7:51 PM
To: IBM-***@LISTSERV.UA.EDU
Subject: Re: LE and 64-bit applications
Post by Frank Swarbrick
I had the thought to test calling LE routines from the Swift beta. I have
been successful in calling a couple of the routines that are declared in
the __le_api.h header. But it appears that the CEE* routines are not
available in 64-bit mode. Is this true? If so, any idea why?
​From:
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.ceea300/clscen1.htm

[quote]

*Restriction:* Language Environment services are not supported for AMODE 64
applications.

[/quote]​

However, there is this:
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.ceeam00/toc.htm

[quote from
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.ceeam00/overv.htm
]

Introduction to Language Environment for AMODE 64 applications

Language Environment supports 64-bit addressing for applications written in
C, C++, or Language Environment-conforming Assembler.

In the 64-bit addressing mode (AMODE 64) Language Environment supports
addresses that are 64 bits in length, which allows access to data in
virtual storage up to 16 exabytes. Hence applications that work with large
databases or large volumes of data can consolidate data in one address
space. There are a few things to note:

An AMODE 64 Language Environment® application supports XPLINK linkage only
and the C runtime environment is always initialized. A new library,
CELQLIB, is shipped for AMODE 64 support, while the existing libraries
continue to be shipped and supported.
Preinitialized environments are supported via CELQPIPI.
The user stack and heap, along with most of Language Environment storage is
above the 2 GB bar.
There is a new anchor for AMODE 64 applications so register 12 no longer
needs to be reserved for the address of the CAA.
The only means of communication between AMODE 64 and AMODE 24 or AMODE 31
applications is through mechanisms that can communicate across processes or
address spaces. However, Language Environment applications that use AMODE
64 can run with existing applications that use AMODE 24 or AMODE 31 on the
same physical z/OS® system.
Where necessary, there are new Language Environment runtime options to
support AMODE 64 applications. The new runtime options primarily support
the new stack and heap storage located above the bar. Some of the existing
options are no longer available.

[/quote]

​So I'm thinking that AMODE(64) is basically only for C & HLASM and you
_must_ use the 64-bit C subroutine ​library and/or the BPX4* (UNIX) and/or
assembler macros which handle 64-bits.
Post by Frank Swarbrick
I have no particular need for this, but I thought it would be interesting
to do.
Thanks,
Frank
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
--
I have a theory that it's impossible to prove anything, but I can't prove
it.

Maranatha! <><
John McKown

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

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to ***@listserv.ua.edu with the message: INFO IBM-MAIN
Tom Marchant
2017-12-04 13:29:11 UTC
Reply
Permalink
Raw Message
Post by John McKown
[quote from
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.ceeam00/overv.htm
]
An AMODE 64 Language Environment® application supports XPLINK linkage only
and the C runtime environment is always initialized. A new library,
CELQLIB, is shipped for AMODE 64 support, while the existing libraries
continue to be shipped and supported.
There are two different flavors of XPLINK. 31-bit XPLINK is not
compatible with XPLINK-64, and LE does not provide an easy way to call
31-bit XPLINK applications from an XPLINK-64 application. If you want to
know more about how this works, it is documented in the LE Vendor
Interfaces manual.

An XPLINK application can call a non-XPLINK assembler program. Because
XPLINK-64 has the stack located above the bar, a non-XPLINK program
that is called from an XPLINK-64 program must be AMODE 64 in order to
save its caller's registers. It can then acquire storage below the bar and
call AMODE 31 programs.

Transitioning between XPLINK and non-XPLINK is expensive, much more
so than transitioning between AMODE 31 and AMODE 64 non-XPLINK
programs.

The stubborn refusal of LE to support non-XPLINK AMODE 64 programs
makes no sense to me. As someone mentioned, PL/I has begun to
support AMODE 64, and there has been talk that eventually Cobol will
too. Many system services require non-XPLINK program calls. GET and
PUT, for example, are extensively used in Cobol programs.

I suspect that it might be possible for an XPLINK-64 program to create
a new enclave and call a 31-bit XPLINK program or a non-XPLINK LE
enabled program. I have not looked into doing this yet, and have no
idea whether it will work, or if it will, how well it will work. And if it works,
I expect that the cost in CPU cycles will be quite high.
--
Tom Marchant

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