Posted on 2006-01-06 13:20:57-08 by petermoessinger
vsamlocate fails
I'm trying to use the vsamlocate command to position a VSAM file. I can read a flat file and a VSAM file sequentially, so the access to OS390 is fine but every attempt to locate the VSAM-file gives following error message:
EDC5059I An attempt to reposition a VSAM file failed. at testvsam.pl line 22.
My code is:
use OS390::Stdio qw( &dynalloc &dynfree &get_dcb &getname &pds_mem &sysdsnr &mvsopen &mvswrite &flush &forward &rewind &resetpos &remove &tmpnam &smf_record &svc99 &vsamdelrec &vsamlocate &vsamupdate &dsname_level &vol_ser ); $fh = mvsopen("//'TEST.FILE'","r") or die $!; print $fh; print "File opened successfully!\n"; $key = "\9\12\128\1\1\12"; $gatt = vsamlocate( $fh, $key, 6, __KEY_GE ) or die $!;
Can you help please? Thnx Peter
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.