Highlighted
noel2019 Trusted Contributor.
Trusted Contributor.
361 views

File contention

Hi,

If a file is locked in CICS file share for one JCL job and if another JCL job want to access the same file which is in CICS can we detect through any commands or any other ways.

 

Because the JCL jobs just fails as file open/close failed because of 09/05.

0 Likes
4 Replies
Micro Focus Expert
Micro Focus Expert

Re: File contention

Are the files in question open in CICS or just in the JCL jobs? It's not clear from your question if the issue is file contention between two JCL jobs, or between CICS and one or two JCL jobs. What are the dispositions of the files in JCL? If CICS is also involved, how are the files defined to CICS? Are you telling CICS to close the files (e.g. using the casfile command) before running either or both JCL job?

You can view resource locks for a region using ESMAC.

0 Likes
noel2019 Trusted Contributor.
Trusted Contributor.

Re: File contention

Hi Mike,

 

Sometimes the files are open in CICS, but event then in JCL job it shows as File Open failed. This is job log of one of the JCL job,

CASMG0001I PROD-ONL: USING CLASS EXPSW2 ===> AMEXNOTE OPEN FAILED, RC = 15 05:30:05

 CASMG0001I Log file open failed 05:30:05

 CASMG0001I $LOGDIR\DAD 05:30:05

 CASMG0001I File status: 9-065 05:30:05

 CASMG0001I Command execution aborted. 05:30:05

 CASMG0001I Highest return code: 15 05:30:05

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: File contention

CICS opens files in exclusive mode. When a file is open in CICS, it is not available to a JES job.

If you have files that are used by both CICS and JES, you have to close them in CICS before JES jobs can use them. The casfile utility is one way to achieve this.

0 Likes
noel2019 Trusted Contributor.
Trusted Contributor.

Re: File contention

Hi Mike,

 

Is there a way to find out which JCL job is using which CICS file. or any third party tools?

 

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.