Pinned topic File handling in C and C++ on mainframes
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
I have developed a C and C++ programs on z/OS.The functionality of the program is to read from a file and display the contents on the console.The program has to accept the file name at run-time and inorder to achieve this I coded the below in my C program
fp=fopen("dd:INFILE","r"); and specified the DDNAME in the run jcl.When I run the program,the fopen operation fails and fp is set NULL indicating that the file cannot be opened.I am facing the same problem with C++ program too.
Looking forward to your help in resolving the issue.
Thanks and Regards,
Updated on 2010-08-02T02:22:00Z at 2010-08-02T02:22:00Z by SystemAdmin