Given that there'll be a main process which spawns child processes/threads per
transaction/user then using shell statements like:
export DDNAME_1=/pathname
And then in the program use the following to map the DD name to the pathname
for the open/fopen:
path=getenv("DDNAME_1")
fd=open(path, ...);
Is probably what you want to do. Those environment variables would probably be
set in a script used to start the kicks executable. These environment variables
would be inherited by all process/threads of that main process.
On 07/08/2012, at 18:47, "Mike Noel" <[email protected]> wrote:
> I'm in the initial stage of porting my TSO/CMS program (KICKS, see
> kicksfortso.com) to linux, including zlinux. KICKS is mostly GCC code,
> though not open source. Several people have recommended I post to this
> list for some of my questions. So I've subscribed, and looked at some
> past posts, and am ready to see if you can help me!
> (1) first, does my quest seem appropriate for this list? and if so, my
> first question:
> (2) TSO & CMS provide a separation between the name of a file
> internally (ddname) and the external name of the file (dsname), with
> some kind of control card (DD, ALLOC, FILEDEF, etc) to be provided at
> run time to connect the two. I'm considering ways to do this in a
> linux environment and am presently thinking about using environment
> statements. So for example if there was a user file MYFILE in the
> KICKS fct, it would be matched to an external file
> /home/myuser/myfile.vsam by an environment statement like
> MYFILE=/home/myuser/myfile.vsam
> KICKS will always be started from some kind of shell script and these
> environment defines, as part of that script, seem (to me) a natural
> analog to the ALLOC's and FILEDEF's used in current tso and cms clists
> and execs.
> Here's the question: Is this the most natural unix/linux way to
> connect such internal and external names?
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO LINUX-390 or visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
> ----------------------------------------------------------------------
> For more information on Linux on System z, visit
> http://wiki.linuxvm.org/
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/