Hi Guys,
I am trying to access VSAM datasets from a C/C++ progam in zOS. As regs this, I tried compiling C Pogram and it works fine. When i try to compile a fileread C progam , i am getting error. Kindly help.
Thereby i am pasting the C Progam which i used.
#include <stdio.h>
int main()
{
FILE *filepointer;
int character;
filepointer=fopen("ch.txt", "r");
if (filepointer==NULL) {
printf("Could not open data.txt!\n");
return 1;
}
while ((character=fgetc(filepointer)) != EOF)
{
printf("The output is:", character);
putchar(character);
getch();
}
fclose(filepointer);
return 0;
}
Note: This prog works fine in normal C in Windows.