COZBATCH utility job step fails due to dataset contention

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
mainframe_2023
Posts: 1
Joined: Fri Jan 20, 2023 2:18 am

COZBATCH utility job step fails due to dataset contention

Post by mainframe_2023 »

Hi,

In our installation, COZBATCH utility job step started failing after Z/OS 2.5.0 upgrade. It complains that the dataset to be transferred is in use

But the problematic datasets are created in the same job and down the line in the same job, they are SFTP’d using COZBATCH utility.

Below is a job that fails in COZBATCH utility job step.

Job Job# Started Ended Code
XXXX039D J010445 01202023 2008 01202023 2008 8

The below messages apear in the sysout of COZBATCH utility step of the above job

X 1 B01:XXXX039D.STEP04.SYSOUT Line 37 of 49
Command ===> SPF Scroll ==> CSR
IKJ56225I DATA SET HS.XXXX039D.WKLD.RPT.DAEH ALREADY IN USE, TRY LATER+
IKJ56225I DATA SET IS ALLOCATED TO ANOTHER JOB OR USER
IEFA110I DATA SET CONTENTION
DATA SET HS.XXXX039D.WKLD.RPT.DAEH IN USE BY
SYSNAME JOBNAME ASID
TEST XXXX039D 00A2
DatasetHandlerÝE¨: BPXWDYN allocation failed S99ERROR=0x0210 S99INFO=0x0000
DatasetHandlerÝE¨: BPXWDYN command was: "alloc fi(SYS00007) reuse msg(2) da('HS.
DatasetHandlerÝE¨: Dataset HS.XXXX039D.WKLD.RPT.DAEH open error: EDC5000I No err

If I check the SMF 30 record of the above job in the SMFLOG screen of SYSVIEW,
I can see that “Address space identifier is 00A2”.

So the COZBATCH utility job step step complains, it has contention with the same job that started it.

SYSVIEW 17.0 TEST ------------- SMFLOG, SMF Log ----------- 2023/01/21 03:01:06
Command ====> Scroll *===> PAGE
------------------------------------------------ Lvl 2 Row 1-12/25 Col 1-79/223
LogStream TEST150.SMFDATA.SMFD.TEST Retention 5 days
Available 02:01:41 2023/01/12 to 02:55:25 2023/01/21
Searched 20:08:23 2023/01/20 to 20:08:33 2023/01/20
Displayed 20:08:29 2023/01/20 to 20:08:33 2023/01/20
Options Lines 25 Limit 1000000 Period NONE
-------------------------------------------------------------------------------
Cmd Date Time Type SubType SysID SSID Resource
___ 2023/01/20 20:08:29 30 4 TEST JES2 ID=JOB10445 Job=XXXX039D Step=E


Only few jobs face this dataset contention issue. Other jobs that run in the same LPAR do not face this dataset contention issue.

Could you please help ?

Thanks,
Ravikumar
rhutson
Posts: 10
Joined: Wed May 12, 2021 3:43 pm

Re: COZBATCH utility job step fails due to dataset contention

Post by rhutson »

We have been having this exact same issue since going from z/OS 2.4 to 2.5. We were using Coz Toolkit 6.2.1. I installed 7.1.1 and this appeared to fix the issue, but just got notified that the issue remains, though not on every run. We need a resolution before we can go to 2.5 on out production LPAR. I requested the user add FREE=CLOSE to the DD on the step that creates the dataset. Will post when I hear their results.
rhutson
Posts: 10
Joined: Wed May 12, 2021 3:43 pm

Re: COZBATCH utility job step fails due to dataset contention

Post by rhutson »

Sorry, just realized the original post was from our shop. Anyone else experiencing this?
rhutson
Posts: 10
Joined: Wed May 12, 2021 3:43 pm

Re: COZBATCH utility job step fails due to dataset contention

Post by rhutson »

The original post was posted by one of our consultants, who supports the production jobs but was not involved in the installation or support of Coz Toolkit, which apparently violates the no-charge Community License Agreement. Therefor I, a fulltime employee of our organization, and the system programmer who installs/supports Coz Toolkit, will repost:


Hi,

In our installation, COZBATCH utility job step started failing after Z/OS 2.5.0 upgrade. It complains that the dataset to be transferred is in use

But the problematic datasets are created in the same job and down the line in the same job, they are SFTP’d using COZBATCH utility.

Below is a job that fails in COZBATCH utility job step.

Job Job# Started Ended Code
XXXX039D J010445 01202023 2008 01202023 2008 8

The below messages appear in the sysout of COZBATCH utility step of the above job

X 1 B01:XXXX039D.STEP04.SYSOUT Line 37 of 49
Command ===> SPF Scroll ==> CSR
IKJ56225I DATA SET HS.XXXX039D.WKLD.RPT.DAEH ALREADY IN USE, TRY LATER+
IKJ56225I DATA SET IS ALLOCATED TO ANOTHER JOB OR USER
IEFA110I DATA SET CONTENTION
DATA SET HS.XXXX039D.WKLD.RPT.DAEH IN USE BY
SYSNAME JOBNAME ASID
TEST XXXX039D 00A2
DatasetHandlerÝE¨: BPXWDYN allocation failed S99ERROR=0x0210 S99INFO=0x0000
DatasetHandlerÝE¨: BPXWDYN command was: "alloc fi(SYS00007) reuse msg(2) da('HS.
DatasetHandlerÝE¨: Dataset HS.XXXX039D.WKLD.RPT.DAEH open error: EDC5000I No err

If I check the SMF 30 record of the above job in the SMFLOG screen of SYSVIEW,
I can see that “Address space identifier is 00A2”.

So the COZBATCH utility job step complains, it has contention with the same job that started it.

SYSVIEW 17.0 TEST ------------- SMFLOG, SMF Log ----------- 2023/01/21 03:01:06
Command ====> Scroll *===> PAGE
------------------------------------------------ Lvl 2 Row 1-12/25 Col 1-79/223
LogStream TEST150.SMFDATA.SMFD.TEST Retention 5 days
Available 02:01:41 2023/01/12 to 02:55:25 2023/01/21
Searched 20:08:23 2023/01/20 to 20:08:33 2023/01/20
Displayed 20:08:29 2023/01/20 to 20:08:33 2023/01/20
Options Lines 25 Limit 1000000 Period NONE
-------------------------------------------------------------------------------
Cmd Date Time Type SubType SysID SSID Resource
___ 2023/01/20 20:08:29 30 4 TEST JES2 ID=JOB10445 Job=XXXX039D Step=E


Only few jobs face this dataset contention issue. Other jobs that run in the same LPAR do not face this dataset contention issue.

Could you please help ?


Thank you,

Randy Hutson

Edit: The problem seems to be intermittent. I have been running a test version of one of the jobs all day (using both Coz 6.2.1 and 7.1.1), and so far it succeeds every time.
rhutson
Posts: 10
Joined: Wed May 12, 2021 3:43 pm

Re: COZBATCH utility job step fails due to dataset contention

Post by rhutson »

Update: The job fails only if a later step, after the COZBATCH step, references the same dataset. I have also tried DSENQSHR=ALLOW on the jobcard, but it still fails. Runs fine on z/OS 2.4, but fails on 2.5.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: COZBATCH utility job step fails due to dataset contention

Post by dovetail »

If the use of a data set in the Co:Z SFTP step conflicts with the same job, the cause is that the Co:Z SFTP shell script or the cozsftp command itself is running in a separate OMVS address space from the job itself.

I can't tell what JCL that you are using, but the solution is to invoke COZBATCH properly and to have _BPX_SHAREAS=YES set before running the cozsftp shell command.

If you use our recommended sample PROC/JCL and scripts, this will be done correctly for you.
See: https://coztoolkit.com/docs/sftp/client ... ient-batch

A good way to debug this is to change your step to include a DD card for the data set, and then reference it in CO:Z sftp this way:

put //DD:MYDD remote.file
or
get remote.file //DD:MYDD

If you get an error "DD MYDD Not Found", then you know that this is what is going on.
Post Reply