Date: Thu, 23 Oct 1997 05:59:41 -0400
Reply-To: Ron Mckean <rmckean@COMPUSERVE.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Ron Mckean <rmckean@COMPUSERVE.COM>
Subject: Re: CALL() - Calling External COBOL Modules
Content-Type: text/plain; charset=ISO-8859-1
>On the 15th October, Patrick Sunderland wrote:
>> Does anyone know how to call a cobol module from within SAS and
>I have done a similar thing in 6.08. The code I used was :-
>On the 20th October, Bob Whitehead replied:
>Try contacting SAS Technical Support. They have a support
>'application' called COBOLINT that implements (or at least enhances)
>the basic call() behaviour.
I wrote an original call interface for use under OS/VS1, which was later
modified for use with OS/MVS. I understand that this is the basis for the
COBOLINT module currently being used. If so, I believe that the following
points are still relevent
1. It is a small assembler module that needs to be assembled and linked
with the SETSSI parameter set to (if I remember correctly) 'AB1F0000'. Make
sure that this is included in the link edit step.
2.The COBOL modules that are to be called by this routine must be re-linked
as 'RE-ENTRANT' and 'SERIALLY RE-USABLE' if they aren't already. Link edit
parameters RENT and REUS.
3. In the SAS call statement, the first parameter to the routine is the
name of the module that you ultimately wish to call. The second and
subsequent parameters are the parameters that would normally be passed to
this module via a normal COBOL call. If the library that the called module
resides in is not on the standard system search paths, include a DD
statement for it in your JCL.
4. The process works by converting the SAS linkage references to the PDV
into absolute addresses, then calls the module named in the first parameter
with a standard IBM linkage.
5. Returned parameters are processed in reverse back to the SAS PDV, and
are available to subsequent SAS statements.
I originally developed this approach to avoid the problem of maintaining
multiple copies of the same routines (one for SAS calls and another for
COBOL calls). By using this interface both SAS and COBOL can share a common
If you are having trouble locating COBOLINT (I still have a copy of my
original) I'm sure I could get my hands on the current version for you.