> -----Original Message-----
> From: IBM Mainframe Discussion List 
> [mailto:[EMAIL PROTECTED] On Behalf Of Jim McAlpine
> Sent: Monday, January 29, 2007 10:14 AM
> To: IBM-MAIN@BAMA.UA.EDU
> Subject: setting LE runtime options programatically.
> 
> 
> We have just started down the road of trying to invoke java 
> classes from
> batch COBOL but have hit a problem with the 100 character 
> PARM field length
> because we need to specify several runtime options such as ENVAR=....,
> POSIX(ON) AND XPLINK(ON) on top of our own parameters.  Is 
> there a way to
> change the runtime options dynamically from a COBOL program 
> which is already
> running in an LE environment.
> 
> Jim McAlpine

Do you truly want to set LE runtime options? Or do you just need to set
some UNIX environment variables before invoking the Java program(s)? If
you need to set environment variables in COBOL, then simpliest way is
probably to include a 

//STDENV DD *


statement and put in your "VARNAME=VALUE" pairs on separate lines. Oh,
make sure that the dataset is UNNUM or the "line numbers" will mess with
your mind <grin>.

If you need to set them dynamically, there is an example of using
"putenv" in the COBOL manual.

01 putenv-arg pic x(14) value Z'VAR=VALUE'.
01 P pointer.
01 RC pic 9(9) binary.
...

set P to address of putenv-arg.
call 'putenv' using by value P returning RC.
if RC not = zero then
   display 'putenv failed. rc=' rc upon sysout
end-if

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it. 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to