Joined: 31 Oct 2006 Posts: 967 Location: Richmond, Virginia
Since a SAS program is really the SYSIN to SAS, it would be SAS you'd calling.
A SAS program is interpreted, so I don't see how this would work.
Having said that, each SAS step is "compiled" in some sense, but not to object code, before being executed. I think one can pre-compile a SAS program, but would still need to execute SAS to run it. I have not done that.
I have once tried to call SAS from REXX just for knowing,
below is the code, Maybe this might give some idea of how to approach the problem with COBOL. One thing is, SAS requires SASLOG,SASUSER and SYSIN logical filenames to do its work.
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
One of my groups has a project where (a couple of weeks ago) they needed to generate a random number - using SAS. While SAS is on a system here, no one has experience/experise. As i'm one that inherits these "things". i asked here and got directon how to to this.
As ever, when something works, more must be better. Now they want to invoke this from some of their COBOL code and asked if i knew how as i'm the SAS guy . . . When they asked if i could look at this, gave my standard answer - "Sure i can look at it, might not be able to much about it - but i surely can look into it.".
Their client (Fedl Gov't) is high on SAS, so they are looking for "points" as well as the technical solution.
Guess i'd best download all of the SAS docs as i may need'em. . .