Guys,
Am trying to open a file and read the content in that using C from mainframes.
Here is the code,
#include<stdio.h>
int main()
{
int i;
FILE *fp1;
fp1=fopen("**********.CPP.SAVE","w");
if(fp1==NULL)return;
for(i=0;i<256;i++)
{
fprintf(fp1,"%c",i);
}
fclose(fp1);
return 0;
else { printf("File does not exist");
}
}
Only the else part is been printed.
Is the fopen syntax right in zOS.
Suggestions needed.
Thanks & Regards,
AK