Saturday, October 17, 2026

𝗧𝗵𝗲 𝗖𝘂𝗿𝗶𝗼𝘂𝘀 𝗖𝗮𝘀𝗲 𝗼𝗳 𝗜𝗻𝘁𝗲𝗿𝗺𝗶𝘁𝘁𝗲𝗻𝘁 𝗦𝗙𝗧𝗣 𝗧𝗶𝗺𝗲𝗼𝘂𝘁𝘀 𝗶𝗻 𝗠𝗮𝗶𝗻𝗳𝗿𝗮𝗺𝗲 𝗣𝗿𝗼𝗱𝘂𝗰𝘁𝗶𝗼𝗻 𝗝𝗼𝗯𝘀

One of our customers decided to improve security by replacing plain FTP with SFTP across their production batch jobs.
 
As part of the change, all existing FTP steps were replaced with Co:Z SFTP.
 
The implementation looked straightforward. However, once the changes reached production, we started seeing an unexpected problem.
 
Some SFTP steps were intermittently timing out.
 
What made the issue more interesting was that the failures were not consistent. The same jobs could run successfully at one time and fail at another.
 
After looking at the pattern more closely, we noticed one important clue: The SFTP timeouts were occurring primarily during periods of high CPU utilization.
 
That shifted our investigation away from simply treating this as an SFTP or connectivity problem.
 
SMF 30 Provided the Clue
 
Initially, we did not have a clear explanation for why the Co:Z SFTP steps were failing.
 
We eventually decided to investigate the workload using SMF Type 30 records, and that pointed us in the right direction.
 
We found that Co:Z SFTP file transfers were running under an OMVS address space. However, there was no specific WLM classification rule covering this workload.
 
As a result, the SFTP workload was falling into the default OMVS service class, which had a Discretionary goal.
 
And that turned out to be the real problem.
 
Why the Discretionary Goal Mattered
 
A workload running with a Discretionary WLM goal receives CPU resources only when higher-priority workloads do not need them.
 
Under normal CPU conditions, this was not noticeable. There was enough CPU available, and the SFTP transfers completed successfully.
 
During peak CPU utilization, however, higher-priority workloads took precedence. The OMVS workload running the Co:Z SFTP process did not receive enough CPU in a timely manner.
 
The result?  The SFTP operations started hitting timeouts.
 
So, what initially appeared to be an intermittent SFTP problem was actually a WLM workload-classification problem exposed by CPU contention.
 
The WLM Change
 
Our production batch workloads already had three service classes based on priority:
  • PRDBATHI - High-priority batch
  • PRDBATMD - Medium-priority batch
  • PRDBATLO - Low-priority batch
 
We decided that the OMVS workload responsible for the production SFTP transfers should receive the PRDBATHI service class.
 
We therefore added a WLM classification rule similar to the following:
 
Qualifier  Qualifier      Starting       Service   Report
type       name           position       Class     Class
---------  -------------  ---------      --------  --------
TN         PRDJOBQUAL                    PRDBATHI  SFTP
 
After installing the updated WLM definition, the behavior changed immediately.
 
The Co:Z SFTP steps began completing successfully, including during periods of high CPU utilization, and the intermittent timeout problem disappeared.
 
This incident was a good reminder that an SFTP timeout does not necessarily mean there is a network or SFTP problem.

Tuesday, October 6, 2026

𝗪𝗵𝘆 𝗔𝗿𝗲 𝗦𝗼𝗺𝗲 𝗝𝗼𝗯𝘀 𝗣𝘂𝗿𝗴𝗲𝗱 𝗳𝗿𝗼𝗺 𝗝𝗛𝗦 𝗘𝗮𝗿𝗹𝗶𝗲𝗿 𝗧𝗵𝗮𝗻 𝗢𝘁𝗵𝗲𝗿𝘀?

In JHS (Job History System), we noticed that some jobs are purged from JHS sooner than other jobs.

We dug through the installation libraries below and found that JHS groups jobs by a Job Group number, ranging from 0 to 15.

HLQ.JHS.PARMLIB(EXITS)
HLQ.JHS.JHSASM(JHSGRPM1)
HLQ.JHS.PARMLIB(JHSPARMS)

JHS uses the Job Group number to determine the job retention period. These groups can be used to categorize jobs based on their retention requirements, such as daily, weekly, monthly, or annual jobs. Up to 16 Job Groups (0–15) can be specified.
 
The name of the JHS exit that assigns the Job Group number to jobs can be found in HLQ.JHS.PARMLIB(EXITS).
 
HLQ.JHS.PARMLIB(EXITS)
 
<EXIT>
  <TYPE>JOBGROUP</TYPE>
  <MODULE>JHSGRPM1</MODULE>
</EXIT>
 
The sample code for the JHS exit JHSGRPM1 can be found in:

HLQ.JHS.JHSASM(JHSGRPM1)
 
IF NAME=-------D
  GROUP 0
ENDIF
IF NAME=-------W
  GROUP 0
ENDIF
IF NAME=BXXXXXXD
  GROUP 4
ENDIF
IF NAME=MXXXXXXW
  GROUP 14
ENDIF
 
In PARMLIB(JHSPARMS), each Job Group is associated with a retention period specified in number of days.
 
HLQ.JHS.PARMLIB(JHSPARMS)
* NUMBER OF DAYS RETENTION OF JOB SUMMARY DATA
RETAIN              010    JOB GROUP 0
RETAIN1             005    JOB GROUP 1
RETAIN2             007    JOB GROUP 2
RETAIN3             012    JOB GROUP 3
RETAIN4             014    JOB GROUP 4
RETAIN5             018    JOB GROUP 5
RETAIN6             020    JOB GROUP 6
RETAIN7             022    JOB GROUP 7
RETAIN8             024    JOB GROUP 8
RETAIN9             030    JOB GROUP 9
RETAIN10            060    JOB GROUP 10
RETAIN11            091    JOB GROUP 11
RETAIN12            120    JOB GROUP 12
RETAIN13            150    JOB GROUP 13
RETAIN14            160    JOB GROUP 14
RETAIN15            170    JOB GROUP 15
 
Therefore, jobs assigned to different Job Groups can have different retention periods in JHS, which explains why some jobs are purged sooner than others.

Thursday, October 1, 2026

𝗕𝗟𝗞𝗦𝗜𝗭𝗘 𝗠𝘆𝘀𝘁𝗲𝗿𝘆: 𝗦𝗮𝗺𝗲 𝗖𝗢𝗕𝗢𝗟 𝗮𝗻𝗱 𝗝𝗖𝗟, 𝗯𝘂𝘁 𝗗𝗶𝗳𝗳𝗲𝗿𝗲𝗻𝘁 𝗩𝗮𝗹𝘂𝗲𝘀 𝗳𝗼𝗿 𝗗𝗜𝗦𝗞 𝗮𝗻𝗱 𝗧𝗔𝗣𝗘

While testing the same COBOL program, I observed different BLKSIZE behavior for tape and disk output datasets.
 
The COBOL program had the following settings:
 
  • NOBLOCK0 compiler option was in effect.
  • The FD definition did not contain BLOCK CONTAINS 0.

Tape output dataset
 
For a tape output dataset, the system assigned a BLKSIZE equal to the LRECL, regardless of whether BLKSIZE=0 was specified in the JCL.
 
In other words:
  • With BLKSIZE=0 in JCL → BLKSIZE was assigned the same value as LRECL.
  • Without BLKSIZE=0 in JCL → BLKSIZE was still assigned the same value as LRECL.

Disk output dataset
 
The behavior was different for a disk output dataset.

Regardless of whether BLKSIZE=0 was specified in the JCL, the system assigned an appropriate BLKSIZE as expected.

 
Fix for the tape output dataset
 
To address the tape dataset issue, I added the following clause to the COBOL FD:
BLOCK CONTAINS 0
 
After making this change, the system properly assigned the BLKSIZE for the tape output dataset as well, irrespective of whether BLKSIZE=0 was specified in the JCL.