Problem in file read in c-zOS
Posted: Wed Feb 13, 2013 3:35 pm
Guys,
Am trying to open a file and read the content of the file . Here is my code
Am compiling the above prog using the proc EDCQCBG.
Am not getting any error after compilation and also not getting the output content.
Kindly help.
Thanks in advance
Code'd, for what is was worth
Am trying to open a file and read the content of the file . Here is my code
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<file.h>
#include <"U345175.CPP.SAVE">
main()
{
int c;
FILE *file;
file = fopen("U345175.CPP.SAVE", "rb,type=record");
if (file != NULL)
{
while ((c = getc(file)) != EOF)
putchar(c);
fclose(file);
}
#include<stdlib.h>
#include<string.h>
#include<file.h>
#include <"U345175.CPP.SAVE">
main()
{
int c;
FILE *file;
file = fopen("U345175.CPP.SAVE", "rb,type=record");
if (file != NULL)
{
while ((c = getc(file)) != EOF)
putchar(c);
fclose(file);
}
Am compiling the above prog using the proc EDCQCBG.
Am not getting any error after compilation and also not getting the output content.
Kindly help.
Thanks in advance
Code'd, for what is was worth