Sorry Yes Unix System Services. The code isn’t mine. It’s from IBM DBB which can be found here, https://github.com/IBM/dbb/blob/master/IDE/GitISPFClient/sbgzexec/bgzinit.rexx
I can’t reproduce the problem with some sample code I cobbled up. On Thu, May 14, 2020 at 8:46 AM Seymour J Metz <sme...@gmu.edu> wrote: > I assume that you mean Unix syscall environment. The documentation is a > bit confusing, because the syscall commands set RETVAL, which is the > behavior associated with a function. Are you looking at RC or at RETVAL? > could you show your code? Are you running from IRXJCL, TSO or a Unix shell? > > My guess is that you did not invoke your code from a Unix shell and that 0 > was the first available file descriptor. If that is the case then you might > want to open STDIN, STDOUT and STDERR at the beginning of your code. > > > -- > Shmuel (Seymour J.) Metz > http://mason.gmu.edu/~smetz3 > > ________________________________________ > From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf > of Michael Babcock [bigironp...@gmail.com] > Sent: Thursday, May 14, 2020 8:53 AM > To: IBM-MAIN@LISTSERV.UA.EDU > Subject: USS Open in SYSCALL ENV > > In the USS REXX SYSCALL environment, is it normal for a command such as: > > open /u/xx35/test, o_rdwr+o_creat+o_trunc, 755 > > To return a file descriptor of 0 (zero)? > > The reason I ask is that the subsequent write fails with > > RC 71 RSN 571011C > > Which basically says: file is not opened > > I thought fd 0 is normally STDIN. > > > -- > Michael Babcock > OneMain Financial > z/OS Systems Programmer, Lead > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > -- Michael Babcock OneMain Financial z/OS Systems Programmer, Lead ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN