I have a program on zLinux that accepts the filename as an environment variable. For example EXPORT INFILE=file.txt under Linux.
Is it possible using COZLauncher to allocate a z/OS dataset to INFILE using EXPORT. For example in STDENV
export INFILE=//zOS.DATA.SET
Allocate z/os Dataset name using EXPORT
Well, it sounds like your Linux program will want to read file given its name, and it won't be able to open the dataset directly. One way to accomplish this would be to create a named pipe and then fork a Co:Z fromdsn comand to read your dataset.
For example:
// EXEC COZLNCH,ARGS=;myuser@mylinux'
//STDIN DD *
mkfifo mypipe.txt
export INFILE=mypipe.txt
fromdsn //zos.data.set > mypipe.txt &
/path/to/mypgm
rm $INFILE
//
For example:
// EXEC COZLNCH,ARGS=;myuser@mylinux'
//STDIN DD *
mkfifo mypipe.txt
export INFILE=mypipe.txt
fromdsn //zos.data.set > mypipe.txt &
/path/to/mypgm
rm $INFILE
//
Thanks thats Resolved
mkfifo solved it, now I have a timeout problem, but will open another thread for that.
Thanks
Thanks