JOB1 failed with VASM error.

JES2/3, JCL, utilities.
Post Reply
Nitin Gadge
Registered Member
Posts: 27
Joined: Tue Aug 20, 2013 11:32 am

JOB1 failed with VASM error.

Post by Nitin Gadge »

Hi,

We get an abend with VSAM file. Upon checking we found that this file was in use by another job. Is there a way that both the jobs can use the same file?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: JOB1 failed with VASM error.

Post by Robert Sample »

Since a VSAM data set can be opened for input, output, or I-O (and you did not bother to tell us the "VSAM error" that your job received) it is not at all clear what you are asking. SHAREOPTIONS 2 for cross-region allows multiple jobs to read the data set simultaneously and 1 job to update the data set.

Assuming you want multiple jobs to be able to read and write to the same VSAM data set at the same time, this can be done by using SHAREOPTIONS 3 or 4 for the cross-region share options (the first value in the parentheses after SHAREOPTIONS in the DEFINE CLUSTER). Note, however, that the z/OS DFSMS Using Data Sets manual at https://www.ibm.com/support/knowledgece ... 0/crso.htm tells you:
User programs that ignore the write integrity guidelines can cause VSAM program checks, lost or inaccessible records, uncorrectable data set failures, and other unpredictable results. This option places responsibility on each user sharing the data set.
So while it can be done, EVERY program to share the access MUST implement ENQ / DEQ processing code or you can receive "unpredictable results" (which is IBM-talk that you cannot predict in advance what will happen if you have a program without ENQ / DEQ logic). As long as your site identifies every program, and implements ENQ / DEQ logic for every program, then yes you can do this.

If there is something else you wanted, you'll need to be clearer about what you're asking for.
Nitin Gadge
Registered Member
Posts: 27
Joined: Tue Aug 20, 2013 11:32 am

Re: JOB1 failed with VASM error.

Post by Nitin Gadge »

Thanks Robert.

Is ENQ/DEQ is a programming technique? Or this is something we can define at system level for some VSAM?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: JOB1 failed with VASM error.

Post by Robert Sample »

Enqueue and dequeue are a programming method to serialize access to a resource (such as a data set), which prevents more than one job updating the resource simultaneously. For CICS COBOL, the API includes commands to enqueue and dequeue access. For batch COBOL, there are no verbs to do this so you MUST write and use a subprogram (in Assembler most likely although other languages could be used) to handle the enqueue and dequeue.

Enqueue and dequeue must be done through application programming since the system does not provide any way to do this for VSAM. The system supports enqueue and dequeue through the SHAREOPTIONS, but that's about as far as it goes.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “JCL - Job Control Language.”