I installed R 3.3.1 on z/OS V2.1.
After configuration I tried to run a simple script like following.
I create hello.R file including just following code.
I can run this script from R console.
$ cat hello.R print("Hello World") $ R -e 'source("hello.R")' R version 3.3.1 (2016-06-21) -- "Bug in Your Hair" Copyright (C) 2016 The R Foundation for Statistical Computing Platform: i370-ibm-openedition (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > source("hello.R")  "Hello World" >
It was successfully completed but Rscript command did not work.
$ pwd /u/cics004/R $ ls -la | grep hello.R -rw-rw-rw- 1 xxxxx xxxxx 24 Jan 17 04:55 hello.R # Rscript --version R scripting front-end version 3.3.1 (2016-06-21) $ Rscript ./hello.R Rscript execution error: EDC5129I No such file or directory. (errno2=0x0594003D) $ Rscript /u/cics004/R/hello.R Rscript execution error: EDC5129I No such file or directory. (errno2=0x0594003D)
How can I use Rscript command?
The following environment variables were set at the shell on which Rscript command was issued.
_BPXK_AUTOCVT=ON PATH=/usr/lpp/R331/bin:/bin:/u/cics004/Shell:/u/cics004/REXX CURL_CA_BUNDLE=/usr/lpp/R331/etc/sslcacert.pem BASE=/usr/lpp/R331 LIBPATH=/usr/lpp/R331/lib: TZDIR=/usr/lpp/R331/lib/R/share/zoneinfo