You have already three topic going on on the same subject
there is no reason for anybody to rewrite what is clearly explained in the manual
z/OS V1R11.0 XL C/C++ Programming Guide z/OS V1R10.0-V1R11.0
which contains a WORKING example
start from ...
http://www-03.ibm.com/systems/z/os/zos/ ... index.htmland navigate to the bookshelf related to the level of Your zOS
and look at the dataset
CBC.SCCNSAM
for the related sources
but Your approach is jumping too far ahead
why not start with a simpler thing before jumping to VSAM
reading and writing plain PS files first ???