Why not trying simple //OUTF DD SYSOUT=* ... That should go to SYSPRINT. On Fri, Mar 6, 2009 at 9:29 PM, Lorne Dudley <dudl...@queensu.ca> wrote:
> I'm a novice trying to get a simple C program running under MVS. > > I'm attempting to get file output to > //OUTF DD SYSOUT=A > with the following program. > > #include <stdio.h> > int main(void) > { > FILE *outf = NULL; > printf("TESTFILE has been entered.\n"); > outf = fopen("dd:OUTF","recfm=fba, w+"); > if (!outf) > { > printf("fopen error on FILE *outf.\n"); > return 4; > } > fprintf(outf, "outf open ...\n"); > fclose(outf); > return 0; > } > > So far, with many variations to the fopen string, I get only the following > output on SYSPRINT, no output to OUTF. > > TESTFILE has been entered. > fopen error on FILE *outf. > > Can anyone give me some advice on how to code this correctly ? > > Regards > > Lorne Dudley > Queen's University > Kingston, Ontario > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO > Search the archives at http://bama.ua.edu/archives/ibm-main.html > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html