Page 1 of 1

Is it allowed to edit VSAM file using PHP?

Posted: Wed Mar 16, 2016 2:01 pm
by Kanika
Hi,

We are evaluating and trying to find new ways to access the VSAM file. Is it possible to update a VSAM file using php or some other language on windows? For example, if we download a VSAM file from the mainframes to a Windows Server and use a php program to edit it, will that be possible? And then put the VSAM back on mainframes? If someone has some knowledge about it, please share. We are working on moving away from the use of VSAM and that's this question is asked.

Re: Is it allowed to edit VSAM file using PHP?

Posted: Wed Mar 16, 2016 5:38 pm
by Robert Sample
First, a VSAM data set has control attributes embedded, so you CANNOT merely transfer a VSAM data set to a Windows platform and use it directly.  You MUST unload the VSAM data set to a sequential data set (PDS member is fine) and transfer to Windows as a sequential data set.  You could then build an indexed file on Windows to use in a similar way as VSAM.  I've used GNU COBOL to read / write indexed sequential data sets on a Windows machine before and it works fine.  Whether PHP handles indexed files, I don't know.
Second, transferring back to the mainframe requires transferring a sequential file and then rebuilding the VSAM data set from the transferred data.

Re: Is it allowed to edit VSAM file using PHP?

Posted: Fri Mar 25, 2016 1:44 pm
by Kanika
Thanks. But there are application of Java in mainframes and they can directly handle the VSAM updates as far I know but I do not know for sure. I was thiking of that kind of a way of doing it.

Re: Is it allowed to edit VSAM file using PHP?

Posted: Fri Mar 25, 2016 2:06 pm
by enrico-sorichetti
 try googling with 
vsam jdbc driver zos