Try SYSPRINT. Ref: http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/cbcpg1c0/2.8.9.1.2 <quote>
When you use DD statements to redirect standard streams, the standard streams will be associated with ddnames as follows: - stdin will be associated with the SYSIN ddname. If SYSIN is not defined, no characters can be read in from stdin. - *stdout* will be associated with the SYSPRINT ddname. If SYSPRINT is not defined, the C library will try to associate *stdout* with SYSTERM, and if SYSTERM is also not defined, the C library will try to associate *stdout* with SYSERR. If any of the above DDstatements are used as the MSGFILE DD, then that DD statement will not be considered for use as the *stdout* DD. *Restriction:* The reference to the MSGFILE does not apply to AMODE 64 applications. - stderr will be associated with the MSGFILE, which defaults to SYSOUT. See z/OS Language Environment Programming Guide<http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/DOCNUM/SA22-7561/CCONTENTS?> for more information on MSGFILE. *Restriction:* The reference to the MSGFILE does not apply to AMODE 64 applications. - If you are running with the run-time option POSIX(ON), you can redirect standard streams with ddnames only for MVS data sets, not for UNIX file system files. - If the ddname for *stdout* is not allocated to a device or data set, it is dynamically allocated to the terminal in an interactive environment or to SYSOUT=* in an MVS batch environment. Table 13<http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/cbcpg1c0/2.8.9.1.2?SHELF=CBCBS1C0.bks&DT=20110614131446#TBLDDSTD> summarizes the association of streams with ddnames: Table 13. Association of standard streams with ddnames *Standard* *stream* *ddname* *Alternate* *ddname* stdin SYSIN none *stdout* SYSPRINT SYSTERM, SYSERR stderr DD associated with MSGFILE. For AMODE 64 applications stderr is SYSOUT, and there is no alternate ddname. None </quote> On Thu, Apr 3, 2014 at 2:27 PM, Phil Smith <[email protected]> wrote: > If I have a C program running in batch that does printf(), that output > appears in a SYS00001 data set in SPOOL. Is there a way to redirect that to > a DASD data set? I tried STDOUT DD ... but it didn't seem to make a > difference. Some Googling didn't find anything. Just seems so...obvious, > but obviously I'm missing something?! > -- > ...phsiii > > Phil Smith III > [email protected]<mailto:[email protected]> > Voltage Security, Inc. > > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN > -- There is nothing more pleasant than traveling and meeting new people! Genghis Khan Maranatha! <>< John McKown ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
