What are the permissions to all of the directories to the path in which the files reside? The user running the script must have execute permissions on each directory in the path.
We do a lot of this sort of thing, via scripts that are started by cron. The only significant difference I can see in our scripts, is that instead of running the programs they way you are, we catalog the programs with the LOCAL option (which really just creates a VOC pointer to the compiled object code), then instead of: $UDTBIN/udt<<EOD>>$LOG RUN BP CONV_ORD -N bye EOD We do: $UDTBIN/udt PHANTOM OP610 Where OP610 is an example of a VOC pointer to a LOCAL cataloged program. This runs the program as a phantom and automatically creates an output log in _PH_ Larry Hiscock Western Computer Services -----Original Message----- From: owner-u2-us...@listserver.u2ug.org [mailto:owner-u2-us...@listserver.u2ug.org] On Behalf Of charles_shaf...@ntn-bower.com Sent: Wednesday, March 11, 2009 11:56 AM To: u2-users@listserver.u2ug.org Subject: [U2] OSBWRITE problem I am having a problem with an OSBWRITE statement. We exchange data with Chicago, Japan, the UK, etc. We have worked out a method that we have been using for years withoput problem. On downloads the sender (AS400 or 390) submits a request to run a *nix script on our RedHat server. The script does some things including running a UniBasic program like this $UDTBIN/udt<<EOD>>$LOG RUN BP CONV_ORD -N bye EOD This is a method we haver used for many years with no problems. The script and UniBasic program run with errors. However. When run through the script, a particular OSBWRITE command does not write anything to the file. Running the UniBasic program from ECL like this: :RUN BP CONV_ORD Writes data to the file with no problem. There are other OSBWRITEs in the same program that run fine either way. The only difference is that they use relative paths FILES_AS400/poconv.pad, while the problem uses absolute paths /NTN/DATA/CORPORATE/FILES_AS400/CUST_XFER. I check the STATUS after the OSBWRITE and status is 0. The file is owned by the same user that runs the program and permissions are rw-rw-r-- umask for the user is 002 The environment in the script is setup by calling a boilerplate script containing this: # Set up the CMI environment CMIHOME=/NTN/CMI/TRANS4M UDTHOME=/NTN/CMI UDTBIN=/usr/ud/bin TERM=vt100 export CMIHOME UDTHOME UDTBIN TERM PATH=$UDTBIN:/usr/local:PROCESSES:$PATH export PATH #EOF EOF It seems to only occur when the subroutine is invoked through a script and the filename uses an absolute path. Charles Shaffer Senior Analyst NTN-Bower Corporation ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/