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.
C/C++ JCL's
-
- Posts: 6
- Joined: Thu Feb 07, 2013 12:40 pm
- Skillset: zOS,zLinux,zVM,CICS,DB2,COBOL
- Referer: internet
- Location: Chennai
-
- Global moderator
- Posts: 3006
- Joined: Fri Apr 18, 2008 11:25 pm
- Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
- Referer: www.ibmmainframes.com
Re: C/C++ JCL's
First
DO NOT POST THE SAME QUESTION ON MULTIPLE FORUMS
it will not get You double answers
the portal page of ibmmainframes.com tells clearly that this one is a partner site
...
and the people answering here are the same answering there
second ...
You simply did not care/forgot to read the manuals about using VSAM in C
for example
http://publib.boulder.ibm.com/infocente ... vsamdd.htm
( or the equivalent for Your zOS level )
Your other topic has been locked
DO NOT POST THE SAME QUESTION ON MULTIPLE FORUMS
it will not get You double answers
the portal page of ibmmainframes.com tells clearly that this one is a partner site
...
and the people answering here are the same answering there
second ...
You simply did not care/forgot to read the manuals about using VSAM in C
for example
http://publib.boulder.ibm.com/infocente ... vsamdd.htm
( or the equivalent for Your zOS level )
Your other topic has been locked
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
-
- Global moderator
- Posts: 3025
- Joined: Sun Jul 04, 2010 12:13 am
- Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
- Referer: Google
- Location: Pushing up the daisies (almost)
Re: C/C++ JCL's
Hmmmmmm.....just browsing an old topic or two. This one a) does not say WHAT error, b) it is trying to read a text file (sequential) and c) with a non-mainframe name. There has been no reponse from TS. Can we delete the topic?
edited
edited
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
Regards
Nic
-
- Global moderator
- Posts: 3805
- Joined: Tue Jan 25, 2011 12:02 am
- Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
- Referer: Google
Re: C/C++ JCL's
What have you tried? Anything in the manuals? You want to use JCL alone?