Skip to main content

File contention

  • February 13, 2020
  • 10 replies
  • 0 views

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.


#EnterpriseServer

10 replies

  • Rocketeer
  • 19312 replies
  • February 14, 2020

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.


#EnterpriseServer

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 replies
  • February 15, 2020

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.

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


  • Rocketeer
  • 19312 replies
  • February 18, 2020

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

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.


  • Rocketeer
  • 19312 replies
  • February 18, 2020

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.


#EnterpriseServer

Write a small program which does so... But usually that is not necessary as during the start up of CICS region this is already been taken care. So as suggested by Bill,please take that information to CICS Admin and then find out what went wrong. 

In the process I setup I set the file status to CLOSED/DISABLED and
after the Backups are finished I reset file status to CLOSED/ENABLE


  • 0 replies
  • February 20, 2020

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.

Hi Mike,

 

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

 

 


  • Rocketeer
  • 19312 replies
  • February 20, 2020

Hi Mike,

 

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

 

 

Probably, but I don't know what it is. Customer Care could help you.


  • 0 replies
  • February 27, 2020

Probably, but I don't know what it is. Customer Care could help you.

Hi Mike,

 

Some times what happens is eventhough theCICS file is opened, the job fails as the file open failed. How could it be?

Will there be any connectivity issue between the Batch region and the CICS Online region. If yes how can we trace it?

 


  • Rocketeer
  • 19312 replies
  • February 29, 2020

Hi Mike,

 

Some times what happens is eventhough theCICS file is opened, the job fails as the file open failed. How could it be?

Will there be any connectivity issue between the Batch region and the CICS Online region. If yes how can we trace it?

 

I explained this in a previous answer. If CICS has a file open, JCL cannot open that file.


  • 0 replies
  • June 15, 2020

I explained this in a previous answer. If CICS has a file open, JCL cannot open that file.

Mike,

Recently we have discoveredthat the allocation/deallocation jobs were failing because of parallel execution and not because of contention.

Like not more than one fileshare job is executing. Where can we find the configuration settings in fileshare about the limitation of running the jobs which access the fileshare.

 

 

 


  • Rocketeer
  • 19312 replies
  • June 17, 2020

Mike,

Recently we have discoveredthat the allocation/deallocation jobs were failing because of parallel execution and not because of contention.

Like not more than one fileshare job is executing. Where can we find the configuration settings in fileshare about the limitation of running the jobs which access the fileshare.

 

 

 

I'm afraid I don't entirely understand your situation, and this is not really my area anyway. I would expect job failures when multiple jobs attempted to run at the same time with non-shared access to the same dataset, but I haven't needed to look into the semantics of JCL dataset allocation closely.

I can only refer you to the product documentation and suggest that you open an incident with Micro Focus Customer Care, if no one more experienced in this area responds to your post.

(Incidentally, this is a public forum. There's no need to address me personally in your messages.)