midrange.com code scratchpad
Name:
QSH example
Scriptlanguage:
Plain Text
Tabwidth:
4
Date:
01/08/2018 08:07:38 pm
IP:
Logged
Description:
The user was to lazy to give a description
Code:
  1. So if the issue is the "find" command difference between QSH and PASE.
  2.  
  3. "find /tmp/ -mmin +1" works in PASE but not in QSH
  4.  
  5.  
  6. Lets give this a try.
  7.  
  8. I created this shell script:
  9.  
  10. ************Beginning of data************** 
  11. #!/QOpenSys/usr/bin/ksh
  12.  
  13. find /tmp/ -mmin +1
  14.  
  15. ************End of Data********************
  16.  
  17. the #!/QOpenSys/usr/bin/ksh  will run in PASE shell even though I called from QSH  ( i think i have that wording correct)
  18.  
  19.  
  20. then ran from the CLLE program
  21.  
  22. *************** Beginning of data ************
  23. pgm &x
  24.  
  25. dcl &x *char 1
  26. IF         COND(&X = 'Y') THEN(ADDENVVAR +
  27.            ENVVAR(QIBM_QSH_CMD_OUTPUT) VALUE(NONE) +
  28.            LEVEL(*JOB) REPLACE(*YES))
  29.  
  30. QSH        CMD('/home/bdietz/test4ML.sh')
  31. end:
  32. endpgm
  33. ****************** End of data *************
  34.  
  35. submit job with "Y" for parm = no output
  36. submit job with "N" for parm = i get output
  37.  
  38.  
  39. Bryan
© 2004-2019 by midrange.com generated in 0.007s valid xhtml & css