LINKing to Language-Environment conforming routine 
Author Message
 LINKing to Language-Environment conforming routine

Hi there,

    Does anybody know how to 'SVC LINK' from standard ASM/370 routine
(Language-environment is NOT up) to Language-Environment conforming ASM/370
routine (with CEEENTRY/CEETERM etc.)?

    Seems like a regular 'LINK' doesn't work - it abends S0C4 on CEEPLPKA.

    Anybody experienced this problem before?

  Regards,

--------------------------
   Itsik Shabtay



Wed, 22 Aug 2001 03:00:00 GMT  
 LINKing to Language-Environment conforming routine
You have to start a LE environment from your non-LE program using the
CEEPIPI interface. Consult the IBM Language Environment Programming
Guide. From a non-LE/VSE-conforming driver (such as assembler) you can
use LE/VSE preinitialization facilities to create and initialize a
common run-time environment, execute applications written in an
LE/VSE-conforming HLL multiple times within the pre-initialized
environment, and terminate the pre-initialized environment. You can not
use a LINK to enter a LE conforming routine from a non-LE program.  You
must use the CEEPIPI function calls.

There is a known bug in the CEETERM macro. The CEETERM macro does not
generate a CEEMAIN CSECT when MAIN=YES is specified in the CEEENTRY
macro.  The symptom is the ACEEMAIN pointer in the PLIST is 0. The
problem is not evident until after the link-edit has been done. APAR
PQ24607 is required in MVS.  The same problem exists in VSE but an APAR
number has not yet been assigned.  These APARs will not be available for
a few weeks.



Wed, 22 Aug 2001 03:00:00 GMT  
 LINKing to Language-Environment conforming routine
On Sat, 6 Mar 1999 10:30:42 +0200, "Itsik Shabtay"

Quote:

>    Does anybody know how to 'SVC LINK' from standard ASM/370 routine
>(Language-environment is NOT up) to Language-Environment conforming ASM/370
>routine (with CEEENTRY/CEETERM etc.)?
>    Seems like a regular 'LINK' doesn't work - it abends S0C4 on CEEPLPKA.

Take a look at the LE Interlanguage manual (there's a version of it
online at
http://www.s390.ibm.com:80/bookmgr-cgi/bookmgr.cmd/BOOKS/CEEA400/CCON...).
There is a chapter on invoking LE applications from non-LE
environments, particularly Assembler.

----------
Bill Manry - IBM Products Division - Oracle Corp. USA
These are my opinions, not Oracle's.



Wed, 22 Aug 2001 03:00:00 GMT  
 LINKing to Language-Environment conforming routine
Hi GGG,

First, thanks for the advice - it's VERY helpful.

Secondly - I'm not quite sure about "can't use LINK". Can't you
just LINK to an LE/370 MAIN program (CEEENTRY MAIN=YES)? What are the
demands of the LE/370 MAIN program, that SVC LINK does not supply?

From the LE/370 Programming Guide (OS/390 v2.7):
------------------------------------------------

Language Environment-conforming Assembler
-----------------------------------------

"When you use the macros listed in Assembler Macros on page 483 to write
your
Language Environment-conforming assembler routines, the macros generate code
that follows the required register conventions.

On entry into the Language Environment-conforming assembler main routine,
regis-ters
must contain the following values because they are passed without change to
the CEEENTRY macro:

R0 Address of a parameter list, if the main routine is invoked from VM
R1 Address of the parameter list, or zero if no parameters are passed
R13 Caller's standard register save area
R14  Return address
R15 Entry point address"

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

I tried it yesterday, and it was OK. I didn't test it roughly (I mean,
I didn't try to complicate none too much), but it worked.
I LINKed from a non-LE ASM/370 to LE-conformant ASM/370.

  Regards,

--------------------------
   Itsik Shabtay

Quote:

>You have to start a LE environment from your non-LE program using the
>CEEPIPI interface. Consult the IBM Language Environment Programming
>Guide. From a non-LE/VSE-conforming driver (such as assembler) you can
>use LE/VSE preinitialization facilities to create and initialize a
>common run-time environment, execute applications written in an
>LE/VSE-conforming HLL multiple times within the pre-initialized
>environment, and terminate the pre-initialized environment. You can not
>use a LINK to enter a LE conforming routine from a non-LE program.  You
>must use the CEEPIPI function calls.

>There is a known bug in the CEETERM macro. The CEETERM macro does not
>generate a CEEMAIN CSECT when MAIN=YES is specified in the CEEENTRY
>macro.  The symptom is the ACEEMAIN pointer in the PLIST is 0. The
>problem is not evident until after the link-edit has been done. APAR
>PQ24607 is required in MVS.  The same problem exists in VSE but an APAR
>number has not yet been assigned.  These APARs will not be available for
>a few weeks.



Thu, 23 Aug 2001 03:00:00 GMT  
 LINKing to Language-Environment conforming routine
Try adding this to the CEETERM macro:                          

.OUT1   ANOP        
        AIF (&CEEMAIN EQ 1).MAIN1                              
CEEMAIN CSECT                                                  
        DC A(&CEEOEPVNX)                                              
DC F'0'                                                 &CEEOEPVNX
CSECT                                                
.MAIN1  ANOP                                                          
MEND

This is what IBM sent me as the relief fixtest.  Reassemble with this
and see if it then works.  If you compare your old and new assembly and
link output you will see a new CEEMAIN csect in the object listing and
in the link-edit map.

I was under the impression that a LE environment had to be active before
you could link to a LE conforming program, but I may be wrong.  I have
been using the CEEPIPI interface because I could not always know what
kind of a program I had so I loaded it in the non-LE environment,
checked the entry for one of the LE signatures, initialized and added
the entry to the appropriate LE environment based upon the type of LE
program that was loaded and then called it using the CEEPIPI functions.
According to the book this is supposed to be the better way of doing it
because the overhead associated with initializing a LE environment is
avoided if the the routine is called multiple times. If you decide to
use CEEPIPI be sure you have APARs PQ23261, PQ23298, and 23617 applied.
If you are going to call both main and sub programs then initialize the
main environment first and then the sub_dp
environment.



Thu, 23 Aug 2001 03:00:00 GMT  
 LINKing to Language-Environment conforming routine
We have programs like that and we had no problems

What you should look for:
- Is your calling program LE compliant?
- In which language is your calling program written?
- Did you specified main=yes,nab=yes  in the ceeentry macro?
- did you looked at ceefetch and ceeload?

You should not worry about the fact that LE is not up, as explained in le
programming guide, the SVC LINK will create a new enclave (btw this is a
very slow process).

Hope that helped

Denis.

Quote:

>Hi there,

>    Does anybody know how to 'SVC LINK' from standard ASM/370 routine
>(Language-environment is NOT up) to Language-Environment conforming ASM/370
>routine (with CEEENTRY/CEETERM etc.)?

>    Seems like a regular 'LINK' doesn't work - it abends S0C4 on CEEPLPKA.

>    Anybody experienced this problem before?

>  Regards,

>--------------------------
>   Itsik Shabtay




Fri, 24 Aug 2001 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Dinamyc PL/I routines with parametre problems in Language Environment

2. Dynamic Link in PL/I and Language Environment

3. Screen handling routines for ada environment

4. Fw: Re: linking to an external routine in ibm apl2/win -- figured

5. linking to an external routine in ibm apl2/win -- figured it

6. linking to an external routine in ibm apl2/win

7. Linking in PKUNZIP routine into a Clipper EXE.

8. HOW can I link Borland C routines with Clipper 5.2

9. Linking an ADA routine to a program written in C

10. Linking routines with different length common blocks?

11. Linking fortran and c++ routines

12. linking gcc code to F77 [was: looking for s_wsFe, s_wsFi, do_f_out library routines]

 

 
Powered by phpBB® Forum Software